From: Michael Stapelberg Date: Sat, 5 Sep 2015 12:32:58 +0000 (+0200) Subject: Fix “precisely 1 group” error message X-Git-Tag: 4.11~31 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=bbefa2a16c1a0bcef3ae6999498a83f71ef0e281;p=i3%2Fi3 Fix “precisely 1 group” error message fixes #1897 --- diff --git a/src/bindings.c b/src/bindings.c index f9d2cf8d..32aac05a 100644 --- a/src/bindings.c +++ b/src/bindings.c @@ -80,13 +80,13 @@ Binding *configure_binding(const char *bindtype, const char *modifiers, const ch new_binding->command = sstrdup(command); new_binding->event_state_mask = event_state_from_str(modifiers); int group_bits_set = 0; - if (new_binding->event_state_mask & I3_XKB_GROUP_MASK_1) + if ((new_binding->event_state_mask >> 16) & I3_XKB_GROUP_MASK_1) group_bits_set++; - if (new_binding->event_state_mask & I3_XKB_GROUP_MASK_2) + if ((new_binding->event_state_mask >> 16) & I3_XKB_GROUP_MASK_2) group_bits_set++; - if (new_binding->event_state_mask & I3_XKB_GROUP_MASK_3) + if ((new_binding->event_state_mask >> 16) & I3_XKB_GROUP_MASK_3) group_bits_set++; - if (new_binding->event_state_mask & I3_XKB_GROUP_MASK_4) + if ((new_binding->event_state_mask >> 16) & I3_XKB_GROUP_MASK_4) group_bits_set++; if (group_bits_set > 1) ELOG("Keybinding has more than one Group specified, but your X server is always in precisely one group. The keybinding can never trigger.\n");