diff options
Diffstat (limited to 'sway/focus.c')
-rw-r--r-- | sway/focus.c | 8 |
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 | ||