qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH] ui/sdl2: Fix broken -full-screen CLI option


From: Thomas Huth
Subject: Re: [Qemu-devel] [PATCH] ui/sdl2: Fix broken -full-screen CLI option
Date: Mon, 20 Aug 2018 20:17:58 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1

On 2018-07-09 20:44, Thomas Huth wrote:
> 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>
> ---
>  ui/sdl2.c | 9 ++++-----
>  1 file changed, 4 insertions(+), 5 deletions(-)
> 
> diff --git a/ui/sdl2.c b/ui/sdl2.c
> index 76e5942..01571dc 100644
> --- a/ui/sdl2.c
> +++ b/ui/sdl2.c
> @@ -792,6 +792,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) {
> @@ -844,17 +846,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();
>  
> 

Ping?

 Thomas



reply via email to

[Prev in Thread] Current Thread [Next in Thread]