fix: drop stale overlay icon texture on re-resolve
This commit is contained in:
parent
8a69b99ae5
commit
21d686df5d
1 changed files with 7 additions and 0 deletions
7
kick.c
7
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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue