summaryrefslogtreecommitdiffstats
path: root/src/widgets
diff options
context:
space:
mode:
authorAlexander Volkov <a.volkov@rusbitech.ru>2015-03-19 14:51:53 +0300
committerAlexander Volkov <a.volkov@rusbitech.ru>2015-03-25 11:33:45 +0000
commit738c07542a0bbf867661520559fed9feda985935 (patch)
treec4dcbbc900e013e1b27b89ec88aaa6948c8ba860 /src/widgets
parent722f9f947734805919aa955153b3c838f91120e8 (diff)
Don't replay mouse press event which closes a popup on X11
Add a new style hint to QPlatformIntegration: ReplayMousePressOutsidePopup. Return false for it in the xcb plugin. This commit restores the behavior which was in Qt 4. Task-number: QTBUG-34814 Change-Id: I19fee762395a51475cc67b52b368c70679ca736b Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
Diffstat (limited to 'src/widgets')
-rw-r--r--src/widgets/kernel/qwidgetwindow.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/widgets/kernel/qwidgetwindow.cpp b/src/widgets/kernel/qwidgetwindow.cpp
index 12f5d4b8b0..ba8c16e838 100644
--- a/src/widgets/kernel/qwidgetwindow.cpp
+++ b/src/widgets/kernel/qwidgetwindow.cpp
@@ -465,7 +465,8 @@ void QWidgetWindow::handleMouseEvent(QMouseEvent *event)
}
if (qApp->activePopupWidget() != activePopupWidget
- && qt_replay_popup_mouse_event) {
+ && qt_replay_popup_mouse_event
+ && QGuiApplicationPrivate::platformIntegration()->styleHint(QPlatformIntegration::ReplayMousePressOutsidePopup).toBool()) {
if (m_widget->windowType() != Qt::Popup)
qt_button_down = 0;
if (event->type() == QEvent::MouseButtonPress) {