mirror of
https://github.com/libsdl-org/SDL.git
synced 2026-05-28 20:09:38 +08:00
wayland: Send mouse coordinates after warping
Currently, no compositor that supports the warp protocol sends a motion event after doing so, so SDL must synthesize one when using the warp protocol, as it did with the locking protocol. This can be avoided once https://gitlab.freedesktop.org/wayland/wayland/-/merge_requests/340 is completed.
This commit is contained in:
@@ -1238,12 +1238,12 @@ void Wayland_SeatWarpMouse(SDL_WaylandSeat *seat, SDL_WindowData *window, float
|
|||||||
if (update_grabs) {
|
if (update_grabs) {
|
||||||
Wayland_SeatUpdatePointerGrab(seat);
|
Wayland_SeatUpdatePointerGrab(seat);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* NOTE: There is a pending warp event under discussion that should replace this when available.
|
|
||||||
* https://gitlab.freedesktop.org/wayland/wayland/-/merge_requests/340
|
|
||||||
*/
|
|
||||||
SDL_SendMouseMotion(0, window->sdlwindow, seat->pointer.sdl_id, false, x, y);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* NOTE: There is a pending warp event under discussion that should replace this when available.
|
||||||
|
* https://gitlab.freedesktop.org/wayland/wayland/-/merge_requests/340
|
||||||
|
*/
|
||||||
|
SDL_SendMouseMotion(0, window->sdlwindow, seat->pointer.sdl_id, false, x, y);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user