diff options
author | taiyu <[email protected]> | 2015-08-16 19:06:31 -0700 |
---|---|---|
committer | taiyu <[email protected]> | 2015-08-16 19:06:31 -0700 |
commit | f1d5305dc61944deebbab2322118d7a1a15b998e (patch) | |
tree | 1351a85fa95badc95b0408387c90c366495c28ab /sway/container.c | |
parent | 40772387829736f5a73bc4f97968b2e44b28a333 (diff) |
fix
Diffstat (limited to 'sway/container.c')
-rw-r--r-- | sway/container.c | 12 |
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); +} |