diff options
author | Drew DeVault <[email protected]> | 2015-12-18 18:52:14 -0500 |
---|---|---|
committer | Drew DeVault <[email protected]> | 2015-12-18 18:52:51 -0500 |
commit | 7647762bab3b625bba6004de761454a2ae4edc5d (patch) | |
tree | 3c3f83675c8ca1612c13d147ecb52aaf19381f37 /sway/commands.c | |
parent | 2ab4e5676e1dc0ddd4323a1cce6a3060ccf4f8c0 (diff) |
Fix default workspace name generation
This fixes the issue where workspace 10 ends up being the default.
Diffstat (limited to 'sway/commands.c')
-rw-r--r-- | sway/commands.c | 3 |
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); |