plugins/xcb: skip xrecord events when keyboard is grabbed
Otherwise modifier-only shortcuts still trigger when keyboard is grabbed by some other client, e.g. during shortcut assignment and in lockscreen.
Keep track of keyboard grab state by listening to grab/ungrab requests.
Test plan 1:
- Under x11, in system settings, assign Meta to some shortcut.
- Assign meta to another shortcut
- Verify that the old shortcut does not trigger
Test plan 2:
- Under x11, choose multiple keyboard layouts
- assign Alt+Shift as alternate layout switching shortcut
- lock screen
- press Alt+Shift
- Verify that the layout change OSD pops up, and typed password uses the new layout
- repeat the last two steps
BUG: 488268 BUG: 491315
I am targeting 6.2 since I would like to get more testing on this before release.