mirror of
https://github.com/gwenhael-le-moine/sway-patched-tray-menu.git
synced 2024-12-28 22:23:42 +01:00
sway_binding_cmp_keys: Differentiate between modifier keys.
Compare modifiers as well as keys when number of modifiers+keys are the same (so that e.g. mod1+x != mod4+x).
This commit is contained in:
parent
8ad8ceeeb9
commit
a6c9f40b9a
1 changed files with 5 additions and 0 deletions
|
@ -401,6 +401,11 @@ int sway_binding_cmp_keys(const void *a, const void *b) {
|
|||
}
|
||||
|
||||
// Otherwise compare keys
|
||||
if (binda->modifiers > bindb->modifiers) {
|
||||
return 1;
|
||||
} else if (binda->modifiers < bindb->modifiers) {
|
||||
return -1;
|
||||
}
|
||||
for (int i = 0; i < binda->keys->length; i++) {
|
||||
xkb_keysym_t *ka = binda->keys->items[i],
|
||||
*kb = bindb->keys->items[i];
|
||||
|
|
Loading…
Reference in a new issue