diff options
author | Friedemann Kleint <Friedemann.Kleint@theqtcompany.com> | 2015-09-07 14:56:15 +0200 |
---|---|---|
committer | Friedemann Kleint <Friedemann.Kleint@theqtcompany.com> | 2015-09-22 06:19:31 +0000 |
commit | 28f251993a067a2e95ccaf3d295460489e8c6e30 (patch) | |
tree | c63d7badbf238c7d7dc852a28fcb600d5e17774a /src/plugins/platforms/windows/qwindowsmousehandler.cpp | |
parent | 1af2b861d8915cfa9fe2d79f6ebb2ae22749f37b (diff) |
Windows: Return accepted state of XBUTTON mouse events to the OS.
Qt needs to return false in case it does not handle the "extra"
buttons (like WM_XBUTTONDOWN) which causes Windows to send the
corresponding WM_APPCOMMAND message (like APPCOMMAND_BROWSER_FORWARD).
Task-number: QTBUG-48117
Change-Id: Id2c8005ee992b0abd8af2aacbcb97c4eedcfa32f
Reviewed-by: Andy Shaw <andy.shaw@theqtcompany.com>
Diffstat (limited to 'src/plugins/platforms/windows/qwindowsmousehandler.cpp')
-rw-r--r-- | src/plugins/platforms/windows/qwindowsmousehandler.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/plugins/platforms/windows/qwindowsmousehandler.cpp b/src/plugins/platforms/windows/qwindowsmousehandler.cpp index 200eb11855..4ab861a960 100644 --- a/src/plugins/platforms/windows/qwindowsmousehandler.cpp +++ b/src/plugins/platforms/windows/qwindowsmousehandler.cpp @@ -368,7 +368,10 @@ bool QWindowsMouseHandler::translateMouseEvent(QWindow *window, HWND hwnd, QWindowsKeyMapper::queryKeyboardModifiers(), source); m_previousCaptureWindow = hasCapture ? window : 0; - return true; + // QTBUG-48117, force synchronous handling for the extra buttons so that WM_APPCOMMAND + // is sent for unhandled WM_XBUTTONDOWN. + return (msg.message != WM_XBUTTONUP && msg.message != WM_XBUTTONDOWN && msg.message != WM_XBUTTONDBLCLK) + || QWindowSystemInterface::flushWindowSystemEvents(); } static bool isValidWheelReceiver(QWindow *candidate) |