diff options
author | Shawn Rutledge <shawn.rutledge@qt.io> | 2020-06-29 15:57:23 +0200 |
---|---|---|
committer | Shawn Rutledge <shawn.rutledge@qt.io> | 2020-06-30 09:08:23 +0200 |
commit | 8bd6342639721b7db08acf554c6bcd3e7ab04cb6 (patch) | |
tree | 9115fbfa5080edaa5efa5204ae11fe619b7f9a3a /src/quick | |
parent | b1493678fc295765ce93e565c5194e860e746436 (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.
Pick-to: 5.15
Fixes: QTBUG-85325
Task-number: QTBUG-85303
Change-Id: I4ea8dbd267046c8e972e723cc491bd44bbbfd7f2
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Diffstat (limited to 'src/quick')
-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 2b3f788201..afbd87c1c4 100644 --- a/src/quick/items/qquickwindow.cpp +++ b/src/quick/items/qquickwindow.cpp @@ -2583,6 +2583,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->scenePosition()); +#endif break; case QEvent::MouseButtonDblClick: Q_QUICK_INPUT_PROFILE(QQuickProfiler::Mouse, QQuickProfiler::InputMouseDoubleClick, |