aboutsummaryrefslogtreecommitdiff
path: root/sway/container.c
diff options
context:
space:
mode:
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);
+}