MetaBackground: invalidate contents on video memory purged errors

We use FBOs so we need to cause them to be recreated.

https://bugzilla.gnome.org/show_bug.cgi?id=739178
This commit is contained in:
Rui Matos 2016-05-29 19:58:25 +02:00
parent 7f6bcea331
commit 53993ba4d2

View File

@ -317,6 +317,18 @@ meta_background_finalize (GObject *object)
G_OBJECT_CLASS (meta_background_parent_class)->finalize (object);
}
static void
meta_background_constructed (GObject *object)
{
MetaBackground *self = META_BACKGROUND (object);
MetaBackgroundPrivate *priv = self->priv;
G_OBJECT_CLASS (meta_background_parent_class)->constructed (object);
g_signal_connect_object (meta_screen_get_display (priv->screen), "gl-video-memory-purged",
G_CALLBACK (mark_changed), object, G_CONNECT_SWAPPED);
}
static void
meta_background_class_init (MetaBackgroundClass *klass)
{
@ -327,6 +339,7 @@ meta_background_class_init (MetaBackgroundClass *klass)
object_class->dispose = meta_background_dispose;
object_class->finalize = meta_background_finalize;
object_class->constructed = meta_background_constructed;
object_class->set_property = meta_background_set_property;
object_class->get_property = meta_background_get_property;