summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel/qwidget.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/kernel/qwidget.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/kernel/qwidget.cpp')
-rw-r--r--src/gui/kernel/qwidget.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gui/kernel/qwidget.cpp b/src/gui/kernel/qwidget.cpp
index 046bc7f..441e823 100644
--- a/src/gui/kernel/qwidget.cpp
+++ b/src/gui/kernel/qwidget.cpp
@@ -7322,7 +7322,7 @@ void QWidgetPrivate::hide_helper()
bool isEmbedded = false;
#if !defined QT_NO_GRAPHICSVIEW
- isEmbedded = q->isWindow() && nearestGraphicsProxyWidget(q->parentWidget()) != 0;
+ isEmbedded = q->isWindow() && !bypassGraphicsProxyWidget(q) && nearestGraphicsProxyWidget(q->parentWidget()) != 0;
#else
Q_UNUSED(isEmbedded);
#endif