mirror of
https://github.com/yshui/picom.git
synced 2025-04-14 17:53:25 -04:00
wm/tree: clear managed window object when a toplevel node is detached
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
This commit is contained in:
parent
bb5d026a6f
commit
7675a015bd
1 changed files with 1 additions and 3 deletions
|
@ -294,6 +294,7 @@ void wm_tree_detach(struct wm_tree *tree, struct wm_tree_node *subroot) {
|
|||
zombie->id = subroot->id;
|
||||
zombie->is_zombie = true;
|
||||
zombie->win = subroot->win;
|
||||
subroot->win = NULL;
|
||||
list_init_head(&zombie->children);
|
||||
list_replace(&subroot->siblings, &zombie->siblings);
|
||||
wm_tree_enqueue_change(tree, (struct wm_tree_change){
|
||||
|
@ -315,9 +316,6 @@ void wm_tree_attach(struct wm_tree *tree, struct wm_tree_node *child,
|
|||
|
||||
auto toplevel = wm_tree_find_toplevel_for(child);
|
||||
if (child == toplevel) {
|
||||
// This node could have a stale `->win` if it was a toplevel at
|
||||
// some point in the past.
|
||||
child->win = NULL;
|
||||
wm_tree_enqueue_change(tree, (struct wm_tree_change){
|
||||
.toplevel = child->id,
|
||||
.type = WM_TREE_CHANGE_TOPLEVEL_NEW,
|
||||
|
|
Loading…
Add table
Reference in a new issue