qemu-devel
[Top][All Lists]
Advanced

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

Re: [PATCH 1/1] ui/gtk: Added a no-input mode


From: Daniel P . Berrangé
Subject: Re: [PATCH 1/1] ui/gtk: Added a no-input mode
Date: Tue, 18 Apr 2023 09:17:33 +0100
User-agent: Mutt/2.2.9 (2022-11-12)

On Mon, Apr 17, 2023 at 11:02:00PM +0000, Singh, Satyeshwar wrote:
> In a multi-seat scenario where multiple keyboards and mice are connected
> to the host but some are dedicated for the guests only (through pass
> through mode) and some are only for the host, there is a strong use case
> where a customer does not want a HID device connected to the host to be
> able to control the guest.
> In such a scenario, neither should we bind any input events to Qemu UI,
> nor should we show menu options like "Grab on Hover" or "Grab Input".
> This patch adds a GTK command line option called "no-input".
> It can be set like this:
>   gtk,no-input=off/on
> 
> If set to off or completely left out, it will default to normal
> operation where host HID devices can control the guests. However, if
> turned on, then host HID devices will not be able to control the guest
> windows.
> 
> Signed-off-by: Satyeshwar Singh <satyeshwar.singh@intel.com>
> Cc: Dongwon Kim <dongwon.kim@intel.com>
> Cc: Vivek Kasireddy <vivek.kasireddy@intel.com>
> Cc: Gerd Hoffmann <kraxel@redhat.com>
> Cc: Marc-André Lureau <marcandre.lureau@redhat.com>
> ---
>  qapi/ui.json    |  5 ++++-
>  qemu-options.hx |  4 +++-
>  ui/gtk.c        | 39 +++++++++++++++++++++++++++------------
>  3 files changed, 34 insertions(+), 14 deletions(-)
> 
> diff --git a/qapi/ui.json b/qapi/ui.json
> index 98322342f7..cd3ef4678e 100644
> --- a/qapi/ui.json
> +++ b/qapi/ui.json
> @@ -1214,6 +1214,8 @@
>  #               Since 7.1
>  # @show-menubar: Display the main window menubar. Defaults to "on".
>  #                Since 8.0
> +# @no-input: Don't let host's HID devices control the guest. Defaults to 
> "off".
> +#                Since 8.0
>  #
>  # Since: 2.12
>  ##
> @@ -1221,7 +1223,8 @@
>    'data'    : { '*grab-on-hover' : 'bool',
>                  '*zoom-to-fit'   : 'bool',
>                  '*show-tabs'     : 'bool',
> -                '*show-menubar'  : 'bool'  } }
> +                '*show-menubar'  : 'bool',
> +                '*no-input'      : 'bool'  } }

We don't generally like negative boolean options.

IOW, we would prefer '*input':  'bool'  with the default being
'on' if omitted, of course.

With regards,
Daniel
-- 
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|




reply via email to

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