summaryrefslogtreecommitdiff
path: root/src/ui
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/ui
parent5e2f54dbf2417c3b5f8b1614010565a0a500382a (diff)
downloadmarco-54d6dd4cd27c97c3560c3ff2eb66fcfbbe5a51c0.tar.bz2
marco-54d6dd4cd27c97c3560c3ff2eb66fcfbbe5a51c0.tar.xz
reload icons if icon size preference changed
Diffstat (limited to 'src/ui')
-rw-r--r--src/ui/ui.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/ui/ui.c b/src/ui/ui.c
index 7b5bcdfc..f44b68cf 100644
--- a/src/ui/ui.c
+++ b/src/ui/ui.c
@@ -586,13 +586,16 @@ GdkPixbuf*
meta_ui_get_default_window_icon (MetaUI *ui)
{
static GdkPixbuf *default_icon = NULL;
- int scale;
+ static int icon_size = 0;
+ int current_icon_size = meta_prefs_get_icon_size();
- if (default_icon == NULL)
+ int scale;
+ if (default_icon == NULL || current_icon_size != icon_size)
{
scale = gtk_widget_get_scale_factor (GTK_WIDGET (ui->frames));
- default_icon = load_default_window_icon (meta_prefs_get_icon_size(), scale);
+ default_icon = load_default_window_icon (current_icon_size, scale);
g_assert (default_icon);
+ icon_size = current_icon_size;
}
g_object_ref (G_OBJECT (default_icon));