aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLibravatar Alexander Orzechowski <alex@ozal.ski>2024-07-10 12:20:53 -0400
committerLibravatar Simon Ser <contact@emersion.fr>2024-09-20 19:42:28 +0200
commitb4ab8182b7f3f9c2c0ac0c28719f6f71808a36d8 (patch)
treef39e5bcc35449636f9b497394a7c33d6b2a2955a
parentbuild: avoid git repository discovery when determining version (diff)
downloadsway-b4ab8182b7f3f9c2c0ac0c28719f6f71808a36d8.tar.gz
sway-b4ab8182b7f3f9c2c0ac0c28719f6f71808a36d8.tar.zst
sway-b4ab8182b7f3f9c2c0ac0c28719f6f71808a36d8.zip
transaction: Reparent all container children when disabling for scratchpad
Fixes: #8205 (cherry picked from commit b881c2e84c4be3c7b996f85200cfe391a7979267)
-rw-r--r--sway/desktop/transaction.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/sway/desktop/transaction.c b/sway/desktop/transaction.c
index 7568990b..2ee5a5df 100644
--- a/sway/desktop/transaction.c
+++ b/sway/desktop/transaction.c
@@ -632,6 +632,15 @@ static void arrange_root(struct sway_root *root) {
632 for (int i = 0; i < root->scratchpad->length; i++) { 632 for (int i = 0; i < root->scratchpad->length; i++) {
633 struct sway_container *con = root->scratchpad->items[i]; 633 struct sway_container *con = root->scratchpad->items[i];
634 634
635 // When a container is moved to a scratchpad, it's possible that it
636 // was moved into a floating container as part of the same transaction.
637 // In this case, we need to make sure we reparent all the container's
638 // children so that disabling the container will disable all descendants.
639 if (!con->view) for (int ii = 0; ii < con->current.children->length; ii++) {
640 struct sway_container *child = con->current.children->items[ii];
641 wlr_scene_node_reparent(&child->scene_tree->node, con->content_tree);
642 }
643
635 wlr_scene_node_set_enabled(&con->scene_tree->node, false); 644 wlr_scene_node_set_enabled(&con->scene_tree->node, false);
636 } 645 }
637 646