Code review comment for lp:~ntnk/gala/modifiers-only-input-source-switch

Revision history for this message
Santiago (santileortiz) wrote :

Well I'm really not sure about this, by reading Mutter's source code on src/core/keybindings.c I see returning false will call XIAllowEvents() (through unfreeze_keyboard()) for the keyboard, while ungrab_keyboard() calls XIUngrabDevice() for the keyboard, both of them seem to work, but I really don't understand Mutter's code or the X11 protocol well enough to know what the state of the X server is at this point so I wouldn't know what is best. If someone knows then maybe that will tell us what is best.

Probably the safest choice is to return false (without calling ungrab_keyboard()) and let Mutter handle the cleanup after emitting the signal. After all, we are not doing anything besides knowing a modifier-only accelerator was activated.

« Back to merge proposal