Patchwork [08/15] sdl: Initialize gui_fullscreen earlier during setup

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

Comments

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

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>
---
 ui/sdl.c |    9 +++++----
 1 files changed, 5 insertions(+), 4 deletions(-)

Patch

diff --git a/ui/sdl.c b/ui/sdl.c
index 80bf776..f19bae2 100644
--- 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();
-    }
 }