70404a2773
The QMenu pop-up used with a QToolButton could unexpectedly move to the primary screen if it was too big to fit on the owning widget's screen. The cause of the issue is that QMenu is a top-level window, and can not infer its screen from any parents. Its positioning is therefore done using heuristics in QToolButton. These heuristics attempt to calculate a best guess point relative to the screen that contains the QToolButton. If these heuristics result in a point that is outside all screens, the QMenu's own screen takes precedence, and this is always the primary screen. This way, the QMenu ends up at the calculated position, but relative to the wrong screen. This patch works around this issue by ensuring that the first estimate for the pop-up position is always within the same screen as the QToolButton. The danger with this workaround is that the menu may end up in an inconvenient location. This does, however, seem to be handled by subsequent adjustments in QMenuPrivate::popup. Fixes: QTBUG-118695 Pick-to: 6.6 6.5 Change-Id: Ibb4a1c82e827c57bbb0798a6c6f5eecb6d639c62 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io> |
||
---|---|---|
.github/workflows | ||
bin | ||
cmake | ||
coin | ||
config.tests | ||
dist | ||
doc | ||
examples | ||
lib | ||
libexec | ||
LICENSES | ||
mkspecs | ||
qmake | ||
src | ||
tests | ||
util | ||
.cmake.conf | ||
.gitattributes | ||
.gitignore | ||
.lgtm.yml | ||
.tag | ||
CMakeLists.txt | ||
config_help.txt | ||
configure | ||
configure.bat | ||
configure.cmake | ||
dependencies.yaml | ||
qt_cmdline.cmake |