From 11afb8e6782d962a54702e0277609f02e638c0c5 Mon Sep 17 00:00:00 2001 From: Dave Davenport Date: Fri, 5 Oct 2018 11:01:48 +0200 Subject: [PATCH] [Icon] Fix loading icons that are already in cache. fixes: #860 --- source/dialogs/drun.c | 2 +- source/dialogs/script.c | 2 +- source/dialogs/window.c | 1 + 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/source/dialogs/drun.c b/source/dialogs/drun.c index 18305ec3..48293822 100644 --- a/source/dialogs/drun.c +++ b/source/dialogs/drun.c @@ -777,7 +777,7 @@ static cairo_surface_t *_get_icon ( const Mode *sw, unsigned int selected_line, return rofi_icon_fetcher_get ( dr->icon_fetch_uid ); } dr->icon_fetch_uid = rofi_icon_fetcher_query ( dr->icon_name, height ); - return NULL; + return rofi_icon_fetcher_get ( dr->icon_fetch_uid ); } static char *drun_get_completion ( const Mode *sw, unsigned int index ) diff --git a/source/dialogs/script.c b/source/dialogs/script.c index d4bfbb4c..c834167d 100644 --- a/source/dialogs/script.c +++ b/source/dialogs/script.c @@ -332,7 +332,7 @@ static cairo_surface_t *script_get_icon ( const Mode *sw, unsigned int selected_ return rofi_icon_fetcher_get ( dr->icon_fetch_uid ); } dr->icon_fetch_uid = rofi_icon_fetcher_query ( dr->icon_name, height ); - return NULL; + return rofi_icon_fetcher_get ( dr->icon_fetch_uid ); } #include "mode-private.h" diff --git a/source/dialogs/window.c b/source/dialogs/window.c index 5355c192..17e085e0 100644 --- a/source/dialogs/window.c +++ b/source/dialogs/window.c @@ -919,6 +919,7 @@ static cairo_surface_t *_get_icon ( const Mode *sw, unsigned int selected_line, return rofi_icon_fetcher_get ( c->icon_fetch_uid ); } c->icon_fetch_uid = rofi_icon_fetcher_query ( c->class, size ); + return rofi_icon_fetcher_get ( c->icon_fetch_uid ); } return c->icon; }