summaryrefslogtreecommitdiffstats
path: root/src/gui/widgets/qmenu.cpp
diff options
context:
space:
mode:
authorAlexis Menard <alexis.menard@nokia.com>2010-04-21 23:54:43 (GMT)
committerAlexis Menard <alexis.menard@nokia.com>2010-04-22 02:21:36 (GMT)
commitca6eaf461886142256dfa64a761fc650be2b006f (patch)
tree6bb3ed1aea4fd1828eea900b9744a3657eed7caa /src/gui/widgets/qmenu.cpp
parentef06a357aaeb83768d9170859bd99f0ceaf7e82b (diff)
downloadQt-ca6eaf461886142256dfa64a761fc650be2b006f.zip
Qt-ca6eaf461886142256dfa64a761fc650be2b006f.tar.gz
Qt-ca6eaf461886142256dfa64a761fc650be2b006f.tar.bz2
When using Qt::BypassGraphicsProxyWidget with QMenu the application is not stuck anymore
When using this flag the child of the widget which is embedded is becoming a top level QWidget. So a right click on a text edit trigger the context menu to be top level. When creating this top level context menu we are grabbing the mouse but we were never releasing it when the menu was hidden. The patch check if the widget uses the Qt::BypassGraphicsProxyWidget and ungrab the mouse. The patch also fix a bug when positioning the QMenu, it was for the same reason. Task-number:QTBUG-7254 Reviewed-by:brad
Diffstat (limited to 'src/gui/widgets/qmenu.cpp')
-rw-r--r--src/gui/widgets/qmenu.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gui/widgets/qmenu.cpp b/src/gui/widgets/qmenu.cpp
index f9b132e..907dd14 100644
--- a/src/gui/widgets/qmenu.cpp
+++ b/src/gui/widgets/qmenu.cpp
@@ -1834,7 +1834,7 @@ void QMenu::popup(const QPoint &p, QAction *atAction)
QSize size = sizeHint();
QRect screen;
#ifndef QT_NO_GRAPHICSVIEW
- bool isEmbedded = d->nearestGraphicsProxyWidget(this);
+ bool isEmbedded = !bypassGraphicsProxyWidget(this) && d->nearestGraphicsProxyWidget(this);
if (isEmbedded)
screen = d->popupGeometry(this);
else