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>
This commit is contained in:
Miikka Heikkinen 2012-11-07 15:04:37 +02:00 committed by The Qt Project
parent 07ea3cf0b3
commit 5b52cb5b85

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)