Skip to content

Commit

Permalink
force icon cache lookup even if the item has a valid icon_fetch_uid (…
Browse files Browse the repository at this point in the history
…the fetching job could have been discarded before starting)
  • Loading branch information
giomatfois62 committed Feb 20, 2024
1 parent f7fe484 commit 6c5b8be
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 9 deletions.
3 changes: 0 additions & 3 deletions source/modes/dmenu.c
Original file line number Diff line number Diff line change
Expand Up @@ -715,9 +715,6 @@ static cairo_surface_t *dmenu_get_icon(const Mode *sw,
if (dr->icon_name == NULL) {
return NULL;
}
if (dr->icon_fetch_uid > 0 && dr->icon_fetch_size == height) {
return rofi_icon_fetcher_get(dr->icon_fetch_uid);
}
uint32_t uid = dr->icon_fetch_uid =
rofi_icon_fetcher_query(dr->icon_name, height);
dr->icon_fetch_size = height;
Expand Down
3 changes: 0 additions & 3 deletions source/modes/filebrowser.c
Original file line number Diff line number Diff line change
Expand Up @@ -609,9 +609,6 @@ static cairo_surface_t *_get_icon(const Mode *sw, unsigned int selected_line,
(FileBrowserModePrivateData *)mode_get_private_data(sw);
g_return_val_if_fail(pd->array != NULL, NULL);
FBFile *dr = &(pd->array[selected_line]);
if (dr->icon_fetch_uid > 0 && dr->icon_fetch_size == height) {
return rofi_icon_fetcher_get(dr->icon_fetch_uid);
}
if (rofi_icon_fetcher_file_is_image(dr->path)) {
dr->icon_fetch_uid = rofi_icon_fetcher_query(dr->path, height);
} else if (dr->type == RFILE) {
Expand Down
3 changes: 0 additions & 3 deletions source/modes/recursivebrowser.c
Original file line number Diff line number Diff line change
Expand Up @@ -445,9 +445,6 @@ static cairo_surface_t *_get_icon(const Mode *sw, unsigned int selected_line,
(FileBrowserModePrivateData *)mode_get_private_data(sw);
g_return_val_if_fail(pd->array != NULL, NULL);
FBFile *dr = &(pd->array[selected_line]);
if (dr->icon_fetch_uid > 0 && dr->icon_fetch_size == height) {
return rofi_icon_fetcher_get(dr->icon_fetch_uid);
}
if (rofi_icon_fetcher_file_is_image(dr->path)) {
dr->icon_fetch_uid = rofi_icon_fetcher_query(dr->path, height);
} else if (dr->type == RFILE) {
Expand Down

0 comments on commit 6c5b8be

Please sign in to comment.