From 471533be0a1932b2444faca54493a0fcfe618922 Mon Sep 17 00:00:00 2001
From: minus <minus@mnus.de>
Date: Mon, 20 Aug 2018 23:17:02 +0200
Subject: 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.
---
 sway/tree/workspace.c | 1 +
 1 file changed, 1 insertion(+)

(limited to 'sway')

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) {
 				&& workspace_by_name(wso->workspace) == NULL) {
 			free(target);
 			target = strdup(wso->workspace);
+			break;
 		}
 	}
 	if (target != NULL) {
-- 
cgit v1.2.3