diff options
author | taiyu <[email protected]> | 2015-08-15 21:21:20 -0700 |
---|---|---|
committer | taiyu <[email protected]> | 2015-08-15 21:21:20 -0700 |
commit | 083d1eed1f61f8cc7397031f1ab987022ba6868e (patch) | |
tree | 22d5c72c3352139cf0adda5f9b8c4c5e6245f73c /sway/layout.c | |
parent | d3d0ba3a4b8a79384ae262d0168ce111c06d4c1b (diff) |
fixed 2 small memory leaks & adds format attribute to log.
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) { |