Просмотр исходного кода

wayland: Commit the confinement region upon creation

This may prevent the pointer from escaping small regions if moving quickly.

(cherry picked from commit 6b1d6bfbe778acedede1efc417944a869d0ccb18)
Frank Praznik 11 месяцев назад
Родитель
Сommit
3f059376ac
1 измененных файлов с 3 добавлено и 0 удалено
  1. 3 0
      src/video/wayland/SDL_waylandevents.c

+ 3 - 0
src/video/wayland/SDL_waylandevents.c

@@ -3358,6 +3358,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;
 }