summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergio Martins <sergio.martins@kdab.com>2015-03-25 17:08:11 +0000
committerSérgio Martins <sergio.martins@kdab.com>2015-03-27 00:14:59 +0000
commitea9e620a7f5bfbac63ccc9017732bb78db8e5356 (patch)
treec77f48ace4041cdf24f5a79638222c4139e5b63f
parentd124fcba6975703356a16b9e53390d0c5b6e20ad (diff)
downloadqtquickcontrols-ea9e620a7f5bfbac63ccc9017732bb78db8e5356.tar.gz
Don't show popup menu on two screens at the same time.
When using more than 1 monitor, snap to 1 monitor instead of crossing screen boundaries. That's how native implementations and QtWidgets do it. Task-number: QTBUG-45228 Change-Id: Icbeb9045a04ad4d4f81295603cbf1b81dcc44442 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com> Reviewed-by: Alan Alpert <aalpert@blackberry.com>
-rw-r--r--src/controls/qquickmenupopupwindow.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/controls/qquickmenupopupwindow.cpp b/src/controls/qquickmenupopupwindow.cpp
index b7f70db7..bdc8fc25 100644
--- a/src/controls/qquickmenupopupwindow.cpp
+++ b/src/controls/qquickmenupopupwindow.cpp
@@ -93,7 +93,7 @@ void QQuickMenuPopupWindow::setGeometry(int posx, int posy, int w, int h)
pw = parentItem()->window();
if (!pw)
pw = this;
- QRect g = pw->screen()->virtualGeometry();
+ QRect g = pw->screen()->geometry();
if (posx + w > g.right()) {
if (qobject_cast<QQuickMenuPopupWindow *>(transientParent())) {