diff options
Diffstat (limited to 'src/core/iconcache.c')
-rw-r--r-- | src/core/iconcache.c | 34 |
1 files changed, 30 insertions, 4 deletions
diff --git a/src/core/iconcache.c b/src/core/iconcache.c index d3b5c67b..3c0f1b8d 100644 --- a/src/core/iconcache.c +++ b/src/core/iconcache.c @@ -523,6 +523,10 @@ meta_icon_cache_init (MetaIconCache *icon_cache) icon_cache->wm_hints_dirty = TRUE; icon_cache->kwm_win_icon_dirty = TRUE; icon_cache->net_wm_icon_dirty = TRUE; + + icon_cache->wm_hints_dirty_forced = FALSE; + icon_cache->kwm_win_icon_dirty_forced = FALSE; + icon_cache->fallback_icon_dirty_forced = FALSE; } static void @@ -556,6 +560,18 @@ meta_icon_cache_free (MetaIconCache *icon_cache) } void +meta_icon_cache_invalidate (MetaIconCache *icon_cache) +{ + icon_cache->wm_hints_dirty = TRUE; + icon_cache->kwm_win_icon_dirty = TRUE; + icon_cache->net_wm_icon_dirty = TRUE; + + icon_cache->wm_hints_dirty_forced = TRUE; + icon_cache->kwm_win_icon_dirty_forced = TRUE; + icon_cache->fallback_icon_dirty_forced = TRUE; +} + +void meta_icon_cache_property_changed (MetaIconCache *icon_cache, MetaDisplay *display, Atom atom) @@ -773,9 +789,12 @@ meta_read_icons (MetaScreen *screen, * hints change */ if ((pixmap != icon_cache->prev_pixmap || - mask != icon_cache->prev_mask) && + mask != icon_cache->prev_mask || + icon_cache->wm_hints_dirty_forced) && pixmap != None) { + icon_cache->wm_hints_dirty_forced = FALSE; + if (try_pixmap_and_mask (screen->display, pixmap, mask, iconp, ideal_width, ideal_height, @@ -800,9 +819,12 @@ meta_read_icons (MetaScreen *screen, get_kwm_win_icon (screen->display, xwindow, &pixmap, &mask); if ((pixmap != icon_cache->prev_pixmap || - mask != icon_cache->prev_mask) && + mask != icon_cache->prev_mask || + icon_cache->kwm_win_icon_dirty_forced) && pixmap != None) { + icon_cache->kwm_win_icon_dirty_forced = FALSE; + if (try_pixmap_and_mask (screen->display, pixmap, mask, iconp, ideal_width, ideal_height, mini_iconp, ideal_mini_width, ideal_mini_height)) @@ -818,9 +840,13 @@ meta_read_icons (MetaScreen *screen, } } - if (icon_cache->want_fallback && - icon_cache->origin < USING_FALLBACK_ICON) + if ((icon_cache->want_fallback && + icon_cache->origin < USING_FALLBACK_ICON) + || (icon_cache->fallback_icon_dirty_forced && + icon_cache->origin == USING_FALLBACK_ICON)) { + icon_cache->fallback_icon_dirty_forced = FALSE; + get_fallback_icons (screen, iconp, ideal_width, |