summaryrefslogtreecommitdiff
path: root/src/core/iconcache.c
diff options
context:
space:
mode:
authorosch <oliver at luced de>2019-04-12 23:48:52 +0200
committerlukefromdc <[email protected]>2019-04-23 18:35:39 +0000
commit54d6dd4cd27c97c3560c3ff2eb66fcfbbe5a51c0 (patch)
tree7ea59fcfd5b6b26c409904d34083d428c2f447a4 /src/core/iconcache.c
parent5e2f54dbf2417c3b5f8b1614010565a0a500382a (diff)
downloadmarco-54d6dd4cd27c97c3560c3ff2eb66fcfbbe5a51c0.tar.bz2
marco-54d6dd4cd27c97c3560c3ff2eb66fcfbbe5a51c0.tar.xz
reload icons if icon size preference changed
Diffstat (limited to 'src/core/iconcache.c')
-rw-r--r--src/core/iconcache.c34
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,