summaryrefslogtreecommitdiffstats
path: root/sway/focus.c
diff options
context:
space:
mode:
authorLibravatar taiyu <taiyu.len@gmail.com>2015-08-18 03:48:41 -0700
committerLibravatar taiyu <taiyu.len@gmail.com>2015-08-18 03:48:41 -0700
commitb132f67e7bb5017c73658cec8d297060033890e8 (patch)
tree3884645d160d5f3572e3fe821da23fd8088a9d09 /sway/focus.c
parentmore changes (diff)
downloadsway-b132f67e7bb5017c73658cec8d297060033890e8.tar.gz
sway-b132f67e7bb5017c73658cec8d297060033890e8.tar.zst
sway-b132f67e7bb5017c73658cec8d297060033890e8.zip
minor fixes
Diffstat (limited to 'sway/focus.c')
-rw-r--r--sway/focus.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/sway/focus.c b/sway/focus.c
index 4f57f252..14d27184 100644
--- a/sway/focus.c
+++ b/sway/focus.c
@@ -33,10 +33,11 @@ static void update_focus(swayc_t *c) {
33 } 33 }
34 active_workspace = c; 34 active_workspace = c;
35 break; 35 break;
36 default:
36 case C_VIEW: 37 case C_VIEW:
37 case C_CONTAINER: 38 case C_CONTAINER:
38 //TODO whatever to do when container changes 39 //TODO whatever to do when container changes
39 //for example, stacked and tabbing change whatever. 40 //for example, stacked and tabbing change stuff.
40 break; 41 break;
41 } 42 }
42 } 43 }
@@ -114,6 +115,11 @@ swayc_t *get_focused_container(swayc_t *parent) {
114 while (parent && !parent->is_focused) { 115 while (parent && !parent->is_focused) {
115 parent = parent->focused; 116 parent = parent->focused;
116 } 117 }
118 //just incase
119 if (parent == NULL) {
120 sway_log(L_DEBUG, "get_focused_container unable to find container");
121 return active_workspace;
122 }
117 return parent; 123 return parent;
118} 124}
119 125