diff options
author | Drew DeVault <sir@cmpwn.com> | 2015-08-16 08:09:59 -0400 |
---|---|---|
committer | Drew DeVault <sir@cmpwn.com> | 2015-08-16 08:09:59 -0400 |
commit | 76ec9422a66c4ff59dc0590d80f7f6e931fd8e1a (patch) | |
tree | 914b01d7f01ea8b90397041dce2437305453aba2 /sway/layout.c | |
parent | 5ed999b1101e5a5830461f56977950232a6c8106 (diff) | |
parent | eefc76b39e61ce04fa8ac0e732a22c10d9c98e1f (diff) |
Merge pull request #38 from taiyu-len/master
get/set_userdata stores swayc_t *, fixed memory leak, minor changes.
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) { |