diff options
author | S. Christoffer Eliesen <christoffer@eliesen.no> | 2015-11-24 20:57:41 +0100 |
---|---|---|
committer | S. Christoffer Eliesen <christoffer@eliesen.no> | 2015-11-24 21:34:41 +0100 |
commit | ed1b0bffbce318327fd00987bc0a075d6ebbc10a (patch) | |
tree | 32fa77568744e2d57f4bf8d52d7416b8bf22057d /sway | |
parent | 8aef255d5f69751dfdfbd3bc18e94507d1a004cd (diff) | |
download | sway-ed1b0bffbce318327fd00987bc0a075d6ebbc10a.tar.xz |
layout: replace_child: Handle floating views.
Diffstat (limited to 'sway')
-rw-r--r-- | sway/layout.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/sway/layout.c b/sway/layout.c index a50f541c..23d99e35 100644 --- 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) { |