[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 09/12] ui/sdl2: Fix broken -full-screen CLI option
From: |
Gerd Hoffmann |
Subject: |
[Qemu-devel] [PULL 09/12] ui/sdl2: Fix broken -full-screen CLI option |
Date: |
Mon, 27 Aug 2018 10:53:17 +0200 |
From: Thomas Huth <address@hidden>
We've got to set the gui_fullscreen variable before creating the
SDL2 window, otherwise the initial window will not be created in
fullscreen mode.
Buglink: https://bugs.launchpad.net/bugs/1780812
Signed-off-by: Thomas Huth <address@hidden>
Message-id: address@hidden
Signed-off-by: Gerd Hoffmann <address@hidden>
---
ui/sdl2.c | 9 ++++-----
1 file changed, 4 insertions(+), 5 deletions(-)
diff --git a/ui/sdl2.c b/ui/sdl2.c
index 755a7134ff..0a9a18a964 100644
--- a/ui/sdl2.c
+++ b/ui/sdl2.c
@@ -790,6 +790,8 @@ static void sdl2_display_init(DisplayState *ds,
DisplayOptions *o)
memset(&info, 0, sizeof(info));
SDL_VERSION(&info.version);
+ gui_fullscreen = o->has_full_screen && o->full_screen;
+
for (i = 0;; i++) {
QemuConsole *con = qemu_console_lookup_by_index(i);
if (!con) {
@@ -842,17 +844,14 @@ static void sdl2_display_init(DisplayState *ds,
DisplayOptions *o)
g_free(filename);
}
- if (sdl2_console->opts->has_full_screen &&
- sdl2_console->opts->full_screen) {
- gui_fullscreen = 1;
+ gui_grab = 0;
+ if (gui_fullscreen) {
sdl_grab_start(0);
}
mouse_mode_notifier.notify = sdl_mouse_mode_change;
qemu_add_mouse_mode_change_notifier(&mouse_mode_notifier);
- gui_grab = 0;
-
sdl_cursor_hidden = SDL_CreateCursor(&data, &data, 8, 1, 0, 0);
sdl_cursor_normal = SDL_GetCursor();
--
2.9.3
- [Qemu-devel] [PULL 00/12] Ui 20180827 v4 patches, Gerd Hoffmann, 2018/08/27
- [Qemu-devel] [PULL 08/12] spice-display: fix qemu_spice_cursor_refresh_bh locking, Gerd Hoffmann, 2018/08/27
- [Qemu-devel] [PULL 10/12] ui/vnc: Remove useless parenthesis around DIV_ROUND_UP macro, Gerd Hoffmann, 2018/08/27
- [Qemu-devel] [PULL 02/12] vnc: fix memleak of the "vnc-worker-output" name, Gerd Hoffmann, 2018/08/27
- [Qemu-devel] [PULL 01/12] ui/sdl2: Remove the obsolete SDL_INIT_NOPARACHUTE flag, Gerd Hoffmann, 2018/08/27
- [Qemu-devel] [PULL 05/12] doc: switch to modern syntax for VNC TLS setup, Gerd Hoffmann, 2018/08/27
- [Qemu-devel] [PULL 03/12] ui: use enum to string helpers, Gerd Hoffmann, 2018/08/27
- [Qemu-devel] [PULL 07/12] spice-display: access ptr_x/ptr_y under Mutex, Gerd Hoffmann, 2018/08/27
- [Qemu-devel] [PULL 06/12] vnc: remove support for deprecated tls, x509, x509verify options, Gerd Hoffmann, 2018/08/27
- [Qemu-devel] [PULL 11/12] dmabuf: add y0_top, pass it to spice, Gerd Hoffmann, 2018/08/27
- [Qemu-devel] [PULL 09/12] ui/sdl2: Fix broken -full-screen CLI option,
Gerd Hoffmann <=
- [Qemu-devel] [PULL 12/12] util: promote qemu_egl_rendernode_open() to libqemuutil, Gerd Hoffmann, 2018/08/27
- [Qemu-devel] [PULL 04/12] sdl2: redraw correctly when scanout_mode enabled., Gerd Hoffmann, 2018/08/27
- Re: [Qemu-devel] [PULL 00/12] Ui 20180827 v4 patches, Peter Maydell, 2018/08/27