diff options
| author | Furkan Sahin <furkan-dev@proton.me> | 2024-07-10 12:20:53 -0400 |
|---|---|---|
| committer | Furkan Sahin <furkan-dev@proton.me> | 2024-07-10 12:20:53 -0400 |
| commit | 9636bda457fc41a3ff743e48d6cfe4d4b776d421 (patch) | |
| tree | 810a236034cbfef4b1a26285a76b333c3ace02ce | |
| parent | d61afe77f040bd6a357816095a815a9fed505db4 (diff) | |
transaction: Reparent all container children when disabling for scratchpad
Fixes: #8205
| -rw-r--r-- | sway/desktop/transaction.c | 9 |
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) { for (int i = 0; i < root->scratchpad->length; i++) { struct sway_container *con = root->scratchpad->items[i]; + // When a container is moved to a scratchpad, it's possible that it + // was moved into a floating container as part of the same transaction. + // In this case, we need to make sure we reparent all the container's + // children so that disabling the container will disable all descendants. + if (!con->view) for (int ii = 0; ii < con->current.children->length; ii++) { + struct sway_container *child = con->current.children->items[ii]; + wlr_scene_node_reparent(&child->scene_tree->node, con->content_tree); + } + wlr_scene_node_set_enabled(&con->scene_tree->node, false); } |
