Skip to contentSkip to conversation

sdl: Don't release input on mouse mode change in full-screen mode

PATCH Applied Jan Kiszka 2 participants 2 messages Aug 22, 2011

lore
Share & tools
lore

Jan Kiszka

author
#0 lore raw

PATCH 1/1 sdl: Don't release input on mouse mode change in full-screen mode

While in full-screen mode, the input focus naturally belongs to the SDL window. Avoid dropping it when switching from absolute to relative mouse mode.

---
 ui/sdl.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)
ui/sdl.c +3 -1
index 385cc91..c7aaedf 100644
@@ -491,7 +491,9 @@ static void sdl_mouse_mode_change(Notifier *notify, void *data)
             absolute_enabled = 1;
         }
     } else if (absolute_enabled) {
-        sdl_grab_end();
+        if (!gui_fullscreen) {
+            sdl_grab_end();
+        }
         absolute_enabled = 0;
     }
 }
Signature · 1 line
1.7.3.4
#1 lore raw
Quoted 5 lines · Jan Kiszka

While in full-screen mode, the input focus naturally belongs to the SDL window. Avoid dropping it when switching from absolute to relative mouse mode.

Applied. Thanks.

Regards,

Anthony Liguori

Quoted 19 lines
---
  ui/sdl.c |    4 +++-
  1 files changed, 3 insertions(+), 1 deletions(-)
ui/sdl.c +3 -1
index 385cc91..c7aaedf 100644
@@ -491,7 +491,9 @@ static void sdl_mouse_mode_change(Notifier *notify, void *data)
              absolute_enabled = 1;
          }
      } else if (absolute_enabled) {
-        sdl_grab_end();
+        if (!gui_fullscreen) {
+            sdl_grab_end();
+        }
          absolute_enabled = 0;
      }
  }