diff options
Diffstat (limited to 'src/core')
-rw-r--r-- | src/core/iconcache.c | 23 | ||||
-rw-r--r-- | src/core/iconcache.h | 1 | ||||
-rw-r--r-- | src/core/window.c | 1 |
3 files changed, 18 insertions, 7 deletions
diff --git a/src/core/iconcache.c b/src/core/iconcache.c index aa1d4339..a45d3d99 100644 --- a/src/core/iconcache.c +++ b/src/core/iconcache.c @@ -25,6 +25,7 @@ #include "iconcache.h" #include "ui.h" #include "errors.h" +#include "window-private.h" #include <X11/Xatom.h> @@ -690,6 +691,7 @@ scaled_from_pixdata (guchar *pixdata, gboolean meta_read_icons (MetaScreen *screen, Window xwindow, + char *res_name, MetaIconCache *icon_cache, Pixmap wm_hints_pixmap, Pixmap wm_hints_mask, @@ -847,13 +849,20 @@ meta_read_icons (MetaScreen *screen, { icon_cache->fallback_icon_dirty_forced = FALSE; - get_fallback_icons (screen, - iconp, - ideal_width, - ideal_height, - mini_iconp, - ideal_mini_width, - ideal_mini_height); + if (res_name != NULL) + { + *iconp = meta_ui_get_window_icon_from_name (screen->ui, res_name); + *mini_iconp = meta_ui_get_mini_icon_from_name (screen->ui, res_name); + } + + if (*iconp == NULL || *mini_iconp == NULL) + get_fallback_icons (screen, + iconp, + ideal_width, + ideal_height, + mini_iconp, + ideal_mini_width, + ideal_mini_height); replace_cache (icon_cache, USING_FALLBACK_ICON, *iconp, *mini_iconp); diff --git a/src/core/iconcache.h b/src/core/iconcache.h index d46abda0..7e9a1f6d 100644 --- a/src/core/iconcache.h +++ b/src/core/iconcache.h @@ -67,6 +67,7 @@ gboolean meta_icon_cache_get_icon_invalidated (MetaIconCache *icon_cache); gboolean meta_read_icons (MetaScreen *screen, Window xwindow, + char *res_name, MetaIconCache *icon_cache, Pixmap wm_hints_pixmap, Pixmap wm_hints_mask, diff --git a/src/core/window.c b/src/core/window.c index 68ac89ab..b301dbd9 100644 --- a/src/core/window.c +++ b/src/core/window.c @@ -6124,6 +6124,7 @@ meta_window_update_icon_now (MetaWindow *window) if (meta_read_icons (window->screen, window->xwindow, + window->res_name, &window->icon_cache, window->wm_hints_pixmap, window->wm_hints_mask, |