summaryrefslogtreecommitdiffstats
path: root/meta/packages
diff options
context:
space:
mode:
authorRoss Burton <ross@openedhand.com>2006-12-22 13:11:47 +0000
committerRoss Burton <ross@openedhand.com>2006-12-22 13:11:47 +0000
commitd9b82c5938dda0a37ed63fe27dc966b4451eabba (patch)
treef6e2f4b3264f51e0d41a80a58dd5ee0bcb8d4417 /meta/packages
parentfa0d16a86bcf5c32626dc116ba82651b4d050e53 (diff)
downloadpoky-d9b82c5938dda0a37ed63fe27dc966b4451eabba.tar.gz
Disable xft patch, and instead patch out GTK+ from GtkEntry and GtkCellRenderer
git-svn-id: https://svn.o-hand.com/repos/poky/trunk@1084 311d38ba-8fff-0310-9ca6-ca027cbcb966
Diffstat (limited to 'meta/packages')
-rw-r--r--meta/packages/gtk+/gtk+-2.10.6/cellrenderer-cairo.patch32
-rw-r--r--meta/packages/gtk+/gtk+-2.10.6/entry-cairo.patch103
-rw-r--r--meta/packages/gtk+/gtk+_2.10.6.bb6
3 files changed, 139 insertions, 2 deletions
diff --git a/meta/packages/gtk+/gtk+-2.10.6/cellrenderer-cairo.patch b/meta/packages/gtk+/gtk+-2.10.6/cellrenderer-cairo.patch
new file mode 100644
index 0000000000..4439e69fb6
--- /dev/null
+++ b/meta/packages/gtk+/gtk+-2.10.6/cellrenderer-cairo.patch
@@ -0,0 +1,32 @@
1Index: gtk/gtkcellrenderer.c
2===================================================================
3RCS file: /cvs/gnome/gtk+/gtk/gtkcellrenderer.c,v
4retrieving revision 1.55
5diff -u -r1.55 gtkcellrenderer.c
6--- gtk/gtkcellrenderer.c 14 May 2006 04:25:28 -0000 1.55
7+++ gtk/gtkcellrenderer.c 30 Jun 2006 10:57:43 -0000
8@@ -551,6 +551,7 @@
9
10 if (cell->cell_background_set && !selected)
11 {
12+#ifdef USE_CAIRO_INTERNALLY
13 cairo_t *cr = gdk_cairo_create (window);
14
15 gdk_cairo_rectangle (cr, background_area);
16@@ -558,6 +559,16 @@
17 cairo_fill (cr);
18
19 cairo_destroy (cr);
20+#else
21+ GdkGC *gc;
22+
23+ gc = gdk_gc_new (window);
24+ gdk_gc_set_rgb_fg_color (gc, &priv->cell_background);
25+ gdk_draw_rectangle (window, gc, TRUE,
26+ background_area->x, background_area->y,
27+ background_area->width, background_area->height);
28+ g_object_unref (gc);
29+#endif
30 }
31
32 GTK_CELL_RENDERER_GET_CLASS (cell)->render (cell,
diff --git a/meta/packages/gtk+/gtk+-2.10.6/entry-cairo.patch b/meta/packages/gtk+/gtk+-2.10.6/entry-cairo.patch
new file mode 100644
index 0000000000..3313e7f132
--- /dev/null
+++ b/meta/packages/gtk+/gtk+-2.10.6/entry-cairo.patch
@@ -0,0 +1,103 @@
1Index: gtk/gtkentry.c
2===================================================================
3RCS file: /cvs/gnome/gtk+/gtk/gtkentry.c,v
4retrieving revision 1.317
5diff -u -r1.317 gtkentry.c
6--- gtk/gtkentry.c 29 Jun 2006 09:18:05 -0000 1.317
7+++ gtk/gtkentry.c 2 Jul 2006 14:14:24 -0000
8@@ -3337,7 +3337,9 @@
9 if (GTK_WIDGET_DRAWABLE (entry))
10 {
11 PangoLayout *layout = gtk_entry_ensure_layout (entry, TRUE);
12+#ifdef USE_CAIRO_INTERNALLY
13 cairo_t *cr;
14+#endif
15 gint x, y;
16 gint start_pos, end_pos;
17
18@@ -3345,23 +3347,35 @@
19
20 get_layout_position (entry, &x, &y);
21
22+#ifdef USE_CAIRO_INTERNALLY
23 cr = gdk_cairo_create (entry->text_area);
24
25 cairo_move_to (cr, x, y);
26 gdk_cairo_set_source_color (cr, &widget->style->text [widget->state]);
27 pango_cairo_show_layout (cr, layout);
28+#else
29+ gdk_draw_layout (entry->text_area, widget->style->text_gc [widget->state],
30+ x, y,
31+ layout);
32+#endif
33
34 if (gtk_editable_get_selection_bounds (GTK_EDITABLE (entry), &start_pos, &end_pos))
35 {
36 gint *ranges;
37 gint n_ranges, i;
38 PangoRectangle logical_rect;
39- GdkColor *selection_color, *text_color;
40 GtkBorder inner_border;
41+#ifdef USE_CAIRO_INTERNALLY
42+ GdkColor *selection_color, *text_color;
43+#else
44+ GdkGC *selection_gc, *text_gc;
45+ GdkRegion *clip_region;
46+#endif
47
48 pango_layout_get_pixel_extents (layout, NULL, &logical_rect);
49 gtk_entry_get_pixel_ranges (entry, &ranges, &n_ranges);
50
51+#ifdef USE_CAIRO_INTERNALLY
52 if (GTK_WIDGET_HAS_FOCUS (entry))
53 {
54 selection_color = &widget->style->base [GTK_STATE_SELECTED];
55@@ -3390,11 +3404,46 @@
56 cairo_move_to (cr, x, y);
57 gdk_cairo_set_source_color (cr, text_color);
58 pango_cairo_show_layout (cr, layout);
59-
60+#else
61+ if (GTK_WIDGET_HAS_FOCUS (entry))
62+ {
63+ selection_gc = widget->style->base_gc [GTK_STATE_SELECTED];
64+ text_gc = widget->style->text_gc [GTK_STATE_SELECTED];
65+ }
66+ else
67+ {
68+ selection_gc = widget->style->base_gc [GTK_STATE_ACTIVE];
69+ text_gc = widget->style->text_gc [GTK_STATE_ACTIVE];
70+ }
71+
72+ clip_region = gdk_region_new ();
73+ for (i = 0; i < n_ranges; ++i)
74+ {
75+ GdkRectangle rect;
76+
77+ rect.x = inner_border.left - entry->scroll_offset + ranges[2 * i];
78+ rect.y = y;
79+ rect.width = ranges[2 * i + 1];
80+ rect.height = logical_rect.height;
81+
82+ gdk_draw_rectangle (entry->text_area, selection_gc, TRUE,
83+ rect.x, rect.y, rect.width, rect.height);
84+
85+ gdk_region_union_with_rect (clip_region, &rect);
86+ }
87+
88+ gdk_gc_set_clip_region (text_gc, clip_region);
89+ gdk_draw_layout (entry->text_area, text_gc,
90+ x, y,
91+ layout);
92+ gdk_gc_set_clip_region (text_gc, NULL);
93+ gdk_region_destroy (clip_region);
94+#endif
95 g_free (ranges);
96 }
97-
98+#ifdef USE_CAIRO_INTERNALLY
99 cairo_destroy (cr);
100+#endif
101 }
102 }
103
diff --git a/meta/packages/gtk+/gtk+_2.10.6.bb b/meta/packages/gtk+/gtk+_2.10.6.bb
index a414f4d356..dc762d41cf 100644
--- a/meta/packages/gtk+/gtk+_2.10.6.bb
+++ b/meta/packages/gtk+/gtk+_2.10.6.bb
@@ -5,7 +5,7 @@ HOMEPAGE = "http://www.gtk.org"
5SECTION = "libs" 5SECTION = "libs"
6PRIORITY = "optional" 6PRIORITY = "optional"
7DEPENDS = "glib-2.0 pango atk jpeg libpng libxext libxcursor gtk-doc libgcrypt cairo" 7DEPENDS = "glib-2.0 pango atk jpeg libpng libxext libxcursor gtk-doc libgcrypt cairo"
8PR = "r3" 8PR = "r4"
9 9
10# disable per default - untested and not all patches included. 10# disable per default - untested and not all patches included.
11DEFAULT_PREFERENCE = "-1" 11DEFAULT_PREFERENCE = "-1"
@@ -24,7 +24,9 @@ SRC_URI = "ftp://ftp.gtk.org/pub/gtk/v2.10/gtk+-${PV}.tar.bz2 \
24 file://disable-print.patch;patch=1 \ 24 file://disable-print.patch;patch=1 \
25 file://hardcoded_libtool.patch;patch=1 \ 25 file://hardcoded_libtool.patch;patch=1 \
26 file://no-demos.patch;patch=1 \ 26 file://no-demos.patch;patch=1 \
27 file://pangoxft2.10.6.diff;patch=1" 27 file://cellrenderer-cairo.patch;patch=1;pnum=0 \
28 file://entry-cairo.patch;patch=1;pnum=0"
29# file://pangoxft2.10.6.diff;patch=1"
28# file://gtk+-handhelds.patch;patch=1 30# file://gtk+-handhelds.patch;patch=1
29# file://single-click.patch;patch=1 31# file://single-click.patch;patch=1
30# file://spinbutton.patch;patch=1 \ 32# file://spinbutton.patch;patch=1 \