From dcfc4f44f4b0bd36caa92c8d521376d8937b890d Mon Sep 17 00:00:00 2001 From: Window Maker Date: Sat, 30 May 2026 15:39:07 +0200 Subject: [PATCH] =?UTF-8?q?fix:=20exit=20dialog=20content=20not=20visible?= =?UTF-8?q?=20at=20correct=20position=20=E2=80=94=20reparent=20fake=5Flead?= =?UTF-8?q?er=20tree=20into=20frame=20tree?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/backend/wayland/wl_backend.c | 11 +++++++++++ src/window.c | 6 ++++++ 2 files changed, 17 insertions(+) diff --git a/src/backend/wayland/wl_backend.c b/src/backend/wayland/wl_backend.c index 18455c2..b8c26e2 100644 --- a/src/backend/wayland/wl_backend.c +++ b/src/backend/wayland/wl_backend.c @@ -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) { diff --git a/src/window.c b/src/window.c index 149a1a2..d9b2f9e 100644 --- a/src/window.c +++ b/src/window.c @@ -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; } }