layout: replace_child: Handle floating views.

This commit is contained in:
S. Christoffer Eliesen 2015-11-24 20:57:41 +01:00
parent 8aef255d5f
commit ed1b0bffbc

View File

@ -106,8 +106,11 @@ swayc_t *replace_child(swayc_t *child, swayc_t *new_child) {
return NULL;
}
int i = index_child(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) {