Comment 69 for bug 1244090

Revision history for this message
Hackintosh Five (hackintosh5) wrote :

No, the problem is in the grabbing code:
https://github.com/GNOME/gnome-shell/blob/2997e4950ba31747b5e3260c306456b0de413421/js/misc/keyboardManager.js#L37
https://github.com/GNOME/mutter/blob/49f029571cc425a878e520310a8db616fa5c4b70/src/core/keybindings.c#L1803
This grabs the keyboard.
From https://www.x.org/wiki/Development/Documentation/GrabProcessing :
'There can only be one grab on a device ...'
See the xev output below, of me pressing META+SPACE to change layout:

FocusOut event, serial 34, synthetic NO, window 0x3200001,
    mode NotifyGrab, detail NotifyAncestor

FocusIn event, serial 34, synthetic NO, window 0x3200001,
    mode NotifyUngrab, detail NotifyNonlinear

KeymapNotify event, serial 34, synthetic NO, window 0x0,
    keys: 70 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
           0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

FocusOut event, serial 34, synthetic NO, window 0x3200001,
    mode NotifyGrab, detail NotifyNonlinear

FocusIn event, serial 34, synthetic NO, window 0x3200001,
    mode NotifyUngrab, detail NotifyNonlinear

KeymapNotify event, serial 34, synthetic NO, window 0x0,
    keys: 2 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
           0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

The issue is that it is losing grab, as the FocusOut event shows the mode is notifyGrab. Or at least that is my interpretation. I don't know why the grab and ungrab events are the wrong way round.