qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Thomas Huth <thuth@redhat.com>
To: Markus Armbruster <armbru@redhat.com>
Cc: qemu-devel@nongnu.org, "Gerd Hoffmann" <kraxel@redhat.com>,
	"Eric Blake" <eblake@redhat.com>,
	"Paolo Bonzini" <pbonzini@redhat.com>,
	libvir-list@redhat.com, "Daniel P.Berrangé" <berrange@redhat.com>
Subject: Re: [PATCH v2 2/3] ui: Switch "-display sdl" to use the QAPI parser
Date: Thu, 19 May 2022 08:39:29 +0200	[thread overview]
Message-ID: <f1e31bd1-551e-0366-8a59-d012b23bb88e@redhat.com> (raw)
In-Reply-To: <87pmkakhdk.fsf@pond.sub.org>

On 18/05/2022 17.08, Markus Armbruster wrote:
> Thomas Huth <thuth@redhat.com> writes:
> 
>> The "-display sdl" option still uses a hand-crafted parser for its
>> parameters since we didn't want to drag an interface we considered
>> somewhat flawed into the QAPI schema. Since the flaws are gone now,
>> it's time to QAPIfy.
>>
>> This introduces the new "DisplaySDL" QAPI struct that is used to hold
>> the parameters that are unique to the SDL display. The only specific
>> parameter is currently "grab-mod" that is used to specify the required
>> modifier keys to escape from the mouse grabbing mode.
>>
>> Signed-off-by: Thomas Huth <thuth@redhat.com>
>> ---
>>   qapi/ui.json            | 27 +++++++++++++++-
>>   include/sysemu/sysemu.h |  2 --
>>   softmmu/globals.c       |  2 --
>>   softmmu/vl.c            | 70 +----------------------------------------
>>   ui/sdl2.c               | 10 ++++++
>>   5 files changed, 37 insertions(+), 74 deletions(-)
>>
>> diff --git a/qapi/ui.json b/qapi/ui.json
>> index 11a827d10f..a244e26e0f 100644
>> --- a/qapi/ui.json
>> +++ b/qapi/ui.json
>> @@ -1295,6 +1295,30 @@
>>         '*swap-opt-cmd': 'bool'
>>     } }
>>   
>> +##
>> +# @GrabMod:
>> +#
>> +# Set of modifier keys that need to be hold for shortcut key actions.
>> +#
>> +# Since: 7.1
>> +##
>> +{ 'enum'  : 'GrabMod',
>> +  'data'  : [ 'lctrl-lalt', 'lshift-lctrl-lalt', 'rctrl' ] }
> 
> This is fine now.  If we ever generalize to "arbitrary set of modifier
> keys", it'll become somewhat awkward.  No objection from me.
> 
>> +
>> +##
>> +# @DisplaySDL:
>> +#
>> +# SDL2 display options.
>> +#
>> +# @grab-mod:  String with modifier keys that should be pressed together with
> 
> s/String with modifier keys/Modifier keys/
> 
>> +#             the "G" key to release the mouse grab. Only "lshift-lctrl-lalt"
>> +#             and "rctrl" are currently supported.
> 
> Why do we define lctrl-lalt if it's not supported?

It's the default value if you don't specify the grab-mod parameter. So it's 
supported, you get this mode if you use "grab-mod=lctrl-lalt" or no grab-mod 
parameter at all.

  Thomas



  reply	other threads:[~2022-05-19  6:46 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-18 13:44 [PATCH v2 0/3] ui: Remove deprecated sdl parameters and switch to QAPI parser Thomas Huth
2022-05-18 13:44 ` [PATCH v2 1/3] ui: Remove deprecated parameters of the "-display sdl" option Thomas Huth
2022-05-18 15:04   ` Markus Armbruster
2022-05-18 13:44 ` [PATCH v2 2/3] ui: Switch "-display sdl" to use the QAPI parser Thomas Huth
2022-05-18 15:08   ` Markus Armbruster
2022-05-19  6:39     ` Thomas Huth [this message]
2022-05-19  7:08       ` Thomas Huth
2022-05-19  7:27         ` Thomas Huth
2022-05-19  7:51           ` Daniel P. Berrangé
2022-05-19  8:57             ` Markus Armbruster
2022-05-19  9:09               ` Thomas Huth
2022-05-19  9:13             ` Thomas Huth
2022-05-19 10:48           ` Gerd Hoffmann
2022-05-19 11:00             ` Thomas Huth
2022-05-19 11:19               ` Gerd Hoffmann
2022-05-19  7:33       ` Markus Armbruster
2022-05-18 15:41   ` Eric Blake
2022-05-19  6:41     ` Thomas Huth
2022-05-18 13:44 ` [PATCH v2 3/3] ui: Remove deprecated options "-sdl" and "-curses" Thomas Huth

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=f1e31bd1-551e-0366-8a59-d012b23bb88e@redhat.com \
    --to=thuth@redhat.com \
    --cc=armbru@redhat.com \
    --cc=berrange@redhat.com \
    --cc=eblake@redhat.com \
    --cc=kraxel@redhat.com \
    --cc=libvir-list@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).