summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDmitry Kazakov <dimula73@gmail.com>2019-03-30 23:14:07 +0300
committerShawn Rutledge <shawn.rutledge@qt.io>2019-05-07 09:56:02 +0000
commit7e5b35935e0b85943de10ab80b54a4b77b3559b6 (patch)
treed23ab211b7f92055ad677847aa24e18c18a26935
parent43abe86e2f036bff9613ba4e10758213faa34ea9 (diff)
Fix generation of Leave events when using tablet devices
When both mouse and tablet events are handled by QWindowsPointerHandler, m_currentWindow variable is shared among the two event streams, therefore each stream should ensure it does equivalent operations, when changing it. Here we should subscribe to the Leave events, when we emit Enter event from the inside of the tablet events flow. Without whis subscription, the cursor may stuck in "resize" state when crossing the window's frame multiple times. Change-Id: I88df4a42ae86243e10ecd4a4cedf87639c96d169 Reviewed-by: Andre de la Rocha <andre.rocha@qt.io>
-rw-r--r--src/plugins/platforms/windows/qwindowspointerhandler.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/plugins/platforms/windows/qwindowspointerhandler.cpp b/src/plugins/platforms/windows/qwindowspointerhandler.cpp
index 9a8b5d5121..501b62e07a 100644
--- a/src/plugins/platforms/windows/qwindowspointerhandler.cpp
+++ b/src/plugins/platforms/windows/qwindowspointerhandler.cpp
@@ -614,6 +614,9 @@ bool QWindowsPointerHandler::translatePenEvent(QWindow *window, HWND hwnd, QtWin
if (m_needsEnterOnPointerUpdate) {
m_needsEnterOnPointerUpdate = false;
if (window != m_currentWindow) {
+ // make sure we subscribe to leave events for this window
+ trackLeave(hwnd);
+
QWindowSystemInterface::handleEnterEvent(window, localPos, globalPos);
m_currentWindow = window;
if (QWindowsWindow *wumPlatformWindow = QWindowsWindow::windowsWindowOf(target))