mirror of
https://github.com/swaywm/sway.git
synced 2024-12-28 16:06:37 +01:00
In container_split, set a floating container's view to tiled
Currently, when a floating container with a view is split and children are added to it, the new views are rendered as tiled, while the first view stays in floating style. Here this is addressed by setting the view to tiled as soon as the container is split, by duplicating the "view part" of the logic in container_set_floating(..., false). Since the new container of the view is no longer considered floating, it makes sense to set the view to tiling at this point. The view would have to be set back to floating if it was possible to "unsplit" the container.
This commit is contained in:
parent
32788a93f2
commit
39328ca4e4
1 changed files with 7 additions and 0 deletions
|
@ -1413,6 +1413,13 @@ struct sway_container *container_split(struct sway_container *child,
|
|||
struct sway_seat *seat = input_manager_get_default_seat();
|
||||
bool set_focus = (seat_get_focus(seat) == &child->node);
|
||||
|
||||
if (container_is_floating(child) && child->view) {
|
||||
view_set_tiled(child->view, true);
|
||||
if (child->view->using_csd) {
|
||||
child->border = child->saved_border;
|
||||
}
|
||||
}
|
||||
|
||||
struct sway_container *cont = container_create(NULL);
|
||||
cont->width = child->width;
|
||||
cont->height = child->height;
|
||||
|
|
Loading…
Reference in a new issue