summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorQt Forward Merge Bot <qt_forward_merge_bot@qt-project.org>2018-11-24 03:00:23 +0100
committerQt Forward Merge Bot <qt_forward_merge_bot@qt-project.org>2018-11-24 03:00:23 +0100
commita214aae8871952302055ae19b8e9f1d7397d88c1 (patch)
treec7db48b7e39f3cd8b6346df564dbf733c87d837f /src
parent91a94157d4245b7973ee117b7de5c44a10d3a457 (diff)
parentf563e0e196d74d0884b4e599729e36f9f172f0e2 (diff)
Merge remote-tracking branch 'origin/5.12' into dev
Diffstat (limited to 'src')
-rw-r--r--src/client/qwaylandinputdevice.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/client/qwaylandinputdevice.cpp b/src/client/qwaylandinputdevice.cpp
index 8f90a81a4..e35c83ae8 100644
--- a/src/client/qwaylandinputdevice.cpp
+++ b/src/client/qwaylandinputdevice.cpp
@@ -453,10 +453,6 @@ void QWaylandInputDevice::Pointer::pointer_enter(uint32_t serial, struct wl_surf
return;
QWaylandWindow *window = QWaylandWindow::fromWlSurface(surface);
-#if QT_CONFIG(cursor)
- window->window()->setCursor(window->window()->cursor());
-#endif
-
mFocus = window;
mSurfacePos = QPointF(wl_fixed_to_double(sx), wl_fixed_to_double(sy));
mGlobalPos = window->window()->mapToGlobal(mSurfacePos.toPoint());
@@ -464,6 +460,11 @@ void QWaylandInputDevice::Pointer::pointer_enter(uint32_t serial, struct wl_surf
mParent->mSerial = serial;
mEnterSerial = serial;
+#if QT_CONFIG(cursor)
+ // Depends on mEnterSerial being updated
+ window->window()->setCursor(window->window()->cursor());
+#endif
+
QWaylandWindow *grab = QWaylandWindow::mouseGrab();
if (!grab) {
EnterEvent evt(mSurfacePos, mGlobalPos);