qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Gerd Hoffmann <kraxel@redhat.com>
To: Peter Maydell <peter.maydell@linaro.org>
Cc: "Jindřich Makovička" <makovick@gmail.com>,
	"QEMU Developers" <qemu-devel@nongnu.org>
Subject: Re: [Qemu-devel] [PATCH 4/7] sdl2: Only accept the hotkeys on the main window
Date: Fri, 03 Nov 2017 11:35:42 +0100	[thread overview]
Message-ID: <1509705342.31823.16.camel@redhat.com> (raw)
In-Reply-To: <CAFEAcA8RbiuAwwW4oqD_i2NGMeAao8KU=pWP7faM0QbajHgMYw@mail.gmail.com>

On Fri, 2017-11-03 at 09:37 +0000, Peter Maydell wrote:
> On 3 November 2017 at 09:26, Gerd Hoffmann <kraxel@redhat.com> wrote:
> > Ignoring autorepeat events (as the patch does, but which the commit
> > message doesn't mention) makes sense.  But I still fail to see why
> > we
> > should limit hotkeys to the main window.
> 
> Is there documentation about how the input subsystem wants to
> handle autorepeat? (ie how UI frontends should present repeating
> keys to it, and how keyboard backends should expect to see
> repeating keys delivered from it). There's been discussion on
> this in another thread about xenfb and vnc...

Well, that issue didn't got much attention, probably due to the fact
that the linux kernel does autorepeat in software anyway so at least
for linux guests it doesn't matter at all what qemu is doing here.

Currently the input layer doesn't special-case repeat events in any
way, so they are just passed through to the device in case the ui
submits them.

>From a design point of view I think it makes sense to have UIs send
only keydown and keyup events and not any repeat events.  Then leave it
to the device emulation (i.e. ps/2 kbs) to actually generate repeat
events.  That is the only way the repeat rate programmed by the guest
will work as expected.

> Also I think it would be nice to have written up what the
> "expected" set of hotkeys for UI frontends are, so we can
> be consistent. I think SDL and gtk are different about what
> their ungrab keycombo is, for instance. (I've been assuming
> gtk is the "this is the right behaviour" exemplar to follow.)

That is another mess I'll plan to look at, because I want rework the
display command line switches parsing.  So, the current state is:

gtk ungrab is ctrl-alt-g.
sdl ungrab is ctrl-alt (by default, but see below).
cocoa ungrab is ctl-alt too.
For reference: virt-viewer (vnc/spice client) likewise uses ctrl-alt.

So it seems gtk is the odd one here.  Possibly due to how hotkeys are
implemented in gtk, could be a GtkAccelGroup simply doesn't support
modifier-only hotkeys.

Also:  We have a -alt-grab switch which makes sdl use the ctrl-alt-
shift modifier combo (for both ungrab and the other hotkeys).  We have
a -ctrl-grab switch which makes sdl use the right ctrl key (again for
both ungrab and hotkeys).

While being at it:  We have a -no-frame switch which makes sdl disable
the window frame, but it works on sdl1 only and nobody complained so
far ...

I'm tempted to just drop support for -alt-grab, -ctrl-grab and -no-
frame switches.

cheers,
  Gerd

  reply	other threads:[~2017-11-03 10:35 UTC|newest]

Thread overview: 63+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-23 21:07 [Qemu-devel] SDL2 various fixes Jindrich Makovicka
2017-10-23 21:07 ` [Qemu-devel] [PATCH 1/7] sdl2: Fix broken display updating after the window is hidden Jindrich Makovicka
2017-11-01 10:37   ` Gerd Hoffmann
2017-10-23 21:07 ` [Qemu-devel] [PATCH 2/7] sdl2: Do not quit the emulator when an auxilliary window is closed Jindrich Makovicka
2017-11-01 10:39   ` Gerd Hoffmann
2017-10-23 21:07 ` [Qemu-devel] [PATCH 3/7] sdl2: Do not hide the cursor on auxilliary windows Jindrich Makovicka
2017-10-24  2:38   ` Philippe Mathieu-Daudé
2017-10-24 17:39     ` Jindřich Makovička
2017-10-23 21:08 ` [Qemu-devel] [PATCH 4/7] sdl2: Only accept the hotkeys on the main window Jindrich Makovicka
2017-11-01 10:40   ` Gerd Hoffmann
2017-11-02 17:12     ` Jindřich Makovička
2017-11-03  9:26       ` Gerd Hoffmann
2017-11-03  9:37         ` Peter Maydell
2017-11-03 10:35           ` Gerd Hoffmann [this message]
2017-11-03 10:41             ` Peter Maydell
2017-11-03 10:45               ` Daniel P. Berrange
2017-11-03 11:01               ` Gerd Hoffmann
2017-11-03 11:10                 ` Peter Maydell
2017-11-03 12:07                   ` Gerd Hoffmann
2017-11-03 12:10                     ` Peter Maydell
2017-11-03 12:34                       ` Gerd Hoffmann
2017-11-05 14:10       ` Cole Robinson
2017-11-08 10:10         ` Gerd Hoffmann
2017-11-08 19:15           ` Jindřich Makovička
2017-10-23 21:08 ` [Qemu-devel] [PATCH 5/7] sdl2 uses surface relative coordinates Jindrich Makovicka
2017-11-01 10:43   ` Gerd Hoffmann
2017-11-02 17:07     ` Jindřich Makovička
2017-11-03  9:53       ` Gerd Hoffmann
2017-10-23 21:08 ` [Qemu-devel] [PATCH 6/7] sdl2: Fix dead keyboard after fullsceen Jindrich Makovicka
2017-10-23 21:08 ` [Qemu-devel] [PATCH 7/7] sdl2: Do not leave grab when fullscreen Jindrich Makovicka
2017-10-24  2:40 ` [Qemu-devel] SDL2 various fixes Philippe Mathieu-Daudé
2017-11-12 10:42 ` [Qemu-devel] [PATCH] " Jindrich Makovicka
2017-11-12 10:42   ` [Qemu-devel] [PATCH 1/8] sdl2: Fix broken display updating after the window is hidden Jindrich Makovicka
2017-11-12 10:42   ` [Qemu-devel] [PATCH 2/8] sdl2: Do not quit the emulator when an auxilliary window is closed Jindrich Makovicka
2017-11-12 10:42   ` [Qemu-devel] [PATCH 3/8] sdl2: Use the same pointer show/hide logic for absolute and relative mode Jindrich Makovicka
2017-11-12 10:42   ` [Qemu-devel] [PATCH 4/8] sdl2: Do not hide the cursor on auxilliary windows Jindrich Makovicka
2017-11-12 10:42   ` [Qemu-devel] [PATCH 5/8] sdl2 uses surface relative coordinates Jindrich Makovicka
2017-11-12 10:42   ` [Qemu-devel] [PATCH 6/8] sdl2: Fix dead keyboard after fullsceen Jindrich Makovicka
2017-11-12 10:42   ` [Qemu-devel] [PATCH 7/8] sdl2: Do not leave grab when fullscreen Jindrich Makovicka
2017-11-12 10:42   ` [Qemu-devel] [PATCH 8/8] sdl2: Ignore UI hotkeys after a focus change when GUI modifier is held Jindrich Makovicka
2017-11-12 17:17   ` [Qemu-devel] [PATCH] SDL2 various fixes Philippe Mathieu-Daudé
2017-11-12 19:30     ` [Qemu-devel] [PATCH v3] " Jindrich Makovicka
2017-11-12 19:30       ` [Qemu-devel] [PATCH 1/8] sdl2: Fix broken display updating after the window is hidden Jindrich Makovicka
2017-11-13 12:39         ` Gerd Hoffmann
2017-11-13 12:59           ` Gerd Hoffmann
2017-11-13 13:17             ` Jindřich Makovička
2017-11-13 13:38               ` Gerd Hoffmann
2017-11-13 16:35           ` Max Reitz
2017-11-14  9:53             ` Gerd Hoffmann
2017-11-14 14:48             ` Max Reitz
2017-11-14 15:12               ` Gerd Hoffmann
2017-11-12 19:30       ` [Qemu-devel] [PATCH 2/8] sdl2: Do not quit the emulator when an auxilliary window is closed Jindrich Makovicka
2017-11-12 19:30       ` [Qemu-devel] [PATCH 3/8] sdl2: Use the same pointer show/hide logic for absolute and relative mode Jindrich Makovicka
2017-11-12 19:30       ` [Qemu-devel] [PATCH 4/8] sdl2: Do not hide the cursor on auxilliary windows Jindrich Makovicka
2017-11-13 13:21         ` Gerd Hoffmann
2017-11-12 19:30       ` [Qemu-devel] [PATCH 5/8] sdl2 uses surface relative coordinates Jindrich Makovicka
2017-11-13 13:22         ` Gerd Hoffmann
2017-11-12 19:30       ` [Qemu-devel] [PATCH 6/8] sdl2: Fix dead keyboard after fullsceen Jindrich Makovicka
2017-11-12 19:30       ` [Qemu-devel] [PATCH 7/8] sdl2: Do not leave grab when fullscreen Jindrich Makovicka
2017-11-12 19:30       ` [Qemu-devel] [PATCH 8/8] sdl2: Ignore UI hotkeys after a focus change when GUI modifier is held Jindrich Makovicka
2017-11-13 13:29         ` Gerd Hoffmann
2017-11-13 13:34       ` [Qemu-devel] [PATCH v3] SDL2 various fixes Gerd Hoffmann
2017-11-13 15:46       ` Eric Blake

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=1509705342.31823.16.camel@redhat.com \
    --to=kraxel@redhat.com \
    --cc=makovick@gmail.com \
    --cc=peter.maydell@linaro.org \
    --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).