fix: exit dialog content not visible at correct position — reparent fake_leader tree into frame tree
This commit is contained in:
parent
d95d2c007c
commit
dcfc4f44f4
|
|
@ -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) {
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue