mirror of
https://github.com/swaywm/sway.git
synced 2024-11-23 08:21:28 +00:00
Fix crash when moving view across outputs
It was incorrectly determining that the container being moved and the destination had the same parent, which resulted in tree corruption. Both parents can be NULL but the containers may belong to different workspaces. To reproduce, create layout H[V[view] view] in one workspace then move a view left or right from another output into that workspace.
This commit is contained in:
parent
97474f12e3
commit
01117db6d9
|
@ -117,7 +117,8 @@ static void container_move_to_container_from_direction(
|
|||
struct sway_container *container, struct sway_container *destination,
|
||||
enum movement_direction move_dir) {
|
||||
if (destination->view) {
|
||||
if (destination->parent == container->parent) {
|
||||
if (destination->parent == container->parent &&
|
||||
destination->workspace == container->workspace) {
|
||||
wlr_log(WLR_DEBUG, "Swapping siblings");
|
||||
list_t *siblings = container_get_siblings(container);
|
||||
int container_index = list_find(siblings, container);
|
||||
|
|
Loading…
Reference in a new issue