aboutsummaryrefslogtreecommitdiffstats
path: root/sway/tree/workspace.c
diff options
context:
space:
mode:
authorLibravatar minus <minus@mnus.de>2018-08-20 23:17:02 +0200
committerLibravatar minus <minus@mnus.de>2018-08-20 23:17:07 +0200
commit471533be0a1932b2444faca54493a0fcfe618922 (patch)
tree8275b73d5c02b13884ca2fbc036fbb6069b01833 /sway/tree/workspace.c
parentMerge pull request #2501 from RedSoxFan/fix-bad-free-swaynag (diff)
downloadsway-471533be0a1932b2444faca54493a0fcfe618922.tar.gz
sway-471533be0a1932b2444faca54493a0fcfe618922.tar.zst
sway-471533be0a1932b2444faca54493a0fcfe618922.zip
Improve new workspace name selection
Improves upon 18e425ed by using the first assigned workspace instead of the last one. The order isn't explicitly guaranteed to be the same as in the config, but in general works.
Diffstat (limited to 'sway/tree/workspace.c')
-rw-r--r--sway/tree/workspace.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/sway/tree/workspace.c b/sway/tree/workspace.c
index 292f2c9a..cf50ee09 100644
--- a/sway/tree/workspace.c
+++ b/sway/tree/workspace.c
@@ -205,6 +205,7 @@ char *workspace_next_name(const char *output_name) {
205 && workspace_by_name(wso->workspace) == NULL) { 205 && workspace_by_name(wso->workspace) == NULL) {
206 free(target); 206 free(target);
207 target = strdup(wso->workspace); 207 target = strdup(wso->workspace);
208 break;
208 } 209 }
209 } 210 }
210 if (target != NULL) { 211 if (target != NULL) {