[gtk+/wip/ebassi/gsk-renderer: 92/135] Add details to css render nodes
- From: Emmanuele Bassi <ebassi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/wip/ebassi/gsk-renderer: 92/135] Add details to css render nodes
- Date: Mon, 17 Oct 2016 16:29:37 +0000 (UTC)
commit 1140c203094b7488cd79ff2aa8e95201730ea806
Author: Matthias Clasen <mclasen redhat com>
Date: Sat Aug 6 10:23:20 2016 -0400
Add details to css render nodes
Give all nodes the same detail about the owner widget.
This reveals that every GtkCssCustomGadget gets a
DrawGadgetContents node, even if their draw_func is NULL.
We may want to come up with a better solution for that.
gtk/gtkcssgadget.c | 8 ++++++--
1 files changed, 6 insertions(+), 2 deletions(-)
---
diff --git a/gtk/gtkcssgadget.c b/gtk/gtkcssgadget.c
index 604c62e..1074d1a 100644
--- a/gtk/gtkcssgadget.c
+++ b/gtk/gtkcssgadget.c
@@ -908,7 +908,8 @@ gtk_css_gadget_get_render_node (GtkCssGadget *gadget,
{
content_node = gsk_renderer_create_render_node (renderer);
- gsk_render_node_set_name (content_node, "DrawGadgetContent");
+ str = g_strconcat ("DrawGadgetContent<", G_OBJECT_TYPE_NAME (gtk_css_gadget_get_owner (gadget)),
">", NULL);
+ gsk_render_node_set_name (content_node, str);
gsk_render_node_set_bounds (content_node, &content_bounds);
gsk_render_node_set_transform (content_node, &content_transform);
@@ -919,6 +920,7 @@ gtk_css_gadget_get_render_node (GtkCssGadget *gadget,
contents_x, contents_y,
contents_width, contents_height);
+ g_free (str);
cairo_destroy (cr);
gsk_render_node_append_child (bg_node, content_node);
@@ -930,7 +932,8 @@ gtk_css_gadget_get_render_node (GtkCssGadget *gadget,
{
GskRenderNode *focus_node = gsk_renderer_create_render_node (renderer);
- gsk_render_node_set_name (focus_node, "Focus");
+ str = g_strconcat ("Focus<", G_OBJECT_TYPE_NAME (gtk_css_gadget_get_owner (gadget)), ">", NULL);
+ gsk_render_node_set_name (focus_node, str);
gsk_render_node_set_bounds (focus_node, &bounds);
cr = gsk_render_node_get_draw_context (focus_node);
@@ -940,6 +943,7 @@ gtk_css_gadget_get_render_node (GtkCssGadget *gadget,
margin.top,
width - margin.left - margin.right,
height - margin.top - margin.bottom);
+ g_free (str);
cairo_destroy (cr);
gsk_render_node_append_child (bg_node, focus_node);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]