summaryrefslogtreecommitdiffstats
path: root/meta/recipes-gnome/gtk+/gtk+-2.24.8/cellrenderer-cairo.patch
blob: ba893292d6386eee50c4d197954288482ca9d8fe (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
Upstream-Status: Pending

Index: gtk/gtkcellrenderer.c
===================================================================
--- gtk/gtkcellrenderer.c.orig	2010-06-22 17:21:22.000000000 +0800
+++ gtk/gtkcellrenderer.c	2010-06-22 17:21:25.000000000 +0800
@@ -566,6 +566,7 @@
 
   if (cell->cell_background_set && !selected)
     {
+#ifdef USE_CAIRO_INTERNALLY
       cairo_t *cr = gdk_cairo_create (window);
 
       gdk_cairo_rectangle (cr, background_area);
@@ -573,6 +574,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,