summaryrefslogtreecommitdiffstats
path: root/src/plugins
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@theqtcompany.com>2015-01-06 09:59:52 +0100
committerFriedemann Kleint <Friedemann.Kleint@theqtcompany.com>2015-01-07 09:17:41 +0100
commit58fc02241a96b18a1062f2495d40dcdc047a7d5c (patch)
treec25c769dfb36269625410eabb73ff12f1d9b636b /src/plugins
parentd74d0a3b304b32f793cfd745c632c404a1c39b42 (diff)
Windows: Release mouse capture when window is blocked by modal window.
The capture needs to be cleared when for example a modal dialog is opened from a timer slot or similar while moving the window. Task-number: QTBUG-43308 Change-Id: Id0c01080d67d1057004a7f85b037dce5e220de42 Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
Diffstat (limited to 'src/plugins')
-rw-r--r--src/plugins/platforms/windows/qwindowswindow.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/plugins/platforms/windows/qwindowswindow.cpp b/src/plugins/platforms/windows/qwindowswindow.cpp
index 7d67aa0d09..4df27faf81 100644
--- a/src/plugins/platforms/windows/qwindowswindow.cpp
+++ b/src/plugins/platforms/windows/qwindowswindow.cpp
@@ -1770,6 +1770,8 @@ void QWindowsWindow::windowEvent(QEvent *event)
case QEvent::WindowBlocked: // Blocked by another modal window.
setEnabled(false);
setFlag(BlockedByModal);
+ if (hasMouseCapture())
+ ReleaseCapture();
break;
case QEvent::WindowUnblocked:
setEnabled(true);