summaryrefslogtreecommitdiff
path: root/gsk/gskrenderer.c
diff options
context:
space:
mode:
Diffstat (limited to 'gsk/gskrenderer.c')
-rw-r--r--gsk/gskrenderer.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/gsk/gskrenderer.c b/gsk/gskrenderer.c
index 399123bc8a..3ff7c6abdd 100644
--- a/gsk/gskrenderer.c
+++ b/gsk/gskrenderer.c
@@ -295,6 +295,11 @@ gsk_renderer_realize (GskRenderer *renderer,
}
priv->is_realized = TRUE;
+
+ g_object_notify (G_OBJECT (renderer), "realized");
+ if (surface)
+ g_object_notify (G_OBJECT (renderer), "surface");
+
return TRUE;
}
@@ -308,17 +313,25 @@ void
gsk_renderer_unrealize (GskRenderer *renderer)
{
GskRendererPrivate *priv = gsk_renderer_get_instance_private (renderer);
+ gboolean has_surface;
g_return_if_fail (GSK_IS_RENDERER (renderer));
if (!priv->is_realized)
return;
+ has_surface = priv->surface != NULL;
+
GSK_RENDERER_GET_CLASS (renderer)->unrealize (renderer);
+ g_clear_object (&priv->surface);
g_clear_pointer (&priv->prev_node, gsk_render_node_unref);
priv->is_realized = FALSE;
+
+ g_object_notify (G_OBJECT (renderer), "realized");
+ if (has_surface)
+ g_object_notify (G_OBJECT (renderer), "surface");
}
/**