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:
parent
3684b83589
commit
29707d3476
@ -451,10 +451,6 @@ void QWaylandInputDevice::Pointer::pointer_enter(uint32_t serial, struct wl_surf
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
QWaylandWindow *window = QWaylandWindow::fromWlSurface(surface);
|
QWaylandWindow *window = QWaylandWindow::fromWlSurface(surface);
|
||||||
#if QT_CONFIG(cursor)
|
|
||||||
window->window()->setCursor(window->window()->cursor());
|
|
||||||
#endif
|
|
||||||
|
|
||||||
mFocus = window;
|
mFocus = window;
|
||||||
mSurfacePos = QPointF(wl_fixed_to_double(sx), wl_fixed_to_double(sy));
|
mSurfacePos = QPointF(wl_fixed_to_double(sx), wl_fixed_to_double(sy));
|
||||||
mGlobalPos = window->window()->mapToGlobal(mSurfacePos.toPoint());
|
mGlobalPos = window->window()->mapToGlobal(mSurfacePos.toPoint());
|
||||||
@ -462,6 +458,11 @@ void QWaylandInputDevice::Pointer::pointer_enter(uint32_t serial, struct wl_surf
|
|||||||
mParent->mSerial = serial;
|
mParent->mSerial = serial;
|
||||||
mEnterSerial = serial;
|
mEnterSerial = serial;
|
||||||
|
|
||||||
|
#if QT_CONFIG(cursor)
|
||||||
|
// Depends on mEnterSerial being updated
|
||||||
|
window->window()->setCursor(window->window()->cursor());
|
||||||
|
#endif
|
||||||
|
|
||||||
QWaylandWindow *grab = QWaylandWindow::mouseGrab();
|
QWaylandWindow *grab = QWaylandWindow::mouseGrab();
|
||||||
if (!grab) {
|
if (!grab) {
|
||||||
EnterEvent evt(mSurfacePos, mGlobalPos);
|
EnterEvent evt(mSurfacePos, mGlobalPos);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user