diff options
Diffstat (limited to 'sway/workspace.c')
-rw-r--r-- | sway/workspace.c | 17 |
1 files changed, 2 insertions, 15 deletions
diff --git a/sway/workspace.c b/sway/workspace.c index 15828658..9bc3215f 100644 --- a/sway/workspace.c +++ b/sway/workspace.c | |||
@@ -80,19 +80,6 @@ bool workspace_by_name(swayc_t *view, void *data) { | |||
80 | (strcasecmp(view->name, (char *) data) == 0); | 80 | (strcasecmp(view->name, (char *) data) == 0); |
81 | } | 81 | } |
82 | 82 | ||
83 | void set_mask(swayc_t *view, void *data) { | ||
84 | uint32_t *p = data; | ||
85 | if (view->type == C_VIEW) { | ||
86 | wlc_view_set_mask(view->handle, *p); | ||
87 | } | ||
88 | if (*p == 2) { | ||
89 | wlc_view_bring_to_front(view->handle); | ||
90 | } else { | ||
91 | wlc_view_send_to_back(view->handle); | ||
92 | } | ||
93 | view->visible = (*p == 2); | ||
94 | } | ||
95 | |||
96 | swayc_t *workspace_find_by_name(const char* name) { | 83 | swayc_t *workspace_find_by_name(const char* name) { |
97 | return find_container(&root_container, workspace_by_name, (void *) name); | 84 | return find_container(&root_container, workspace_by_name, (void *) name); |
98 | } | 85 | } |
@@ -198,9 +185,9 @@ void workspace_switch(swayc_t *workspace) { | |||
198 | 185 | ||
199 | // set all c_views in the old workspace to the invisible mask if the workspace | 186 | // set all c_views in the old workspace to the invisible mask if the workspace |
200 | // is in the same output & c_views in the new workspace to the visible mask | 187 | // is in the same output & c_views in the new workspace to the visible mask |
201 | container_map(focused_workspace, set_mask, &mask); | 188 | container_map(focused_workspace, set_view_visibility, &mask); |
202 | mask = 2; | 189 | mask = 2; |
203 | container_map(workspace, set_mask, &mask); | 190 | container_map(workspace, set_view_visibility, &mask); |
204 | wlc_output_set_mask(ws_output->handle, 2); | 191 | wlc_output_set_mask(ws_output->handle, 2); |
205 | 192 | ||
206 | destroy_workspace(focused_workspace); | 193 | destroy_workspace(focused_workspace); |