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>
bb10
Friedemann Kleint 2015-01-06 09:59:52 +01:00
parent d74d0a3b30
commit 58fc02241a
1 changed files with 2 additions and 0 deletions

View File

@ -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);