[mutter] keybindings: Make sure to filter out the virtualized mod itself
- From: Jasper St. Pierre <jstpierre src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter] keybindings: Make sure to filter out the virtualized mod itself
- Date: Tue, 19 Aug 2014 18:58:58 +0000 (UTC)
commit 8a0da1cb0775607e0738b93792225d499e6545f2
Author: Jasper St. Pierre <jstpierre mecheye net>
Date: Tue Aug 19 14:57:48 2014 -0400
keybindings: Make sure to filter out the virtualized mod itself
When devirtualizing the modifier, we can't include the virtualized mod
itself, otherwise our grab won't have the correct mask.
src/core/keybindings.c | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
---
diff --git a/src/core/keybindings.c b/src/core/keybindings.c
index ba6a399..fe7eccd 100644
--- a/src/core/keybindings.c
+++ b/src/core/keybindings.c
@@ -213,8 +213,9 @@ reload_modmap (MetaKeyBindingManager *keys)
if (idx != XKB_MOD_INVALID)
{
- xkb_state_update_mask (scratch_state, 1 << idx, 0, 0, 0, 0, 0);
- *mask_p = xkb_state_serialize_mods (scratch_state, XKB_STATE_MODS_DEPRESSED);
+ xkb_mod_mask_t vmodmask = (1 << idx);
+ xkb_state_update_mask (scratch_state, vmodmask, 0, 0, 0, 0, 0);
+ *mask_p = xkb_state_serialize_mods (scratch_state, XKB_STATE_MODS_DEPRESSED) & ~vmodmask;
}
else
*mask_p = 0;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]