aboutsummaryrefslogtreecommitdiff
path: root/sway/container.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/container.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/container.c')
-rw-r--r--sway/container.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/sway/container.c b/sway/container.c
index 89958a4f..3cf9e47a 100644
--- a/sway/container.c
+++ b/sway/container.c
@@ -227,3 +227,15 @@ void container_map(swayc_t *container, void (*f)(swayc_t *view, void *data), voi
}
}
+void set_view_visibility(swayc_t *view, void *data) {
+ uint32_t *p = data;
+ if (view->type == C_VIEW) {
+ wlc_view_set_mask(view->handle, *p);
+ if (*p == 2) {
+ wlc_view_bring_to_front(view->handle);
+ } else {
+ wlc_view_send_to_back(view->handle);
+ }
+ }
+ view->visible = (*p == 2);
+}