From 6b1d6bfbe778acedede1efc417944a869d0ccb18 Mon Sep 17 00:00:00 2001 From: Frank Praznik Date: Sun, 30 Mar 2025 14:33:32 -0400 Subject: [PATCH] wayland: Commit the confinement region upon creation This may prevent the pointer from escaping small regions if moving quickly. --- src/video/wayland/SDL_waylandevents.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/video/wayland/SDL_waylandevents.c b/src/video/wayland/SDL_waylandevents.c index a392c6e310..7d907a28a1 100644 --- a/src/video/wayland/SDL_waylandevents.c +++ b/src/video/wayland/SDL_waylandevents.c @@ -3366,6 +3366,9 @@ bool Wayland_input_confine_pointer(struct SDL_WaylandInput *input, SDL_Window *w wl_region_destroy(confine_rect); } + // Commit the double-buffered confinement region. + wl_surface_commit(w->surface); + w->confined_pointer = confined_pointer; return true; }