This commit is contained in:
taiyu 2015-08-16 19:06:31 -07:00
parent 4077238782
commit f1d5305dc6
5 changed files with 18 additions and 16 deletions

View file

@ -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);
}