Browse Source

wayland: Disable warp emulation when restoring cursor visibility with the shape protocol

(cherry picked from commit 67f3a3ee54b7c7e0945525408437f65f807ca8ba)
Frank Praznik 11 months ago
parent
commit
a25a5a243c
1 changed files with 7 additions and 0 deletions
  1. 7 0
      src/video/wayland/SDL_waylandmouse.c

+ 7 - 0
src/video/wayland/SDL_waylandmouse.c

@@ -605,7 +605,14 @@ static int Wayland_ShowCursor(SDL_Cursor *cursor)
         if (!data->shm_data) {
             if (input->cursor_shape) {
                 Wayland_SetSystemCursorShape(input, data->system_cursor);
+
                 input->cursor_visible = SDL_TRUE;
+
+                if (input->relative_mode_override) {
+                    Wayland_input_unlock_pointer(input);
+                    input->relative_mode_override = SDL_FALSE;
+                }
+
                 return 0;
             } else if (!wayland_get_system_cursor(d, data, &scale)) {
                 return -1;