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.
This commit is contained in:
Owen W. Taylor 2014-09-12 14:47:18 -04:00
parent 1c227baf81
commit 458953268b

View File

@ -133,8 +133,13 @@ on_monitors_changed (MetaScreen *screen,
if (priv->screen) if (priv->screen)
{ {
int i;
priv->n_monitors = meta_screen_get_n_monitors (screen); priv->n_monitors = meta_screen_get_n_monitors (screen);
priv->monitors = g_new0 (MetaBackgroundMonitor, priv->n_monitors); priv->monitors = g_new0 (MetaBackgroundMonitor, priv->n_monitors);
for (i = 0; i < priv->n_monitors; i++)
priv->monitors[i].dirty = TRUE;
} }
} }