All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Daniel P. Berrangé" <berrange@redhat.com>
To: "Singh, Satyeshwar" <satyeshwar.singh@intel.com>
Cc: "qemu-devel@nongnu.org" <qemu-devel@nongnu.org>,
	"Kasireddy, Vivek" <vivek.kasireddy@intel.com>,
	"Kim, Dongwon" <dongwon.kim@intel.com>,
	"kraxel@redhat.com" <kraxel@redhat.com>,
	"marcandre.lureau@redhat.com" <marcandre.lureau@redhat.com>
Subject: Re: [PATCH 1/1] ui/gtk: Added a no-input mode
Date: Tue, 18 Apr 2023 09:17:33 +0100	[thread overview]
Message-ID: <ZD5SHSIkmfSxRWuc@redhat.com> (raw)
In-Reply-To: <MW3PR11MB46848D06ADD48751C810EE769F9C9@MW3PR11MB4684.namprd11.prod.outlook.com>

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	other threads:[~2023-04-18  8:18 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-17 23:02 [PATCH 1/1] ui/gtk: Added a no-input mode Singh, Satyeshwar
2023-04-18  8:17 ` Daniel P. Berrangé [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ZD5SHSIkmfSxRWuc@redhat.com \
    --to=berrange@redhat.com \
    --cc=dongwon.kim@intel.com \
    --cc=kraxel@redhat.com \
    --cc=marcandre.lureau@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=satyeshwar.singh@intel.com \
    --cc=vivek.kasireddy@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.