summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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 37c6fbe9f..9d675ae21 100644
--- a/src/client/qwaylandinputdevice.cpp
+++ b/src/client/qwaylandinputdevice.cpp
@@ -451,10 +451,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());
@@ -462,6 +458,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);