Fix binding modifier lookup
authorDaniel Stone <daniel@fooishbar.org>
Fri, 1 Jun 2012 11:13:58 +0000 (12:13 +0100)
committerKristian Høgsberg <krh@bitplanet.net>
Fri, 1 Jun 2012 14:37:17 +0000 (10:37 -0400)
Whoops, lost half of the shuffling around of masks and indexes.

Signed-off-by: Daniel Stone <daniel@fooishbar.org>
src/compositor.c

index 311bb15..d450ac3 100644 (file)
@@ -1768,11 +1768,11 @@ update_modifier_state(struct weston_seat *seat, uint32_t key, uint32_t state)
        /* And update the modifier_state for bindings. */
        mods_lookup = mods_depressed | mods_latched;
        seat->modifier_state = 0;
-       if ((mods_lookup & seat->xkb_info.ctrl_mod))
+       if (mods_lookup & (1 << seat->xkb_info.ctrl_mod))
                seat->modifier_state |= MODIFIER_CTRL;
-       if ((mods_lookup & seat->xkb_info.alt_mod))
+       if (mods_lookup & (1 << seat->xkb_info.alt_mod))
                seat->modifier_state |= MODIFIER_ALT;
-       if ((mods_lookup & seat->xkb_info.super_mod))
+       if (mods_lookup & (1 << seat->xkb_info.super_mod))
                seat->modifier_state |= MODIFIER_SUPER;
 
        /* Finally, notify the compositor that LEDs have changed. */