mirror of
https://github.com/brl/mutter.git
synced 2024-11-13 01:36:10 -05:00
keybindings: Fix ungrabs possibly failing after switching keymaps
We need to resolve the keycode from the keysym again since the keycode might have changed if there was a keymap switch between the grab and the ungrab.
This commit is contained in:
parent
72bd5fb814
commit
91384a32b4
@ -1355,6 +1355,7 @@ meta_display_ungrab_accelerator (MetaDisplay *display,
|
|||||||
MetaKeyGrab *grab;
|
MetaKeyGrab *grab;
|
||||||
char *key;
|
char *key;
|
||||||
guint mask = 0;
|
guint mask = 0;
|
||||||
|
guint keycode = 0;
|
||||||
|
|
||||||
g_return_val_if_fail (action != META_KEYBINDING_ACTION_NONE, FALSE);
|
g_return_val_if_fail (action != META_KEYBINDING_ACTION_NONE, FALSE);
|
||||||
|
|
||||||
@ -1364,8 +1365,9 @@ meta_display_ungrab_accelerator (MetaDisplay *display,
|
|||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
meta_display_devirtualize_modifiers (display, grab->combo->modifiers, &mask);
|
meta_display_devirtualize_modifiers (display, grab->combo->modifiers, &mask);
|
||||||
|
keycode = keysym_to_keycode (display, grab->combo->keysym);
|
||||||
|
|
||||||
binding = display_get_keybinding (display, grab->combo->keycode, mask);
|
binding = display_get_keybinding (display, keycode, mask);
|
||||||
if (binding)
|
if (binding)
|
||||||
{
|
{
|
||||||
guint32 index_key;
|
guint32 index_key;
|
||||||
|
Loading…
Reference in New Issue
Block a user