aboutsummaryrefslogtreecommitdiff
path: root/sway/commands.c
diff options
context:
space:
mode:
Diffstat (limited to 'sway/commands.c')
-rw-r--r--sway/commands.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/sway/commands.c b/sway/commands.c
index 4af9186a..3d882a7b 100644
--- a/sway/commands.c
+++ b/sway/commands.c
@@ -167,6 +167,8 @@ static struct cmd_results *checkarg(int argc, const char *name, enum expected_ar
return error;
}
+int binding_order = 0;
+
static struct cmd_results *cmd_bindsym(int argc, char **argv) {
struct cmd_results *error = NULL;
if ((error = checkarg(argc, "bindsym", EXPECTED_MORE_THAN, 1))) {
@@ -215,6 +217,7 @@ static struct cmd_results *cmd_bindsym(int argc, char **argv) {
free_sway_binding(dup);
list_del(mode->bindings, i);
}
+ binding->order = binding_order++;
list_add(mode->bindings, binding);
list_sort(mode->bindings, sway_binding_cmp);