From 8bd6342639721b7db08acf554c6bcd3e7ab04cb6 Mon Sep 17 00:00:00 2001 From: Shawn Rutledge Date: Mon, 29 Jun 2020 15:57:23 +0200 Subject: 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 --- src/quick/items/qquickwindow.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/quick') 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, -- cgit v1.2.3