refactored view visibility

- replace visibilty mask integers with an enum
- set output's visibilty mask on creation
- added update_visibility to manually update a containers visibility (e.g. when it moved to an invisible workspace)
This commit is contained in:
minus 2015-08-25 18:24:15 +02:00
parent 1efda79bf2
commit f22c937953
4 changed files with 27 additions and 8 deletions

View file

@ -28,12 +28,11 @@ static void update_focus(swayc_t *c) {
if (parent->focused) {
swayc_t *ws = parent->focused;
// hide visibility of old workspace
uint32_t mask = 1;
uint32_t mask = INVISIBLE;
container_map(ws, set_view_visibility, &mask);
// set visibility of new workspace
mask = 2;
mask = VISIBLE;
container_map(c, set_view_visibility, &mask);
wlc_output_set_mask(parent->handle, 2);
destroy_workspace(ws);
}
break;
@ -45,8 +44,8 @@ static void update_focus(swayc_t *c) {
// for example, stacked and tabbing change stuff.
break;
}
c->parent->focused = c;
}
c->parent->focused = c;
}
bool move_focus(enum movement_direction direction) {