qemu-devel
[Top][All Lists]
Advanced

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

Re: [PATCH] gtk: Add show_menubar=on|off command line option.


From: Markus Armbruster
Subject: Re: [PATCH] gtk: Add show_menubar=on|off command line option.
Date: Tue, 27 Sep 2022 08:12:28 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux)

Please post revisions in a new thread (not in reply to anything), and
with a subject like [PATCH v2].  You can use "git format-patch -v2" to
get such subjects.

Bryce Mills <brycemills@proton.me> writes:

> The patch adds "show_menubar" command line option for GTK UI similar to
> "show_tabs". This option allows to hide menu bar initially, it still can
> be toggled by shortcut and other shortcuts still work.
>
> Signed-off-by: Bryce Mills <brycemills@proton.me>
> ---
>  qapi/ui.json    |  6 +++++-
>  qemu-options.hx |  3 +++
>  ui/gtk.c        | 15 ++++++++++-----
>  3 files changed, 18 insertions(+), 6 deletions(-)
>
> diff --git a/qapi/ui.json b/qapi/ui.json
> index 286c5731d1..cb252bdf86 100644
> --- a/qapi/ui.json
> +++ b/qapi/ui.json
> @@ -1200,12 +1200,16 @@
>  #               by default.
>  #               Since 7.1
>  #

Drop the blank line, please.

> +# @show-menubar:  Display the main window menubar. Defaults to "on".
> +#                 Since 8.0
> +#
>  # Since: 2.12
>  ##
>  { 'struct'  : 'DisplayGTK',
>    'data'    : { '*grab-on-hover' : 'bool',
>                  '*zoom-to-fit'   : 'bool',
> -                '*show-tabs'     : 'bool'  } }
> +                '*show-tabs'     : 'bool',
> +                '*show-menubar'  : 'bool'  } }
>  
>  ##
>  # @DisplayEGLHeadless:

With that done, QAPI schema
Acked-by: Markus Armbruster <armbru@redhat.com>

Two more remarks below.

> diff --git a/qemu-options.hx b/qemu-options.hx
> index d8b5ce5b43..62d3ce10bf 100644
> --- a/qemu-options.hx
> +++ b/qemu-options.hx
> @@ -1947,6 +1947,7 @@ DEF("display", HAS_ARG, QEMU_OPTION_display,
>  #if defined(CONFIG_GTK)
>      "-display gtk[,full-screen=on|off][,gl=on|off][,grab-on-hover=on|off]\n"
>      "            
> [,show-tabs=on|off][,show-cursor=on|off][,window-close=on|off]\n"
> +    "            [,show-menubar=on|off]\n"

Not this patch's fault: help neglects to explain the option parameters.

>  #endif
>  #if defined(CONFIG_VNC)
>      "-display vnc=<display>[,<optargs>]\n"
> @@ -2039,6 +2040,8 @@ SRST
>  
>          ``window-close=on|off`` : Allow to quit qemu with window close button
>  
> +        ``show-menubar=on|off`` : Display then main window menubar
> +

Please specify the default here as well.

>      ``curses[,charset=<encoding>]``
>          Display video output via curses. For graphics device models
>          which support a text mode, QEMU can display this output using a

[...]




reply via email to

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