Skip to content

Commit 6b1d6bf

Browse files
committed
wayland: Commit the confinement region upon creation
This may prevent the pointer from escaping small regions if moving quickly.
1 parent 266ee41 commit 6b1d6bf

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/video/wayland/SDL_waylandevents.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3366,6 +3366,9 @@ bool Wayland_input_confine_pointer(struct SDL_WaylandInput *input, SDL_Window *w
33663366
wl_region_destroy(confine_rect);
33673367
}
33683368

3369+
// Commit the double-buffered confinement region.
3370+
wl_surface_commit(w->surface);
3371+
33693372
w->confined_pointer = confined_pointer;
33703373
return true;
33713374
}

0 commit comments

Comments
 (0)