From f1d5305dc61944deebbab2322118d7a1a15b998e Mon Sep 17 00:00:00 2001 From: taiyu Date: Sun, 16 Aug 2015 19:06:31 -0700 Subject: fix --- sway/container.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'sway/container.c') 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); +} -- cgit v1.2.3