From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:51895) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XP8RC-00089V-5V for qemu-devel@nongnu.org; Wed, 03 Sep 2014 07:09:27 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XP8R3-0001Yx-5K for qemu-devel@nongnu.org; Wed, 03 Sep 2014 07:09:18 -0400 Received: from mail-wi0-x234.google.com ([2a00:1450:400c:c05::234]:48751) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XP8NT-0000u1-9L for qemu-devel@nongnu.org; Wed, 03 Sep 2014 07:05:27 -0400 Received: by mail-wi0-f180.google.com with SMTP id ex7so9570519wid.13 for ; Wed, 03 Sep 2014 04:05:26 -0700 (PDT) From: Juan RP Date: Wed, 3 Sep 2014 13:05:08 +0200 Message-Id: <1409742308-22001-1-git-send-email-xtraeme@gmail.com> Subject: [Qemu-devel] [PATCH] ui/sdl2: fix full screen initialization. List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Juan RP gui_fullscreen was not initialized before creating the window with SDL_CreateWindow(). Move initialization a bit early to fix the issue. Signed-off-by: Juan RP --- ui/sdl2.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/ui/sdl2.c b/ui/sdl2.c index fcac87b..04ffda3 100644 --- a/ui/sdl2.c +++ b/ui/sdl2.c @@ -867,6 +867,11 @@ void sdl_display_init(DisplayState *ds, int full_screen, int no_frame) exit(1); } + if (full_screen) { + gui_fullscreen = 1; + sdl_grab_start(0); + } + for (i = 0;; i++) { QemuConsole *con = qemu_console_lookup_by_index(i); if (!con) { @@ -898,11 +903,6 @@ void sdl_display_init(DisplayState *ds, int full_screen, int no_frame) g_free(filename); } - if (full_screen) { - gui_fullscreen = 1; - sdl_grab_start(0); - } - mouse_mode_notifier.notify = sdl_mouse_mode_change; qemu_add_mouse_mode_change_notifier(&mouse_mode_notifier); -- 2.1.0