diff options
author | Andre de la Rocha <andre.rocha@qt.io> | 2018-10-30 17:58:17 +0100 |
---|---|---|
committer | Jani Heikkinen <jani.heikkinen@qt.io> | 2018-11-08 04:09:15 +0000 |
commit | 35069301f048eed21a27f89b6495d56c44f2b55d (patch) | |
tree | 434f37de6439c3d966249eead3b807bc3dc4a08d /src/plugins/platforms/windows/qwindowspointerhandler.h | |
parent | 1dd6433b19b51f4c43a7f3c34314cc50edaeda34 (diff) |
Windows QPA: Fix incorrect button state reporting for touchpad
The current state of (emulated) mouse buttons was being incorrectly
reported for touchpad events under some conditions. In the handling
of pointer messages, GetAsyncKeyState() was being used to retrieve the
mouse button state. However, it does not seem to work always with all
touchpads. Furthermore, its use is not necessary, since the button
state information comes as a set of flags with the pointer message
itself. This change makes the handler use these flags instead.
Fixes: QTBUG-71470
Change-Id: Ie2e35bd80778ef74db672604a0f2af659785efbf
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Diffstat (limited to 'src/plugins/platforms/windows/qwindowspointerhandler.h')
-rw-r--r-- | src/plugins/platforms/windows/qwindowspointerhandler.h | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/src/plugins/platforms/windows/qwindowspointerhandler.h b/src/plugins/platforms/windows/qwindowspointerhandler.h index c4d0e0ce4a..3861ebf919 100644 --- a/src/plugins/platforms/windows/qwindowspointerhandler.h +++ b/src/plugins/platforms/windows/qwindowspointerhandler.h @@ -61,7 +61,6 @@ public: bool translateMouseEvent(QWindow *window, HWND hwnd, QtWindows::WindowsEventType et, MSG msg, LRESULT *result); QTouchDevice *touchDevice() const { return m_touchDevice; } QTouchDevice *ensureTouchDevice(); - Qt::MouseButtons queryMouseButtons(); QWindow *windowUnderMouse() const { return m_windowUnderPointer.data(); } void clearWindowUnderMouse() { m_windowUnderPointer = nullptr; } |