diff options
-rw-r--r-- | sway/container.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/sway/container.c b/sway/container.c index 0a75643d..9c6b78e9 100644 --- a/sway/container.c +++ b/sway/container.c | |||
@@ -54,7 +54,7 @@ static void free_swayc(swayc_t *c) { | |||
54 | /* New containers */ | 54 | /* New containers */ |
55 | 55 | ||
56 | static bool workspace_test(swayc_t *view, void *name) { | 56 | static bool workspace_test(swayc_t *view, void *name) { |
57 | return strcasecmp(view->name, (char *)name); | 57 | return strcasecmp(view->name, (char *)name) == 0; |
58 | } | 58 | } |
59 | 59 | ||
60 | swayc_t *new_output(wlc_handle handle) { | 60 | swayc_t *new_output(wlc_handle handle) { |
@@ -81,8 +81,10 @@ swayc_t *new_output(wlc_handle handle) { | |||
81 | sway_log(L_DEBUG, "Matched workspace to output: %s for %s", wso->workspace, wso->output); | 81 | sway_log(L_DEBUG, "Matched workspace to output: %s for %s", wso->workspace, wso->output); |
82 | // Check if any other workspaces are using this name | 82 | // Check if any other workspaces are using this name |
83 | if (find_container(&root_container, workspace_test, wso->workspace)) { | 83 | if (find_container(&root_container, workspace_test, wso->workspace)) { |
84 | sway_log(L_DEBUG, "But it's already taken"); | ||
84 | break; | 85 | break; |
85 | } | 86 | } |
87 | sway_log(L_DEBUG, "So we're going to use it"); | ||
86 | ws_name = strdup(wso->workspace); | 88 | ws_name = strdup(wso->workspace); |
87 | break; | 89 | break; |
88 | } | 90 | } |