summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRui Matos <tiagomatos@gmail.com>2014-03-04 20:26:49 +0100
committerRui Matos <tiagomatos@gmail.com>2014-03-04 20:26:49 +0100
commitc07004aefefd724824b9f08442eb94f5ff3028c7 (patch)
tree2798c7cb47b1e6f0113be79e7bcd734aecb0472c
parent7e8833a2155160da3ea751ef3dbfa1083e1f8cc9 (diff)
downloadmutter-c07004aefefd724824b9f08442eb94f5ff3028c7.tar.gz
keybindings: Fix external grabs not being ungrabbed
Before starting to use display_get_keybinding() we could compare MetaKeyBinding.modifiers with MetaKeyCombo.modifiers directly. Now, we need to resolve the virtual modifiers to match with the mask.
-rw-r--r--src/core/keybindings.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/core/keybindings.c b/src/core/keybindings.c
index 77d755c70..097b423bb 100644
--- a/src/core/keybindings.c
+++ b/src/core/keybindings.c
@@ -1356,6 +1356,7 @@ meta_display_ungrab_accelerator (MetaDisplay *display,
MetaKeyBinding *binding;
MetaKeyGrab *grab;
char *key;
+ guint mask = 0;
g_return_val_if_fail (action != META_KEYBINDING_ACTION_NONE, FALSE);
@@ -1364,9 +1365,9 @@ meta_display_ungrab_accelerator (MetaDisplay *display,
if (!grab)
return FALSE;
- binding = display_get_keybinding (display,
- grab->combo->keycode,
- grab->combo->modifiers);
+ meta_display_devirtualize_modifiers (display, grab->combo->modifiers, &mask);
+
+ binding = display_get_keybinding (display, grab->combo->keycode, mask);
if (binding)
{
guint32 index_key;