fix: exit dialog content not visible at correct position — reparent fake_leader tree into frame tree

This commit is contained in:
Window Maker 2026-05-30 15:39:07 +02:00
parent d95d2c007c
commit dcfc4f44f4
2 changed files with 17 additions and 0 deletions

View File

@ -7791,6 +7791,17 @@ wl_client_reparent(WNativeWindow client, WNativeWindow new_parent, int x, int y)
return;
}
/* Fake leader: reparent its tree into the parent frame's tree. */
if (client >= 0x10000000) {
struct wl_frame_buf *fb = frame_buf_find(client);
struct wl_frame_buf *parent_fb = frame_buf_find(new_parent);
if (fb && parent_fb && parent_fb->tree && fb->tree) {
wlr_scene_node_reparent(&fb->tree->node, parent_fb->tree);
wlr_scene_node_set_position(&fb->tree->node, x, y);
}
return;
}
/* For WINGs internal windows: create a child frame_buf so the dialog
* content is visible in the scene graph. */
if (client >= 0x20000000 && new_parent >= 0x10000000) {

View File

@ -1641,6 +1641,12 @@ void wWindowMap(WWindow *wwin)
wm_backend->window_map(wwin->client_win);
wm_backend->window_select_events(wwin->client_win, wwin->event_mask);
/* Reparent fake_leader into frame tree on Wayland so dialog
* content renders at the correct position within the frame. */
if (wwin->frame && wwin->client_win >= 0x10000000)
wm_backend->client_reparent(wwin->client_win,
wwin->frame->core->window, 0, 0);
wwin->flags.mapped = 1;
}
}