mirror of
https://github.com/swaywm/sway.git
synced 2026-03-20 05:34:28 -04:00
Revert "sway/tree: Simplify sway_node teardown"
This reverts commit e28e6484e8.
This change tried to remove nodes from all points of reference to allow
immediate destruction. However, it missed things like the children lists
cloned by transaction states of parent nodes.
Adding all that extra cleanup would not be in the spirit of a PR
claiming to simplify teardown. Let's wait for someone to come up with a
cleaner approach instead.
Fixes: https://github.com/swaywm/sway/pull/8738
This commit is contained in:
parent
0cd45d4ad2
commit
56f2db062d
16 changed files with 149 additions and 125 deletions
|
|
@ -611,16 +611,14 @@ static struct cmd_results *cmd_move_container(bool no_auto_back_and_forth,
|
|||
if (old_parent) {
|
||||
container_reap_empty(old_parent);
|
||||
} else if (old_ws) {
|
||||
if (workspace_consider_destroy(old_ws)) {
|
||||
old_ws = NULL;
|
||||
}
|
||||
workspace_consider_destroy(old_ws);
|
||||
}
|
||||
|
||||
// arrange windows
|
||||
if (root->fullscreen_global) {
|
||||
arrange_root();
|
||||
} else {
|
||||
if (old_ws) {
|
||||
if (old_ws && !old_ws->node.destroying) {
|
||||
arrange_workspace(old_ws);
|
||||
}
|
||||
arrange_node(node_get_parent(destination));
|
||||
|
|
@ -755,9 +753,7 @@ static struct cmd_results *cmd_move_in_direction(
|
|||
if (old_parent) {
|
||||
container_reap_empty(old_parent);
|
||||
} else if (old_ws) {
|
||||
if (workspace_consider_destroy(old_ws)) {
|
||||
old_ws = NULL;
|
||||
}
|
||||
workspace_consider_destroy(old_ws);
|
||||
}
|
||||
|
||||
struct sway_workspace *new_ws = container->pending.workspace;
|
||||
|
|
@ -765,9 +761,7 @@ static struct cmd_results *cmd_move_in_direction(
|
|||
if (root->fullscreen_global) {
|
||||
arrange_root();
|
||||
} else {
|
||||
if (old_ws) {
|
||||
arrange_workspace(old_ws);
|
||||
}
|
||||
arrange_workspace(old_ws);
|
||||
if (new_ws != old_ws) {
|
||||
arrange_workspace(new_ws);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue