aboutsummaryrefslogtreecommitdiff
path: root/sway/workspace.c
diff options
context:
space:
mode:
authorDrew DeVault <sir@cmpwn.com>2015-08-16 22:11:33 -0400
committerDrew DeVault <sir@cmpwn.com>2015-08-16 22:11:33 -0400
commitcb504c8f7b0face15a29de5b3b9f12ffe8bc6848 (patch)
tree1351a85fa95badc95b0408387c90c366495c28ab /sway/workspace.c
parent9e56d72e112b20f0d1dc42b377ab9b07816f9d16 (diff)
parentf1d5305dc61944deebbab2322118d7a1a15b998e (diff)
downloadsway-cb504c8f7b0face15a29de5b3b9f12ffe8bc6848.tar.xz
Merge pull request #53 from taiyu-len/master
send_to_back/bring_to_front set when view changes visibility.
Diffstat (limited to 'sway/workspace.c')
-rw-r--r--sway/workspace.c13
1 files changed, 2 insertions, 11 deletions
diff --git a/sway/workspace.c b/sway/workspace.c
index a3238da6..9bc3215f 100644
--- a/sway/workspace.c
+++ b/sway/workspace.c
@@ -80,15 +80,6 @@ bool workspace_by_name(swayc_t *view, void *data) {
(strcasecmp(view->name, (char *) data) == 0);
}
-void set_mask(swayc_t *view, void *data) {
- uint32_t *p = data;
-
- if (view->type == C_VIEW) {
- wlc_view_set_mask(view->handle, *p);
- }
- view->visible = (*p == 2);
-}
-
swayc_t *workspace_find_by_name(const char* name) {
return find_container(&root_container, workspace_by_name, (void *) name);
}
@@ -194,9 +185,9 @@ void workspace_switch(swayc_t *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
- container_map(focused_workspace, set_mask, &mask);
+ container_map(focused_workspace, set_view_visibility, &mask);
mask = 2;
- container_map(workspace, set_mask, &mask);
+ container_map(workspace, set_view_visibility, &mask);
wlc_output_set_mask(ws_output->handle, 2);
destroy_workspace(focused_workspace);