fix: remove duplicate fake_leader check that short-circuited WINGs view reparent

This commit is contained in:
Window Maker 2026-05-31 10:00:19 +02:00
parent 59088e2f86
commit 654f24d8f8
2 changed files with 10 additions and 10 deletions

View File

@ -7791,16 +7791,7 @@ 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. */
@ -7891,6 +7882,11 @@ wl_client_reparent(WNativeWindow client, WNativeWindow new_parent, int x, int y)
else if (client >= 0x10000000 && new_parent >= 0x10000000) {
struct wl_frame_buf *fb = frame_buf_find(client);
struct wl_frame_buf *parent_fb = frame_buf_find(new_parent);
fprintf(stderr, "reparent_framebuf: client=0x%lx fb=%p new_parent=0x%lx parent_fb=%p\n",
(unsigned long)client, (void*)fb,
(unsigned long)new_parent, (void*)parent_fb);
if (fb) fprintf(stderr, " fb: tree=%p scene_buf=%p\n", (void*)fb->tree, (void*)fb->scene_buf);
if (parent_fb) fprintf(stderr, " parent_fb: tree=%p\n", (void*)parent_fb->tree);
if (fb && parent_fb) {
fb->parent_id = new_parent;
fb->rel_x = x;

View File

@ -1641,6 +1641,10 @@ void wWindowMap(WWindow *wwin)
wm_backend->window_map(wwin->client_win);
wm_backend->window_select_events(wwin->client_win, wwin->event_mask);
fprintf(stderr, "wWindowMap: client_win=0x%lx frame_win=0x%lx top_width=%d\n",
(unsigned long)wwin->client_win,
(unsigned long)wwin->frame->core->window,
wwin->frame->top_width);
/* 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)