From 738c07542a0bbf867661520559fed9feda985935 Mon Sep 17 00:00:00 2001 From: Alexander Volkov Date: Thu, 19 Mar 2015 14:51:53 +0300 Subject: 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 --- src/widgets/kernel/qwidgetwindow.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/widgets/kernel/qwidgetwindow.cpp') 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) { -- cgit v1.2.3