summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLibravatar Drew DeVault <sir@cmpwn.com>2015-08-15 16:53:53 -0400
committerLibravatar Drew DeVault <sir@cmpwn.com>2015-08-15 16:53:53 -0400
commit976e1b1c7158022d2e88d1d84d5e9e24999c6dd5 (patch)
tree180a1ed14cc5ca706cdf08d3174959fda1255127
parentSet WLC_IDLE_TIME to 0 (diff)
parentMerge pull request #32 from Luminarys/master (diff)
downloadsway-976e1b1c7158022d2e88d1d84d5e9e24999c6dd5.tar.gz
sway-976e1b1c7158022d2e88d1d84d5e9e24999c6dd5.tar.zst
sway-976e1b1c7158022d2e88d1d84d5e9e24999c6dd5.zip
Merge branch 'master' of github.com:SirCmpwn/sway
-rw-r--r--sway/workspace.c10
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) {
94} 94}
95 95
96void workspace_switch(swayc_t *workspace) { 96void workspace_switch(swayc_t *workspace) {
97 swayc_t *parent = workspace->parent; 97 swayc_t *ws_output = workspace->parent;
98 while (parent->type != C_OUTPUT) { 98 while (ws_output->type != C_OUTPUT) {
99 parent = parent->parent; 99 ws_output = ws_output->parent;
100 } 100 }
101 // The current workspace of the output our target workspace is in 101 // The current workspace of the output our target workspace is in
102 swayc_t *focused_workspace = parent->focused; 102 swayc_t *focused_workspace = ws_output->focused;
103 if (workspace != focused_workspace && focused_workspace) { 103 if (workspace != focused_workspace && focused_workspace) {
104 sway_log(L_DEBUG, "workspace: changing from '%s' to '%s'", focused_workspace->name, workspace->name); 104 sway_log(L_DEBUG, "workspace: changing from '%s' to '%s'", focused_workspace->name, workspace->name);
105 uint32_t mask = 1; 105 uint32_t mask = 1;
@@ -109,7 +109,7 @@ void workspace_switch(swayc_t *workspace) {
109 container_map(focused_workspace, set_mask, &mask); 109 container_map(focused_workspace, set_mask, &mask);
110 mask = 2; 110 mask = 2;
111 container_map(workspace, set_mask, &mask); 111 container_map(workspace, set_mask, &mask);
112 wlc_output_set_mask(wlc_get_focused_output(), 2); 112 wlc_output_set_mask(ws_output->handle, 2);
113 113
114 destroy_workspace(focused_workspace); 114 destroy_workspace(focused_workspace);
115 } 115 }