commit ed1b0bffbce318327fd00987bc0a075d6ebbc10a parent 8aef255d5f69751dfdfbd3bc18e94507d1a004cd Author: S. Christoffer Eliesen <christoffer@eliesen.no> Date: Tue, 24 Nov 2015 20:57:41 +0100 layout: replace_child: Handle floating views. Diffstat:
| M | sway/layout.c | | | 7 | +++++-- |
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/sway/layout.c b/sway/layout.c @@ -106,8 +106,11 @@ swayc_t *replace_child(swayc_t *child, swayc_t *new_child) { return NULL; } int i = index_child(child); - parent->children->items[i] = new_child; - + if (child->is_floating) { + parent->floating->items[i] = new_child; + } else { + parent->children->items[i] = new_child; + } // Set parent and focus for new_child new_child->parent = child->parent; if (child->parent->focused == child) {