Skip to content

Commit

Permalink
only execute the first keybinding
Browse files Browse the repository at this point in the history
  • Loading branch information
sevz17 committed Dec 27, 2023
1 parent e277d84 commit d130153
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions dwl.c
Original file line number Diff line number Diff line change
Expand Up @@ -1358,16 +1358,15 @@ keybinding(uint32_t mods, xkb_keysym_t sym)
* processing keys, rather than passing them on to the client for its own
* processing.
*/
int handled = 0;
const Key *k;
for (k = keys; k < END(keys); k++) {
if (CLEANMASK(mods) == CLEANMASK(k->mod)
&& sym == k->keysym && k->func) {
k->func(&k->arg);
handled = 1;
return 1;
}
}
return handled;
return 0;
}

void
Expand Down

0 comments on commit d130153

Please sign in to comment.