From 5ead98b9866e37cde2d7f2beadb21abdd660a7c4 Mon Sep 17 00:00:00 2001 From: lkn Date: Sun, 28 Jun 2026 01:01:46 +0200 Subject: [PATCH] wayland: resize dockapp surface to fit dock tile The owner's toplevel surface may be larger than icon_size. Resize it before reparenting into the dock tile frame_buf so it fits properly. --- src/icon.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/icon.c b/src/icon.c index c77e131..ff0024e 100644 --- a/src/icon.c +++ b/src/icon.c @@ -817,8 +817,11 @@ static void set_dockapp_in_icon(WIcon *icon) * 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) + 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);