diff options
author | Samuel Rødal <samuel.rodal@nokia.com> | 2011-05-04 14:35:24 +0200 |
---|---|---|
committer | Samuel Rødal <samuel.rodal@nokia.com> | 2011-05-04 14:35:36 +0200 |
commit | e6af684ee48ef44befb3fedaecbe417eaf049b4f (patch) | |
tree | 44561211b0f4eac929c24f3ad4fbaf9eb0c99b2f /src/gui | |
parent | 4cc4cb3c51b118728b65f61b900459a38b885f2b (diff) |
Closing of popups in QWidgetWindow.
Diffstat (limited to 'src/gui')
-rw-r--r-- | src/gui/kernel/qapplication.h | 1 | ||||
-rw-r--r-- | src/gui/kernel/qwidgetwindow_qpa.cpp | 5 |
2 files changed, 5 insertions, 1 deletions
diff --git a/src/gui/kernel/qapplication.h b/src/gui/kernel/qapplication.h index b045dc3788..fc0ab644a0 100644 --- a/src/gui/kernel/qapplication.h +++ b/src/gui/kernel/qapplication.h @@ -389,6 +389,7 @@ private: friend class QGraphicsScenePrivate; friend class QWidget; friend class QWidgetPrivate; + friend class QWidgetWindow; friend class QETWidget; friend class Q3AccelManager; friend class QTranslator; diff --git a/src/gui/kernel/qwidgetwindow_qpa.cpp b/src/gui/kernel/qwidgetwindow_qpa.cpp index 3e062892fa..e02c2cf639 100644 --- a/src/gui/kernel/qwidgetwindow_qpa.cpp +++ b/src/gui/kernel/qwidgetwindow_qpa.cpp @@ -112,7 +112,10 @@ void QWidgetWindow::handleMouseEvent(QMouseEvent *event) // which child should have it? QWidget *widget = m_implicit_mouse_grabber ? m_implicit_mouse_grabber.data() : m_widget->childAt(event->pos()); - // TODO: make sure mouse release is delivered to same widget that got the press event + if (qApp->d_func()->inPopupMode()) { + widget = qApp->activePopupWidget(); + m_implicit_mouse_grabber.clear(); + } if (!widget) widget = m_widget; |