Alexandros Frantzis (@afrantzis) commented about dlls/winewayland.drv/wayland_pointer.c:
wayland_set_cursor(hwnd, hcursor, TRUE);
}
+/***********************************************************************
WAYLAND_SetCursorPos
- */
+BOOL WAYLAND_SetCursorPos(INT x, INT y) +{
- struct wayland_pointer *pointer = &process_wayland.pointer;
- TRACE("warping to %d,%d\n", x, y);
- pthread_mutex_lock(&pointer->mutex);
- pointer->pending_warp = TRUE;
- pthread_mutex_unlock(&pointer->mutex);
- reapply_cursor_clipping();
I think it should be fine to skip warp emulation completely if relative motion is already enabled, since the emulation won't have any effect anyway.
This avoids the overhead of performing the cursor clipping (see https://gitlab.winehq.org/wine/wine/-/merge_requests/7352#note_95733) when our lock/relative-motion heuristics have kicked in.