If you right-click to open a context menu, followed by another click to close it again, without moving the mouse, it can happen that the menu item under the mouse will trigger. This is especially prone to happen if Qt has a large scale factor and the number of menu items is high, since then the menu has to move a bit up to make room for as menu items as possible on the screen. This patch will reuse the already existing hasMouseMoved() function to avoid triggering a menu item if the mouse hasn't moved. This will make sure that the user won't trigger a menu item by accident when instead trying to close it. Fixes: QTBUG-128359 Pick-to: 6.7 6.5 6.2 Change-Id: Ie4d73ee2031d1159dd6c003124869004b4928d18 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io> (cherry picked from commit dc1d3abd7e852829b9bc81c1ba9565f40147402d) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
…
Description
Languages
C++
84.3%
HTML
4.9%
C
3.9%
CMake
3.6%
Objective-C++
2%
Other
0.8%