diff options
Diffstat (limited to 'sway/layout.c')
-rw-r--r-- | sway/layout.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sway/layout.c b/sway/layout.c index 918da9f0..8cf88be3 100644 --- a/sway/layout.c +++ b/sway/layout.c @@ -215,10 +215,10 @@ swayc_t *get_swayc_for_handle(wlc_handle handle, swayc_t *parent) { } swayc_t *get_focused_container(swayc_t *parent) { - if (parent->focused == NULL) { - return parent; + while (parent->focused) { + parent = parent->focused; } - return get_focused_container(parent->focused); + return parent; } void unfocus_all(swayc_t *container) { |