summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/gui/kernel/qwidget.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/gui/kernel/qwidget.cpp b/src/gui/kernel/qwidget.cpp
index ac75b9e..43fe26c 100644
--- a/src/gui/kernel/qwidget.cpp
+++ b/src/gui/kernel/qwidget.cpp
@@ -8374,6 +8374,17 @@ bool QWidget::event(QEvent *event)
case QEvent::MouseButtonDblClick:
mouseDoubleClickEvent((QMouseEvent*)event);
break;
+
+ case QEvent::NonClientAreaMouseButtonPress: {
+ QWidget* w;
+ while ((w = QApplication::activePopupWidget()) && w != this) {
+ w->close();
+ if (QApplication::activePopupWidget() == w) // widget does not want to disappear
+ w->hide(); // hide at least
+ }
+ break;
+ }
+
#ifndef QT_NO_WHEELEVENT
case QEvent::Wheel:
wheelEvent((QWheelEvent*)event);