Fix “precisely 1 group” error message

fixes #1897
This commit is contained in:
Michael Stapelberg 2015-09-05 14:32:58 +02:00
parent eacf20278b
commit bbefa2a16c
1 changed files with 4 additions and 4 deletions

View File

@ -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");