diff options
author | Drew DeVault <sir@cmpwn.com> | 2015-08-15 16:53:53 -0400 |
---|---|---|
committer | Drew DeVault <sir@cmpwn.com> | 2015-08-15 16:53:53 -0400 |
commit | 976e1b1c7158022d2e88d1d84d5e9e24999c6dd5 (patch) | |
tree | 180a1ed14cc5ca706cdf08d3174959fda1255127 /sway/workspace.c | |
parent | 0ed6501aa4f173ded561d97f09301e211600c507 (diff) | |
parent | 322989c431d87bd87dcda3266685948c2f2914e9 (diff) |
Merge branch 'master' of github.com:SirCmpwn/sway
Diffstat (limited to 'sway/workspace.c')
-rw-r--r-- | sway/workspace.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/sway/workspace.c b/sway/workspace.c index b8b4d66e..49a1224f 100644 --- a/sway/workspace.c +++ b/sway/workspace.c @@ -94,12 +94,12 @@ swayc_t *workspace_find_by_name(const char* name) { } void workspace_switch(swayc_t *workspace) { - swayc_t *parent = workspace->parent; - while (parent->type != C_OUTPUT) { - parent = parent->parent; + swayc_t *ws_output = workspace->parent; + while (ws_output->type != C_OUTPUT) { + ws_output = ws_output->parent; } // The current workspace of the output our target workspace is in - swayc_t *focused_workspace = parent->focused; + swayc_t *focused_workspace = ws_output->focused; if (workspace != focused_workspace && focused_workspace) { sway_log(L_DEBUG, "workspace: changing from '%s' to '%s'", focused_workspace->name, workspace->name); uint32_t mask = 1; @@ -109,7 +109,7 @@ void workspace_switch(swayc_t *workspace) { container_map(focused_workspace, set_mask, &mask); mask = 2; container_map(workspace, set_mask, &mask); - wlc_output_set_mask(wlc_get_focused_output(), 2); + wlc_output_set_mask(ws_output->handle, 2); destroy_workspace(focused_workspace); } |