aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoralex-huff <alexhuff@bakahuff.com>2025-05-07 21:00:03 -0500
committerSimon Ser <contact@emersion.fr>2025-05-18 23:55:58 +0200
commitc70ac15525528dbb04a915498cb681bdeefca493 (patch)
tree7ff7b3400470f704ec82b2e1622dda5d1b6a2a79
parent557d8eaf6ddc283f627877c8dcf9b7e5289c6016 (diff)
move: fix broken titlebar when moving child to new workspace
Before this commit, when moving a non-leaf child of a tabbed or stacking container to a new workspace, the child would be detached from the parent container and the grandchildren would be sent to the new workspace but the child itself wouldn't be destroyed causing the titlebar to still be rendered as part of the parent container. Fixes #8648. (cherry picked from commit 8d3a52aa3076a34b008aed8ba142c955329a8874)
-rw-r--r--sway/commands/move.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/sway/commands/move.c b/sway/commands/move.c
index 8891514c..90e8585b 100644
--- a/sway/commands/move.c
+++ b/sway/commands/move.c
@@ -222,6 +222,7 @@ static void container_move_to_workspace(struct sway_container *container,
container_detach(container);
if (workspace_is_empty(workspace) && container->pending.children) {
workspace_unwrap_children(workspace, container);
+ container_reap_empty(container);
} else {
container->pending.width = container->pending.height = 0;
container->width_fraction = container->height_fraction = 0;