|
|
@ -99,19 +99,19 @@ void workspace_switch(swayc_t *workspace) {
|
|
|
|
parent = parent->parent;
|
|
|
|
parent = parent->parent;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
// The current workspace of the output our target workspace is in
|
|
|
|
// The current workspace of the output our target workspace is in
|
|
|
|
swayc_t *c_workspace = parent->focused;
|
|
|
|
swayc_t *focused_workspace = parent->focused;
|
|
|
|
if (workspace != c_workspace && c_workspace) {
|
|
|
|
if (workspace != focused_workspace && focused_workspace) {
|
|
|
|
sway_log(L_DEBUG, "workspace: changing from '%s' to '%s'", c_workspace->name, workspace->name);
|
|
|
|
sway_log(L_DEBUG, "workspace: changing from '%s' to '%s'", focused_workspace->name, workspace->name);
|
|
|
|
uint32_t mask = 1;
|
|
|
|
uint32_t mask = 1;
|
|
|
|
|
|
|
|
|
|
|
|
// set all c_views in the old workspace to the invisible mask if the workspace
|
|
|
|
// set all c_views in the old workspace to the invisible mask if the workspace
|
|
|
|
// is in the same output & c_views in the new workspace to the visible mask
|
|
|
|
// is in the same output & c_views in the new workspace to the visible mask
|
|
|
|
container_map(c_workspace, set_mask, &mask);
|
|
|
|
container_map(focused_workspace, set_mask, &mask);
|
|
|
|
mask = 2;
|
|
|
|
mask = 2;
|
|
|
|
container_map(workspace, set_mask, &mask);
|
|
|
|
container_map(workspace, set_mask, &mask);
|
|
|
|
wlc_output_set_mask(wlc_get_focused_output(), 2);
|
|
|
|
wlc_output_set_mask(wlc_get_focused_output(), 2);
|
|
|
|
|
|
|
|
|
|
|
|
destroy_workspace(c_workspace);
|
|
|
|
destroy_workspace(focused_workspace);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
unfocus_all(&root_container);
|
|
|
|
unfocus_all(&root_container);
|
|
|
|
focus_view(workspace);
|
|
|
|
focus_view(workspace);
|
|
|
|