mirror of
https://github.com/swaywm/sway.git
synced 2026-04-21 06:46:22 -04:00
Revert "commands/move: maintain workspace_layout when moving"
This is in preparation for changing the workspace_layout
command to work like it does in i3.
This reverts commit b4a75a1ab2.
This commit is contained in:
parent
971aa90ccc
commit
b4850876dc
2 changed files with 4 additions and 16 deletions
|
|
@ -276,11 +276,12 @@ static void workspace_rejigger(struct sway_workspace *ws,
|
|||
return;
|
||||
}
|
||||
container_detach(child);
|
||||
workspace_wrap_children(ws);
|
||||
struct sway_container *new_parent = workspace_wrap_children(ws);
|
||||
|
||||
int index =
|
||||
move_dir == WLR_DIRECTION_LEFT || move_dir == WLR_DIRECTION_UP ? 0 : 1;
|
||||
workspace_insert_tiling(ws, child, index);
|
||||
container_flatten(new_parent);
|
||||
ws->layout =
|
||||
move_dir == WLR_DIRECTION_LEFT || move_dir == WLR_DIRECTION_RIGHT ?
|
||||
L_HORIZ : L_VERT;
|
||||
|
|
@ -340,11 +341,8 @@ static bool container_move_in_direction(struct sway_container *container,
|
|||
container_insert_child(current->parent, container,
|
||||
index + (offs < 0 ? 0 : 1));
|
||||
} else {
|
||||
struct sway_workspace *ws = current->workspace;
|
||||
workspace_insert_tiling(ws,
|
||||
container_split(container,
|
||||
output_get_default_layout(ws->output)),
|
||||
index + (offs < 0 ? 0 : 1));
|
||||
workspace_insert_tiling(current->workspace, container,
|
||||
index + (offs < 0 ? 0 : 1));
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue