mirror of
https://github.com/swaywm/sway.git
synced 2024-11-26 18:01:29 +00:00
layout: replace_child: Handle floating views.
This commit is contained in:
parent
8aef255d5f
commit
ed1b0bffbc
|
@ -106,8 +106,11 @@ swayc_t *replace_child(swayc_t *child, swayc_t *new_child) {
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
int i = index_child(child);
|
int i = index_child(child);
|
||||||
|
if (child->is_floating) {
|
||||||
|
parent->floating->items[i] = new_child;
|
||||||
|
} else {
|
||||||
parent->children->items[i] = new_child;
|
parent->children->items[i] = new_child;
|
||||||
|
}
|
||||||
// Set parent and focus for new_child
|
// Set parent and focus for new_child
|
||||||
new_child->parent = child->parent;
|
new_child->parent = child->parent;
|
||||||
if (child->parent->focused == child) {
|
if (child->parent->focused == child) {
|
||||||
|
|
Loading…
Reference in a new issue