summaryrefslogtreecommitdiffstats
path: root/sway/focus.c
diff options
context:
space:
mode:
authorLibravatar minus <minus@mnus.de>2015-08-25 18:24:15 +0200
committerLibravatar minus <minus@mnus.de>2015-08-25 18:24:15 +0200
commitf22c9379530ebaacefcc337714cc2a5fe0db8902 (patch)
treed45200574d07c1522e3c83c378b4e5d1a66d4594 /sway/focus.c
parentrefactored workspace_next/prev (diff)
downloadsway-f22c9379530ebaacefcc337714cc2a5fe0db8902.tar.gz
sway-f22c9379530ebaacefcc337714cc2a5fe0db8902.tar.zst
sway-f22c9379530ebaacefcc337714cc2a5fe0db8902.zip
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)
Diffstat (limited to 'sway/focus.c')
-rw-r--r--sway/focus.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/sway/focus.c b/sway/focus.c
index e369de30..823eefa2 100644
--- a/sway/focus.c
+++ b/sway/focus.c
@@ -28,12 +28,11 @@ static void update_focus(swayc_t *c) {
28 if (parent->focused) { 28 if (parent->focused) {
29 swayc_t *ws = parent->focused; 29 swayc_t *ws = parent->focused;
30 // hide visibility of old workspace 30 // hide visibility of old workspace
31 uint32_t mask = 1; 31 uint32_t mask = INVISIBLE;
32 container_map(ws, set_view_visibility, &mask); 32 container_map(ws, set_view_visibility, &mask);
33 // set visibility of new workspace 33 // set visibility of new workspace
34 mask = 2; 34 mask = VISIBLE;
35 container_map(c, set_view_visibility, &mask); 35 container_map(c, set_view_visibility, &mask);
36 wlc_output_set_mask(parent->handle, 2);
37 destroy_workspace(ws); 36 destroy_workspace(ws);
38 } 37 }
39 break; 38 break;
@@ -45,8 +44,8 @@ static void update_focus(swayc_t *c) {
45 // for example, stacked and tabbing change stuff. 44 // for example, stacked and tabbing change stuff.
46 break; 45 break;
47 } 46 }
47 c->parent->focused = c;
48 } 48 }
49 c->parent->focused = c;
50} 49}
51 50
52bool move_focus(enum movement_direction direction) { 51bool move_focus(enum movement_direction direction) {