Client: Fix incorrect enter serial in set_cursor

Change-Id: Ibeacc5218acbd6003b85811a175ed00fd62a4b51
Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
This commit is contained in:
Johan Klokkhammer Helsing 2018-11-20 12:23:51 +01:00 committed by Johan Helsing
parent 3684b83589
commit 29707d3476

View File

@ -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);