From 58fc02241a96b18a1062f2495d40dcdc047a7d5c Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Tue, 6 Jan 2015 09:59:52 +0100 Subject: 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 --- src/plugins/platforms/windows/qwindowswindow.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/plugins/platforms/windows') 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); -- cgit v1.2.3