sdl: Initialize gui_fullscreen earlier during setup
authorJan Kiszka <jan.kiszka@siemens.com>
Sat, 30 Jul 2011 09:39:11 +0000 (11:39 +0200)
committerAnthony Liguori <aliguori@us.ibm.com>
Fri, 5 Aug 2011 15:57:35 +0000 (10:57 -0500)
This ensures that we actually enter full screen on startup when e.g.
'-vga none -full-screen' was specified.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
ui/sdl.c

index 80bf776104d23921940a4b445da6c141f3f0f2fd..f19bae2b27a155c67374669cc4f15074018abf01 100644 (file)
--- a/ui/sdl.c
+++ b/ui/sdl.c
@@ -891,6 +891,11 @@ void sdl_display_init(DisplayState *ds, int full_screen, int no_frame)
         qemu_free(filename);
     }
 
+    if (full_screen) {
+        gui_fullscreen = 1;
+        sdl_grab_start();
+    }
+
     dcl = qemu_mallocz(sizeof(DisplayChangeListener));
     dcl->dpy_update = sdl_update;
     dcl->dpy_resize = sdl_resize;
@@ -920,8 +925,4 @@ void sdl_display_init(DisplayState *ds, int full_screen, int no_frame)
     sdl_cursor_normal = SDL_GetCursor();
 
     atexit(sdl_cleanup);
-    if (full_screen) {
-        gui_fullscreen = 1;
-        sdl_grab_start();
-    }
 }