GNOME Bugzilla – Bug 733562
evdev: update xkb_state when resuming input
Last modified: 2014-07-23 12:31:45 UTC
In the gap that happens when input is suspended/resumed, the currently pressed modifiers might have changed in between. As xkb_state is really sensitive to double sets/unsets, those wouldn't go away easily, so I'd propose to just redo the xkb_state from scratch, keeping only latched/locked modifiers around, just like happens on keymap changes. This is somewhat hindering on VT switch in native mutter, as the VT switch combo involves Ctrl and Alt, so those remain stubbornly "pressed" if you switch back and the keys are released at the time the compositor takes control of devices. I'm attaching a patch implementing that.
Created attachment 281386 [details] [review] evdev: Update xkb state after input is resumed xkb_state creation has been refactored out of clutter_evdev_set_keyboard_map(), and used too in clutter_evdev_reclaim_devices(), so the xkb_state is fresh clean after input is paused/resumed (and keyboard state possibly changed in between)
Review of attachment 281386 [details] [review]: Looks fine to me. I'll leave the final word to Emmanuele
Review of attachment 281386 [details] [review]: looks good.
Attachment 281386 [details] pushed as 9e8c92d - evdev: Update xkb state after input is resumed