Fix erratic behavior with single container child jumping outputs
This fixes a regression introduced in commit
4e88c10564
: when attempting to move the
single child of a container in the direction of another output, i3
would move the window to the output, despite the window not being at
the edge of its output, instead of moving it to its parent container.
The bug occurred because the check for moving containers across
outputs with non-default workspace layouts (issue #1603) did not
actually verify that the moved window lies at the edge of the
workspace, despite what its comment said.
Fixes issue #2466.
This commit is contained in:
@ -248,7 +248,8 @@ void tree_move(Con *con, int direction) {
|
||||
? AFTER
|
||||
: BEFORE);
|
||||
insert_con_into(con, target, position);
|
||||
} else if (con->parent->parent->type == CT_WORKSPACE &&
|
||||
} else if (!next &&
|
||||
con->parent->parent->type == CT_WORKSPACE &&
|
||||
con->parent->layout != L_DEFAULT &&
|
||||
con_num_children(con->parent) == 1) {
|
||||
/* Con is the lone child of a non-default layout container at the edge
|
||||
|
Reference in New Issue
Block a user