Fix dialog position: update children when reparenting frame_buf

When fake_leader is reparented into the frame, its children (the WINGs
view frame_buf) weren't being repositioned. Now cascades position
updates to children of the reparented frame_buf.
This commit is contained in:
Levi Neely 2026-05-13 21:29:46 +02:00
parent 6cda661609
commit 4440476a35
1 changed files with 11 additions and 0 deletions

View File

@ -5808,6 +5808,17 @@ wl_client_reparent(WNativeWindow client, WNativeWindow new_parent, int x, int y)
fb->y = parent_fb->y + y;
if (fb->scene_buf)
wlr_scene_node_set_position(&fb->scene_buf->node, fb->x, fb->y);
/* Also update children of the reparented frame_buf */
struct wl_frame_buf *child;
wl_list_for_each(child, &wl_state.frame_list, link) {
if (child->parent_id == client) {
child->x = fb->x + child->rel_x;
child->y = fb->y + child->rel_y;
if (child->scene_buf)
wlr_scene_node_set_position(&child->scene_buf->node,
child->x, child->y);
}
}
}
}
}