From 3098a7c2f86605fbdff207afbe523c1aaed5d3bd Mon Sep 17 00:00:00 2001 From: lkn Date: Sun, 28 Jun 2026 01:53:27 +0200 Subject: [PATCH] Revert "wayland: dockapp rendering (WIP - XWayland surface shown as-is)" This reverts commit e109979dcb6d699707b165e6dabe5567a442763b. --- src/icon.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/src/icon.c b/src/icon.c index 7c1f59c..ff0024e 100644 --- a/src/icon.c +++ b/src/icon.c @@ -814,10 +814,15 @@ static void set_dockapp_in_icon(WIcon *icon) /* Put the dock application in the icon. * On Wayland, the icon_win child window has no separate surface — * XWayland composites it into the parent toplevel. Reparent the - * owner's client surface into the dock tile frame_buf tree. */ - if (icon->owner && icon->owner->client_win) { - wm_backend->window_resize(icon->owner->client_win, w, h); - wm_backend->client_reparent(icon->owner->client_win, icon->core->window, + * owner's main client_win instead so its surface appears in the tile. */ + { + WNativeWindow reparent_win = (WNativeWindow)icon->icon_win; + if (icon->owner && icon->owner->client_win) { + reparent_win = icon->owner->client_win; + /* Resize the toplevel surface to fit the dock tile */ + wm_backend->window_resize(reparent_win, w, h); + } + wm_backend->client_reparent(reparent_win, icon->core->window, (wPreferences.icon_size - w) / 2, (wPreferences.icon_size - h) / 2); }