aboutsummaryrefslogtreecommitdiff
path: root/sway/config.c
diff options
context:
space:
mode:
authorDrew DeVault <sir@cmpwn.com>2015-11-24 15:32:35 -0500
committerDrew DeVault <sir@cmpwn.com>2015-11-24 15:32:35 -0500
commit53ec7a74b623373b185f24b0e203bce09518ab11 (patch)
tree5f60434187575272247128958f4d6bcfeb2d72b2 /sway/config.c
parent8ad8ceeeb92ca6609bc40974a8c528b593251566 (diff)
parenta6c9f40b9ab495dea431d9299fa9649ad80a88a7 (diff)
Merge pull request #252 from sce/fix_binding_cmp
sway_binding_cmp_keys: Differentiate between modifier keys.
Diffstat (limited to 'sway/config.c')
-rw-r--r--sway/config.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/sway/config.c b/sway/config.c
index f2523c1f..13865058 100644
--- a/sway/config.c
+++ b/sway/config.c
@@ -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];