[Window] Small fix avoiding unneeded icon reloads.

This commit is contained in:
Dave Davenport 2022-06-28 20:58:11 +02:00
parent ceb2b9d295
commit 670a2445f4
1 changed files with 3 additions and 2 deletions

View File

@ -1033,9 +1033,9 @@ static cairo_surface_t *_get_icon(const Mode *sw, unsigned int selected_line,
if (c->icon) {
cairo_surface_destroy(c->icon);
c->icon = NULL;
c->thumbnail_checked = FALSE;
c->icon_checked = FALSE;
}
c->thumbnail_checked = FALSE;
c->icon_checked = FALSE;
}
if (config.window_thumbnail && c->thumbnail_checked == FALSE) {
c->icon = x11_helper_get_screenshot_surface_window(c->window, size);
@ -1052,6 +1052,7 @@ static cairo_surface_t *_get_icon(const Mode *sw, unsigned int selected_line,
char *class_lower = g_utf8_strdown(c->class, -1);
c->icon_fetch_uid = rofi_icon_fetcher_query(class_lower, size);
g_free(class_lower);
c->icon_fetch_size = size;
return rofi_icon_fetcher_get(c->icon_fetch_uid);
}
c->icon_fetch_size = size;