mirror of
https://github.com/swaywm/sway.git
synced 2025-11-07 13:29:56 -05:00
Fix default workspace name generation
This fixes the issue where workspace 10 ends up being the default.
This commit is contained in:
parent
2ab4e5676e
commit
7647762bab
3 changed files with 29 additions and 16 deletions
|
|
@ -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);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue