summaryrefslogtreecommitdiff
path: root/ui/sdl.c
diff options
context:
space:
mode:
authorJan Kiszka <jan.kiszka@siemens.com>2011-07-30 11:39:13 +0200
committerAnthony Liguori <aliguori@us.ibm.com>2011-08-05 10:57:35 -0500
commitf623d885480b7899a445c9ef7aaa95db52820bc1 (patch)
tree951df522a5efc3d5433087c644728b54dd814c05 /ui/sdl.c
parentf85581004c140c09936bc63f3744a287216aa76d (diff)
sdl: Never release input while in full screen mode
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> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'ui/sdl.c')
-rw-r--r--ui/sdl.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/ui/sdl.c b/ui/sdl.c
index 27465b2b7d..662ffef46d 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