summaryrefslogtreecommitdiff
path: root/recipes/gtk+/gtk+-2.12.11/cellrenderer-cairo.patch
blob: 4439e69fb6df9752efda4e64e828c44d2f52bec2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
Index: gtk/gtkcellrenderer.c
===================================================================
RCS file: /cvs/gnome/gtk+/gtk/gtkcellrenderer.c,v
retrieving revision 1.55
diff -u -r1.55 gtkcellrenderer.c
--- gtk/gtkcellrenderer.c	14 May 2006 04:25:28 -0000	1.55
+++ gtk/gtkcellrenderer.c	30 Jun 2006 10:57:43 -0000
@@ -551,6 +551,7 @@
 
   if (cell->cell_background_set && !selected)
     {
+#ifdef USE_CAIRO_INTERNALLY
       cairo_t *cr = gdk_cairo_create (window);
 
       gdk_cairo_rectangle (cr, background_area);
@@ -558,6 +559,16 @@
       cairo_fill (cr);
       
       cairo_destroy (cr);
+#else
+      GdkGC *gc;
+
+      gc = gdk_gc_new (window);
+      gdk_gc_set_rgb_fg_color (gc, &priv->cell_background);
+      gdk_draw_rectangle (window, gc, TRUE,
+                          background_area->x, background_area->y,
+                          background_area->width, background_area->height);
+      g_object_unref (gc);
+#endif
     }
 
   GTK_CELL_RENDERER_GET_CLASS (cell)->render (cell,