mirror of https://github.com/proxmox/mirror_qemu
ui/sdl2: Fix broken -full-screen CLI option
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 <thuth@redhat.com> Message-id: 1531161850-6860-1-git-send-email-thuth@redhat.com Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>master
parent
006bf4641b
commit
6fb34ffcaa
|
@ -790,6 +790,8 @@ static void sdl2_display_init(DisplayState *ds, DisplayOptions *o)
|
||||||
memset(&info, 0, sizeof(info));
|
memset(&info, 0, sizeof(info));
|
||||||
SDL_VERSION(&info.version);
|
SDL_VERSION(&info.version);
|
||||||
|
|
||||||
|
gui_fullscreen = o->has_full_screen && o->full_screen;
|
||||||
|
|
||||||
for (i = 0;; i++) {
|
for (i = 0;; i++) {
|
||||||
QemuConsole *con = qemu_console_lookup_by_index(i);
|
QemuConsole *con = qemu_console_lookup_by_index(i);
|
||||||
if (!con) {
|
if (!con) {
|
||||||
|
@ -842,17 +844,14 @@ static void sdl2_display_init(DisplayState *ds, DisplayOptions *o)
|
||||||
g_free(filename);
|
g_free(filename);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (sdl2_console->opts->has_full_screen &&
|
gui_grab = 0;
|
||||||
sdl2_console->opts->full_screen) {
|
if (gui_fullscreen) {
|
||||||
gui_fullscreen = 1;
|
|
||||||
sdl_grab_start(0);
|
sdl_grab_start(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
mouse_mode_notifier.notify = sdl_mouse_mode_change;
|
mouse_mode_notifier.notify = sdl_mouse_mode_change;
|
||||||
qemu_add_mouse_mode_change_notifier(&mouse_mode_notifier);
|
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_hidden = SDL_CreateCursor(&data, &data, 8, 1, 0, 0);
|
||||||
sdl_cursor_normal = SDL_GetCursor();
|
sdl_cursor_normal = SDL_GetCursor();
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue