From 458953268b61290e47915ba4c915985670829515 Mon Sep 17 00:00:00 2001 From: "Owen W. Taylor" Date: Fri, 12 Sep 2014 14:47:18 -0400 Subject: [PATCH] MetaBackground: fix getting stuck in a bad state after monitor changes After the ::monitors-changed signal, set the dirty flag on each new monitor information struct so the per-monitor resources will be recreated. --- src/compositor/meta-background.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/compositor/meta-background.c b/src/compositor/meta-background.c index 0fb784a15..0370f5515 100644 --- a/src/compositor/meta-background.c +++ b/src/compositor/meta-background.c @@ -133,8 +133,13 @@ on_monitors_changed (MetaScreen *screen, if (priv->screen) { + int i; + priv->n_monitors = meta_screen_get_n_monitors (screen); priv->monitors = g_new0 (MetaBackgroundMonitor, priv->n_monitors); + + for (i = 0; i < priv->n_monitors; i++) + priv->monitors[i].dirty = TRUE; } }