diff --git a/kick.c b/kick.c index 3f4f68d..9ea0422 100644 --- a/kick.c +++ b/kick.c @@ -2113,6 +2113,13 @@ static void overlay_icon_load_window(struct kick_window *w) { w->icon_resolved = true; const char *id = window_app_id(w); snprintf(w->icon_app_id, sizeof(w->icon_app_id), "%s", id ? id : ""); + /* Re-resolves happen on every map and app_id change: drop the previous + texture first, or one leaks per reload (overlay_make_icon only + overwrites the pointer). Protocol icons never reach here. */ + if (w->icon_wlr) { + wlr_texture_destroy(w->icon_wlr); + w->icon_wlr = NULL; + } overlay_make_icon(w->icon_app_id, &w->icon_w, &w->icon_h, &w->icon_wlr); if (w->icon_wlr)