diff options
author | Shawn Rutledge <shawn.rutledge@qt.io> | 2020-06-29 15:57:23 +0200 |
---|---|---|
committer | Shawn Rutledge <shawn.rutledge@qt.io> | 2022-03-17 08:14:37 +0100 |
commit | fc1ec5cf4a34b210313eaa26bb0e0229007e58d6 (patch) | |
tree | 25e53d9a590f2088325558111f062ff0796b52f8 /src/quick/items | |
parent | 36ce76f787b57fd2096e7368c82df73ff09c05f8 (diff) |
Update the window cursor on mouse release
When a PointerHandler with a custom cursor deactivates, the cursor
wasn't restored until the next mouse move.
I was writing a test to ensure that there were no bugs analogous
to QTBUG-85303 with a handler that uses its active state to change
the cursor (unlike HoverHandler which changes it whenever the
mouse is hovering) and found this new bug.
Fixes: QTBUG-85325
Task-number: QTBUG-85303
Change-Id: I4ea8dbd267046c8e972e723cc491bd44bbbfd7f2
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit 8bd6342639721b7db08acf554c6bcd3e7ab04cb6)
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Diffstat (limited to 'src/quick/items')
-rw-r--r-- | src/quick/items/qquickwindow.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/quick/items/qquickwindow.cpp b/src/quick/items/qquickwindow.cpp index fd2b868c3b..18bf8212d1 100644 --- a/src/quick/items/qquickwindow.cpp +++ b/src/quick/items/qquickwindow.cpp @@ -2443,6 +2443,9 @@ void QQuickWindowPrivate::handleMouseEvent(QMouseEvent *event) Q_QUICK_INPUT_PROFILE(QQuickProfiler::Mouse, QQuickProfiler::InputMouseRelease, event->button(), event->buttons()); deliverPointerEvent(pointerEventInstance(event)); +#if QT_CONFIG(cursor) + updateCursor(event->windowPos()); +#endif break; case QEvent::MouseButtonDblClick: Q_QUICK_INPUT_PROFILE(QQuickProfiler::Mouse, QQuickProfiler::InputMouseDoubleClick, |