Patchwork [10/15] sdl: Never release input while in full screen mode

login
register
mail settings
Submitter Jan Kiszka
Date July 30, 2011, 9:39 a.m.
Message ID <55ed6997971adb3c65061f66b8b66113d549a91e.1312018756.git.jan.kiszka@web.de>
Download mbox | patch
Permalink /patch/107485/
State New
Headers show

Comments

Jan Kiszka - July 30, 2011, 9:39 a.m.
From: Jan Kiszka <jan.kiszka@siemens.com>

It's confusing to suddenly find two mice in full screen mode when
switching consoles or accidentally hitting the grab hot keys.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
---
 ui/sdl.c |    7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

Patch

diff --git a/ui/sdl.c b/ui/sdl.c
index 27465b2..662ffef 100644
--- a/ui/sdl.c
+++ b/ui/sdl.c
@@ -626,9 +626,10 @@  static void sdl_refresh(DisplayState *ds)
                         reset_keys();
                         console_select(keycode - 0x02);
                         if (!is_graphic_console()) {
-                            /* display grab if going to a text console */
-                            if (gui_grab)
+                            /* release grab if going to a text console */
+                            if (gui_grab && !gui_fullscreen) {
                                 sdl_grab_end();
+                            }
                         }
                         gui_keysym = 1;
                         break;
@@ -694,7 +695,7 @@  static void sdl_refresh(DisplayState *ds)
                                     SDL_GetAppState() & SDL_APPACTIVE) {
                                     sdl_grab_start();
                                 }
-                            } else {
+                            } else if (!gui_fullscreen) {
                                 sdl_grab_end();
                             }
                             /* SDL does not send back all the