Closing of popups in QWidgetWindow.

This commit is contained in:
Samuel Rødal 2011-05-04 14:35:24 +02:00
parent 4cc4cb3c51
commit e6af684ee4
2 changed files with 5 additions and 1 deletions

View File

@ -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;

View File

@ -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;