aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick
diff options
context:
space:
mode:
authorAndy Shaw <andy.shaw@qt.io>2019-02-22 13:27:33 +0100
committerAndy Shaw <andy.shaw@qt.io>2019-02-25 07:25:18 +0000
commite622e069c9b0928e09a8b6fef15168407a4d995a (patch)
tree2a008f2eaee3e3cf6359641f31197c5d294f2c49 /src/quick
parent3ad752e1c16a3d37a71c5a7527c7e67cc333cdd2 (diff)
Update the cursor when the window is entered
When a window is entered, due to another window being hidden, then it is possible that the item under the mouse has a different cursor than the one previously set for that window. Since there will not be a mouse move at this point yet, then we should update the cursor right away. Change-Id: I2ef3c72617ae5c995a4daf7daef1ba3311fdcc12 Fixes: QTBUG-41045 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io> Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Diffstat (limited to 'src/quick')
-rw-r--r--src/quick/items/qquickwindow.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/quick/items/qquickwindow.cpp b/src/quick/items/qquickwindow.cpp
index 61c8bcc1e7..fa5d64d7be 100644
--- a/src/quick/items/qquickwindow.cpp
+++ b/src/quick/items/qquickwindow.cpp
@@ -1614,6 +1614,7 @@ bool QQuickWindow::event(QEvent *e)
bool delivered = d->deliverHoverEvent(d->contentItem, enter->windowPos(), d->lastMousePosition,
QGuiApplication::keyboardModifiers(), 0L, accepted);
enter->setAccepted(accepted);
+ d->updateCursor(mapFromGlobal(QCursor::pos()));
return delivered;
}
break;