sends hidden views to back, visible view to front

This commit is contained in:
taiyu 2015-08-16 18:59:12 -07:00
parent ffb3458322
commit 4077238782
3 changed files with 7 additions and 3 deletions

View file

@ -82,10 +82,14 @@ bool workspace_by_name(swayc_t *view, void *data) {
void set_mask(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);
}