From ea9e620a7f5bfbac63ccc9017732bb78db8e5356 Mon Sep 17 00:00:00 2001 From: Sergio Martins Date: Wed, 25 Mar 2015 17:08:11 +0000 Subject: 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 Reviewed-by: Alan Alpert --- src/controls/qquickmenupopupwindow.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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(transientParent())) { -- cgit v1.2.1