diff options
author | Taiyu <taiyu.len@gmail.com> | 2015-08-10 20:09:47 -0700 |
---|---|---|
committer | Taiyu <taiyu.len@gmail.com> | 2015-08-10 20:09:47 -0700 |
commit | 2ac3535afebe4f31aad96b3f8d7a932af5ad56f6 (patch) | |
tree | 6a7cb6f2333400044cf71c06df51c26e8d0586bd | |
parent | beabb12d63437557da8a2e254a1e0250da448aa6 (diff) |
silly mistake + style
-rw-r--r-- | sway/workspace.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sway/workspace.c b/sway/workspace.c index 8ff89132..6a68233e 100644 --- a/sway/workspace.c +++ b/sway/workspace.c @@ -39,7 +39,7 @@ bool workspace_by_name(swayc_t *view, void *data) { bool workspace_destroy(swayc_t *workspace) { //Dont destroy if there are children - if(workspace->children->length) { + if (workspace->children->length) { return false; } sway_log(L_DEBUG, "Workspace: Destroying workspace '%s'", workspace->name); @@ -64,8 +64,8 @@ swayc_t *workspace_find_by_name(const char* name) { void workspace_switch(swayc_t *workspace) { if (active_workspace) { sway_log(L_DEBUG, "workspace: changing from '%s' to '%s'", active_workspace->name, workspace->name); - if(strcmp(active_workspace->name, workspace->name) == 0) { - return; //Dont do anything if they are the same workspace + if (active_workspace == workspace) { + return; } uint32_t mask = 1; // set all c_views in the old workspace to the invisible mask |