Bug#874526: Keyboard grab doesn't work under Wayland

Josh Triplett josh at joshtriplett.org
Mon Jul 2 19:24:28 BST 2018


On Mon, Jul 02, 2018 at 06:14:44PM +0100, Simon McVittie wrote:
> On Mon, 02 Jul 2018 at 01:39:24 -0700, Josh Triplett wrote:
> > On Mon, Jul 02, 2018 at 08:14:48AM +0100, Simon McVittie wrote:
> > > This seems to work under GNOME 3.28 (probably also 3.26). I'm prompted
> > > while starting up the VM for whether to allow gnome-boxes to grab the
> > > keyboard. I haven't tried a Windows VM, but if I use the keyboard menu to
> > > switch to a text-mode VT for a Linux VM with Ctrl+Alt+F$n, then either
> > > press Ctrl+Alt+Del or send it via the keyboard menu, the VM reboots
> > > as expected.
> > 
> > I can confirm that I can still reproduce this with current GNOME and
> > gnome-boxes; Ctrl+Alt+Del still goes to GNOME and not to the VM.
> 
> Which versions of gnome-shell, libmutter-2-0, gnome-boxes do you have?

gnome-boxes         3.28.5-1
gnome-shell         3.28.2-1
libmutter-2-0:amd64 3.28.2-2

> Are you prompted for whether to let gnome-boxes inhibit shortcuts? You
> should get a system-modal dialog (the sort that dims the entire screen,
> like the Shut Down dialog you get from Ctrl+Alt+Del itself) something
> like this:
> 
>     |----------------------------------------------------------|
>     |      Boxes wants to inhibit shortcuts                    |
>     | /!\                                                      |
>     |      You can restore shortcuts by pressing Super+Escape. |
>     |                                                          |
>     |--------[ Deny ]--------------------[ Allow ]-------------|
> 
> (If you don't click Allow then this feature is not expected to work.)

No, I don't get that prompt from gnome-boxes. (I've seen it before from
other applications.)

> Does it help to click inside the virtual machine window before pressing
> Ctrl+Alt+Del?

If I'm in windowed mode, yes.

As far as I can tell, it's possible to end up in a state in which the VM
has the focus but gnome-boxes doesn't have a grab on Ctrl+Alt+Del. This
can happen both in windowed mode and in fullscreen mode. In windowed
mode, if I click in gnome-boxes then a grab takes place and Ctrl+Alt+Del
works.

This may also have something to do with switching windows (via the
overview) away from a VM.

> Does sending Ctrl+Alt+Del via the keyboard menu work?

Yes.



More information about the pkg-gnome-maintainers mailing list