wayland: fix dockapp icon_window rendering

Dock apps (e.g. wmclock) use override_redirect icon_windows that get
reparented into dock tile frame_bufs. The reparent code only searched
toplevel_list, missing OR views in or_list. The icon_window's scene
node was never moved to the dock tile's scene tree, so it rendered
invisibly at (0,0) in the wrong layer.

- wl_client_reparent: search or_list for OR views and reparent their
  scene_node into the parent frame_buf's tree
- wl_window_map: handle OR view enable so window_map(icon_win) works
This commit is contained in:
lkn 2026-06-28 00:47:52 +02:00
parent 958bb8f4a9
commit f9f65613ba
2 changed files with 29 additions and 1 deletions

View File

@ -91,6 +91,23 @@ wl_client_reparent(WNativeWindow client, WNativeWindow new_parent, int x, int y)
return;
}
/* Override-redirect view (e.g. dockapp icon_window) reparented into
* a frame_buf — move its scene node under the parent's tree. */
{
struct wl_or_view *ov;
wl_list_for_each(ov, &wl_state.or_list, link) {
if (ov->xw_surface &&
(WNativeWindow)ov->xw_surface->window_id == client) {
struct wl_frame_buf *parent_fb = frame_buf_find(new_parent);
if (parent_fb && parent_fb->tree && ov->scene_node) {
wlr_scene_node_reparent(&ov->scene_node->node, parent_fb->tree);
wlr_scene_node_set_position(&ov->scene_node->node, x, y);
}
return;
}
}
}
/* Reparent to root = dialog teardown: destroy the child frame_buf */

View File

@ -81,11 +81,22 @@ wl_window_map(WNativeWindow win)
struct wl_toplevel_view *v = wl_find_view_by_id(win);
if (v && v->scene_node) {
wlr_scene_node_set_enabled(&v->scene_node->node, true);
/* XWayland dockapp mapping removed — no persistent X connection. */
return;
}
if (v)
return;
/* Override-redirect view (e.g. dockapp icon_window) */
{
struct wl_or_view *ov;
wl_list_for_each(ov, &wl_state.or_list, link) {
if (ov->xw_surface &&
(WNativeWindow)ov->xw_surface->window_id == win) {
if (ov->scene_node)
wlr_scene_node_set_enabled(&ov->scene_node->node, true);
return;
}
}
}
/* Frame buffer: enable its scene node and children. */
struct wl_frame_buf *fb = frame_buf_find(win);
if (fb && fb->scene_buf) {