From 7c3ecf85a770cd7fef01ece935f88d8894de09b2 Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Thu, 3 May 2018 11:03:16 +0200 Subject: Windows QPA: Fix left button reported pressed after moving windows When moving a window by dragging the title bar, no WM_NCLBUTTONUP is received after WM_NCLBUTTONDOWN, WM_NCMOUSEMOVE (due to internal mouse capture), which can leave the left mouse button 'pressed' in QGuiApplication's state. Intercept WM_EXITSIZEMOVE to sync the buttons. Complements 45894408913f62f6f25a302d8ed07af57ac7db5d. Change-Id: I94d18d1d4a4796dcecb1a9731809d05c7f9ddd65 Reviewed-by: Andre de la Rocha Reviewed-by: Oliver Wolff --- src/plugins/platforms/windows/qwindowscontext.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'src/plugins/platforms/windows/qwindowscontext.cpp') diff --git a/src/plugins/platforms/windows/qwindowscontext.cpp b/src/plugins/platforms/windows/qwindowscontext.cpp index 98a4b261fd..2def926409 100644 --- a/src/plugins/platforms/windows/qwindowscontext.cpp +++ b/src/plugins/platforms/windows/qwindowscontext.cpp @@ -1093,6 +1093,7 @@ bool QWindowsContext::windowsProc(HWND hwnd, UINT message, case QtWindows::ExitSizeMoveEvent: platformWindow->clearFlag(QWindowsWindow::ResizeMoveActive); platformWindow->checkForScreenChanged(); + QWindowsMouseHandler::handleExitSizeMove(platformWindow->window()); return true; case QtWindows::ScrollEvent: return sessionManagerInteractionBlocked() || d->m_mouseHandler.translateScrollEvent(platformWindow->window(), hwnd, msg, result); -- cgit v1.2.3