From a6c9f40b9ab495dea431d9299fa9649ad80a88a7 Mon Sep 17 00:00:00 2001 From: "S. Christoffer Eliesen" Date: Tue, 24 Nov 2015 19:15:10 +0100 Subject: 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). --- sway/config.c | 5 +++++ 1 file changed, 5 insertions(+) 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]; -- cgit v1.2.3