Fix autocapture for doubleclick in Windows

Holding down the second click of a doubleclick should also autocapture
the mouse like it does in Qt4.

Task-number: QTBUG-27863
Change-Id: I38c0567eca9fd7dcd3ef3d17921db5ebd3fe18b1
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
bb10
Miikka Heikkinen 2012-11-07 15:04:37 +02:00 committed by The Qt Project
parent 07ea3cf0b3
commit 5b52cb5b85
1 changed files with 2 additions and 1 deletions

View File

@ -222,7 +222,8 @@ bool QWindowsMouseHandler::translateMouseEvent(QWindow *window, HWND hwnd,
// any button press until release.
if (!platformWindow->hasMouseCapture()
&& (msg.message == WM_LBUTTONDOWN || msg.message == WM_MBUTTONDOWN
|| msg.message == WM_RBUTTONDOWN)) {
|| msg.message == WM_RBUTTONDOWN || msg.message == WM_LBUTTONDBLCLK
|| msg.message == WM_MBUTTONDBLCLK || msg.message == WM_RBUTTONDBLCLK )) {
platformWindow->setMouseGrabEnabled(true);
platformWindow->setFlag(QWindowsWindow::AutoMouseCapture);
if (QWindowsContext::verboseEvents)