diff options
author | Drew DeVault <sir@cmpwn.com> | 2015-08-19 19:29:35 -0400 |
---|---|---|
committer | Drew DeVault <sir@cmpwn.com> | 2015-08-19 19:29:55 -0400 |
commit | 74c9df0c0798bb9fcc6f616e393a9edb01f3d0cb (patch) | |
tree | 942c096ddce499d35887fbcfcc496dbc584e641e | |
parent | 6f424ff6b82d86a174319ffd534e517b2ae6d367 (diff) | |
download | sway-74c9df0c0798bb9fcc6f616e393a9edb01f3d0cb.tar.xz |
Fix error with workspace/output name matching
-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) { /* New containers */ static bool workspace_test(swayc_t *view, void *name) { - return strcasecmp(view->name, (char *)name); + return strcasecmp(view->name, (char *)name) == 0; } swayc_t *new_output(wlc_handle handle) { @@ -81,8 +81,10 @@ swayc_t *new_output(wlc_handle handle) { sway_log(L_DEBUG, "Matched workspace to output: %s for %s", wso->workspace, wso->output); // Check if any other workspaces are using this name if (find_container(&root_container, workspace_test, wso->workspace)) { + sway_log(L_DEBUG, "But it's already taken"); break; } + sway_log(L_DEBUG, "So we're going to use it"); ws_name = strdup(wso->workspace); break; } |