mirror of
https://github.com/swaywm/sway.git
synced 2025-01-30 20:56:43 +00:00
container: restore next to sibling after floating
Follow-up to a558866f42
If seat_get_focus_inactive_tiling returns a non-view container, restore
the floated container next to the previous sibling inside of the
container instead of appending to the end. This matches i3 behavior.
This commit is contained in:
parent
215787e8b2
commit
90529532a7
|
@ -861,7 +861,13 @@ void container_set_floating(struct sway_container *container, bool enable) {
|
|||
if (reference->view) {
|
||||
container_add_sibling(reference, container, 1);
|
||||
} else {
|
||||
container_add_child(reference, container);
|
||||
struct sway_container *sibling =
|
||||
seat_get_focus_inactive_view(seat, &reference->node);
|
||||
if (sibling) {
|
||||
container_add_sibling(sibling, container, 1);
|
||||
} else {
|
||||
container_add_child(reference, container);
|
||||
}
|
||||
}
|
||||
container->pending.width = reference->pending.width;
|
||||
container->pending.height = reference->pending.height;
|
||||
|
|
Loading…
Reference in a new issue