From 350603316e8af31443de1c0b44674935ac142798 Mon Sep 17 00:00:00 2001 From: Ross Burton Date: Mon, 4 Jun 2007 11:45:01 +0000 Subject: Upgrade GTK+ 2.10.x to 2.10.12 git-svn-id: https://svn.o-hand.com/repos/poky/trunk@1854 311d38ba-8fff-0310-9ca6-ca027cbcb966 --- meta/conf/distro/poky-bleeding.conf | 2 +- .../gtk+/gtk+-2.10.11/automake-lossage.patch | 24 - .../gtk+/gtk+-2.10.11/cellrenderer-cairo.patch | 32 - .../packages/gtk+/gtk+-2.10.11/disable-print.patch | 50 - .../gtk+/gtk+-2.10.11/disable-tooltips.patch | 11 - meta/packages/gtk+/gtk+-2.10.11/entry-cairo.patch | 103 - .../gtk+/gtk+-2.10.11/gtk+-handhelds.patch | 149 -- .../gtk+/gtk+-2.10.11/gtklabel-resize-patch | 10 - .../gtk+/gtk+-2.10.11/hardcoded_libtool.patch | 29 - .../gtk+/gtk+-2.10.11/menu-deactivate.patch | 51 - meta/packages/gtk+/gtk+-2.10.11/migration.patch | 611 ----- meta/packages/gtk+/gtk+-2.10.11/no-demos.patch | 10 - meta/packages/gtk+/gtk+-2.10.11/no-xwc.patch | 151 -- .../packages/gtk+/gtk+-2.10.11/pangoxft2.10.6.diff | 2456 -------------------- .../packages/gtk+/gtk+-2.10.11/run-iconcache.patch | 19 - .../gtk+/gtk+-2.10.11/scroll-timings.patch | 11 - meta/packages/gtk+/gtk+-2.10.11/single-click.patch | 56 - .../gtk+/gtk+-2.10.11/small-gtkfilesel.patch | 267 --- meta/packages/gtk+/gtk+-2.10.11/spinbutton.patch | 130 -- meta/packages/gtk+/gtk+-2.10.11/xsettings.patch | 16 - .../gtk+/gtk+-2.10.12/automake-lossage.patch | 24 + .../gtk+/gtk+-2.10.12/cellrenderer-cairo.patch | 32 + .../packages/gtk+/gtk+-2.10.12/disable-print.patch | 50 + .../gtk+/gtk+-2.10.12/disable-tooltips.patch | 11 + meta/packages/gtk+/gtk+-2.10.12/entry-cairo.patch | 103 + .../gtk+/gtk+-2.10.12/gtk+-handhelds.patch | 149 ++ .../gtk+/gtk+-2.10.12/gtklabel-resize-patch | 10 + .../gtk+/gtk+-2.10.12/hardcoded_libtool.patch | 29 + .../gtk+/gtk+-2.10.12/menu-deactivate.patch | 51 + meta/packages/gtk+/gtk+-2.10.12/migration.patch | 611 +++++ meta/packages/gtk+/gtk+-2.10.12/no-demos.patch | 10 + meta/packages/gtk+/gtk+-2.10.12/no-xwc.patch | 151 ++ .../packages/gtk+/gtk+-2.10.12/pangoxft2.10.6.diff | 2456 ++++++++++++++++++++ .../packages/gtk+/gtk+-2.10.12/run-iconcache.patch | 19 + .../gtk+/gtk+-2.10.12/scroll-timings.patch | 11 + meta/packages/gtk+/gtk+-2.10.12/single-click.patch | 56 + .../gtk+/gtk+-2.10.12/small-gtkfilesel.patch | 267 +++ meta/packages/gtk+/gtk+-2.10.12/spinbutton.patch | 130 ++ meta/packages/gtk+/gtk+-2.10.12/xsettings.patch | 16 + meta/packages/gtk+/gtk+_2.10.11.bb | 107 - meta/packages/gtk+/gtk+_2.10.12.bb | 107 + 41 files changed, 4294 insertions(+), 4294 deletions(-) delete mode 100644 meta/packages/gtk+/gtk+-2.10.11/automake-lossage.patch delete mode 100644 meta/packages/gtk+/gtk+-2.10.11/cellrenderer-cairo.patch delete mode 100644 meta/packages/gtk+/gtk+-2.10.11/disable-print.patch delete mode 100644 meta/packages/gtk+/gtk+-2.10.11/disable-tooltips.patch delete mode 100644 meta/packages/gtk+/gtk+-2.10.11/entry-cairo.patch delete mode 100644 meta/packages/gtk+/gtk+-2.10.11/gtk+-handhelds.patch delete mode 100644 meta/packages/gtk+/gtk+-2.10.11/gtklabel-resize-patch delete mode 100644 meta/packages/gtk+/gtk+-2.10.11/hardcoded_libtool.patch delete mode 100644 meta/packages/gtk+/gtk+-2.10.11/menu-deactivate.patch delete mode 100644 meta/packages/gtk+/gtk+-2.10.11/migration.patch delete mode 100644 meta/packages/gtk+/gtk+-2.10.11/no-demos.patch delete mode 100644 meta/packages/gtk+/gtk+-2.10.11/no-xwc.patch delete mode 100644 meta/packages/gtk+/gtk+-2.10.11/pangoxft2.10.6.diff delete mode 100644 meta/packages/gtk+/gtk+-2.10.11/run-iconcache.patch delete mode 100644 meta/packages/gtk+/gtk+-2.10.11/scroll-timings.patch delete mode 100644 meta/packages/gtk+/gtk+-2.10.11/single-click.patch delete mode 100644 meta/packages/gtk+/gtk+-2.10.11/small-gtkfilesel.patch delete mode 100644 meta/packages/gtk+/gtk+-2.10.11/spinbutton.patch delete mode 100644 meta/packages/gtk+/gtk+-2.10.11/xsettings.patch create mode 100644 meta/packages/gtk+/gtk+-2.10.12/automake-lossage.patch create mode 100644 meta/packages/gtk+/gtk+-2.10.12/cellrenderer-cairo.patch create mode 100644 meta/packages/gtk+/gtk+-2.10.12/disable-print.patch create mode 100644 meta/packages/gtk+/gtk+-2.10.12/disable-tooltips.patch create mode 100644 meta/packages/gtk+/gtk+-2.10.12/entry-cairo.patch create mode 100644 meta/packages/gtk+/gtk+-2.10.12/gtk+-handhelds.patch create mode 100644 meta/packages/gtk+/gtk+-2.10.12/gtklabel-resize-patch create mode 100644 meta/packages/gtk+/gtk+-2.10.12/hardcoded_libtool.patch create mode 100644 meta/packages/gtk+/gtk+-2.10.12/menu-deactivate.patch create mode 100644 meta/packages/gtk+/gtk+-2.10.12/migration.patch create mode 100644 meta/packages/gtk+/gtk+-2.10.12/no-demos.patch create mode 100644 meta/packages/gtk+/gtk+-2.10.12/no-xwc.patch create mode 100644 meta/packages/gtk+/gtk+-2.10.12/pangoxft2.10.6.diff create mode 100644 meta/packages/gtk+/gtk+-2.10.12/run-iconcache.patch create mode 100644 meta/packages/gtk+/gtk+-2.10.12/scroll-timings.patch create mode 100644 meta/packages/gtk+/gtk+-2.10.12/single-click.patch create mode 100644 meta/packages/gtk+/gtk+-2.10.12/small-gtkfilesel.patch create mode 100644 meta/packages/gtk+/gtk+-2.10.12/spinbutton.patch create mode 100644 meta/packages/gtk+/gtk+-2.10.12/xsettings.patch delete mode 100644 meta/packages/gtk+/gtk+_2.10.11.bb create mode 100644 meta/packages/gtk+/gtk+_2.10.12.bb (limited to 'meta') diff --git a/meta/conf/distro/poky-bleeding.conf b/meta/conf/distro/poky-bleeding.conf index 0be01008bb..c6ed2fd4b5 100644 --- a/meta/conf/distro/poky-bleeding.conf +++ b/meta/conf/distro/poky-bleeding.conf @@ -3,7 +3,7 @@ PREFERRED_VERSION_glib-2.0-native ?= "2.12.4" PREFERRED_VERSION_cairo ?= "1.4.2" PREFERRED_VERSION_pango ?= "1.16.4" -PREFERRED_VERSION_gtk+ ?= "2.10.11" +PREFERRED_VERSION_gtk+ ?= "2.10.12" PREFERRED_VERSION_gtk-engines ?= "2.10.0" require conf/distro/poky.conf diff --git a/meta/packages/gtk+/gtk+-2.10.11/automake-lossage.patch b/meta/packages/gtk+/gtk+-2.10.11/automake-lossage.patch deleted file mode 100644 index 0d423ddbb9..0000000000 --- a/meta/packages/gtk+/gtk+-2.10.11/automake-lossage.patch +++ /dev/null @@ -1,24 +0,0 @@ ---- gtk+-2.4.1/docs/tutorial/Makefile.am~ 2003-05-06 22:54:20.000000000 +0100 -+++ gtk+-2.4.1/docs/tutorial/Makefile.am 2004-05-08 12:31:41.000000000 +0100 -@@ -52,21 +52,5 @@ - - dist-hook: html - cp -Rp $(srcdir)/html $(distdir) --else --html: -- echo "***" -- echo "*** Warning: Tutorial not built" -- echo "***" -- --pdf: -- echo "***" -- echo "*** Warning: Tutorial not built" -- echo "***" -- --dist-hook: -- echo "***" -- echo "*** Warning: Tutorial not built" -- echo "*** DISTRIBUTION IS INCOMPLETE" -- echo "***" - endif - diff --git a/meta/packages/gtk+/gtk+-2.10.11/cellrenderer-cairo.patch b/meta/packages/gtk+/gtk+-2.10.11/cellrenderer-cairo.patch deleted file mode 100644 index 4439e69fb6..0000000000 --- a/meta/packages/gtk+/gtk+-2.10.11/cellrenderer-cairo.patch +++ /dev/null @@ -1,32 +0,0 @@ -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, diff --git a/meta/packages/gtk+/gtk+-2.10.11/disable-print.patch b/meta/packages/gtk+/gtk+-2.10.11/disable-print.patch deleted file mode 100644 index 1067773f12..0000000000 --- a/meta/packages/gtk+/gtk+-2.10.11/disable-print.patch +++ /dev/null @@ -1,50 +0,0 @@ ---- gtk+-2.10.0/configure.in~ 2006-07-05 18:11:44.000000000 +0200 -+++ gtk+-2.10.0/configure.in 2006-07-05 18:11:44.000000000 +0200 -@@ -1539,26 +1539,27 @@ - # Printing system checks - ################################################################ - --AC_PATH_PROG(CUPS_CONFIG, cups-config, no) --if test "x$CUPS_CONFIG" != "xno"; then -- CUPS_CFLAGS=`cups-config --cflags | sed 's/-O[0-9]*//' | sed 's/-m[^\t]*//g'` -- CUPS_LIBS=`cups-config --libs` -- -- CUPS_API_VERSION=`cups-config --api-version` -- CUPS_API_MAJOR=`echo -n $CUPS_API_VERSION | awk -F. '{print $1}'` -- CUPS_API_MINOR=`echo -n $CUPS_API_VERSION | awk -F. '{print $2}'` -- -- if test $CUPS_API_MAJOR -gt 1 -o \ -- $CUPS_API_MAJOR -eq 1 -a $CUPS_API_MINOR -ge 2; then -- AC_DEFINE(HAVE_CUPS_API_1_2) -- fi -- -- AC_SUBST(CUPS_API_MAJOR) -- AC_SUBST(CUPS_API_MINOR) -- AC_SUBST(CUPS_CFLAGS) -- AC_SUBST(CUPS_LIBS) --fi --AM_CONDITIONAL(HAVE_CUPS, test "x$CUPS_CONFIG" != "xno") -+#AC_PATH_PROG(CUPS_CONFIG, cups-config, no) -+#if test "x$CUPS_CONFIG" != "xno"; then -+# CUPS_CFLAGS=`cups-config --cflags | sed 's/-O[0-9]*//' | sed 's/-m[^\t]*//g'` -+# CUPS_LIBS=`cups-config --libs` -+# -+# CUPS_API_VERSION=`cups-config --api-version` -+# CUPS_API_MAJOR=`echo -n $CUPS_API_VERSION | awk -F. '{print $1}'` -+# CUPS_API_MINOR=`echo -n $CUPS_API_VERSION | awk -F. '{print $2}'` -+# -+# if test $CUPS_API_MAJOR -gt 1 -o \ -+# $CUPS_API_MAJOR -eq 1 -a $CUPS_API_MINOR -ge 2; then -+# AC_DEFINE(HAVE_CUPS_API_1_2) -+# fi -+# -+# AC_SUBST(CUPS_API_MAJOR) -+# AC_SUBST(CUPS_API_MINOR) -+# AC_SUBST(CUPS_CFLAGS) -+# AC_SUBST(CUPS_LIBS) -+#fi -+#AM_CONDITIONAL(HAVE_CUPS, test "x$CUPS_CONFIG" != "xno") -+AM_CONDITIONAL(HAVE_CUPS,false) - - gtk_save_cppflags="$CPPFLAGS" - CPPFLAGS="$CPPFLAGS $GTK_DEP_CFLAGS" diff --git a/meta/packages/gtk+/gtk+-2.10.11/disable-tooltips.patch b/meta/packages/gtk+/gtk+-2.10.11/disable-tooltips.patch deleted file mode 100644 index d71d839c3c..0000000000 --- a/meta/packages/gtk+/gtk+-2.10.11/disable-tooltips.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- gtk+-2.4.3/gtk/gtktooltips.c.old 2004-07-04 18:52:04.000000000 +0100 -+++ gtk+-2.4.3/gtk/gtktooltips.c 2004-07-04 18:52:08.000000000 +0100 -@@ -118,7 +118,7 @@ - tooltips->tips_data_list = NULL; - - tooltips->delay = DEFAULT_DELAY; -- tooltips->enabled = TRUE; -+ tooltips->enabled = FALSE; - tooltips->timer_tag = 0; - tooltips->use_sticky_delay = FALSE; - tooltips->last_popdown.tv_sec = -1; diff --git a/meta/packages/gtk+/gtk+-2.10.11/entry-cairo.patch b/meta/packages/gtk+/gtk+-2.10.11/entry-cairo.patch deleted file mode 100644 index 3313e7f132..0000000000 --- a/meta/packages/gtk+/gtk+-2.10.11/entry-cairo.patch +++ /dev/null @@ -1,103 +0,0 @@ -Index: gtk/gtkentry.c -=================================================================== -RCS file: /cvs/gnome/gtk+/gtk/gtkentry.c,v -retrieving revision 1.317 -diff -u -r1.317 gtkentry.c ---- gtk/gtkentry.c 29 Jun 2006 09:18:05 -0000 1.317 -+++ gtk/gtkentry.c 2 Jul 2006 14:14:24 -0000 -@@ -3337,7 +3337,9 @@ - if (GTK_WIDGET_DRAWABLE (entry)) - { - PangoLayout *layout = gtk_entry_ensure_layout (entry, TRUE); -+#ifdef USE_CAIRO_INTERNALLY - cairo_t *cr; -+#endif - gint x, y; - gint start_pos, end_pos; - -@@ -3345,23 +3347,35 @@ - - get_layout_position (entry, &x, &y); - -+#ifdef USE_CAIRO_INTERNALLY - cr = gdk_cairo_create (entry->text_area); - - cairo_move_to (cr, x, y); - gdk_cairo_set_source_color (cr, &widget->style->text [widget->state]); - pango_cairo_show_layout (cr, layout); -+#else -+ gdk_draw_layout (entry->text_area, widget->style->text_gc [widget->state], -+ x, y, -+ layout); -+#endif - - if (gtk_editable_get_selection_bounds (GTK_EDITABLE (entry), &start_pos, &end_pos)) - { - gint *ranges; - gint n_ranges, i; - PangoRectangle logical_rect; -- GdkColor *selection_color, *text_color; - GtkBorder inner_border; -+#ifdef USE_CAIRO_INTERNALLY -+ GdkColor *selection_color, *text_color; -+#else -+ GdkGC *selection_gc, *text_gc; -+ GdkRegion *clip_region; -+#endif - - pango_layout_get_pixel_extents (layout, NULL, &logical_rect); - gtk_entry_get_pixel_ranges (entry, &ranges, &n_ranges); - -+#ifdef USE_CAIRO_INTERNALLY - if (GTK_WIDGET_HAS_FOCUS (entry)) - { - selection_color = &widget->style->base [GTK_STATE_SELECTED]; -@@ -3390,11 +3404,46 @@ - cairo_move_to (cr, x, y); - gdk_cairo_set_source_color (cr, text_color); - pango_cairo_show_layout (cr, layout); -- -+#else -+ if (GTK_WIDGET_HAS_FOCUS (entry)) -+ { -+ selection_gc = widget->style->base_gc [GTK_STATE_SELECTED]; -+ text_gc = widget->style->text_gc [GTK_STATE_SELECTED]; -+ } -+ else -+ { -+ selection_gc = widget->style->base_gc [GTK_STATE_ACTIVE]; -+ text_gc = widget->style->text_gc [GTK_STATE_ACTIVE]; -+ } -+ -+ clip_region = gdk_region_new (); -+ for (i = 0; i < n_ranges; ++i) -+ { -+ GdkRectangle rect; -+ -+ rect.x = inner_border.left - entry->scroll_offset + ranges[2 * i]; -+ rect.y = y; -+ rect.width = ranges[2 * i + 1]; -+ rect.height = logical_rect.height; -+ -+ gdk_draw_rectangle (entry->text_area, selection_gc, TRUE, -+ rect.x, rect.y, rect.width, rect.height); -+ -+ gdk_region_union_with_rect (clip_region, &rect); -+ } -+ -+ gdk_gc_set_clip_region (text_gc, clip_region); -+ gdk_draw_layout (entry->text_area, text_gc, -+ x, y, -+ layout); -+ gdk_gc_set_clip_region (text_gc, NULL); -+ gdk_region_destroy (clip_region); -+#endif - g_free (ranges); - } -- -+#ifdef USE_CAIRO_INTERNALLY - cairo_destroy (cr); -+#endif - } - } - diff --git a/meta/packages/gtk+/gtk+-2.10.11/gtk+-handhelds.patch b/meta/packages/gtk+/gtk+-2.10.11/gtk+-handhelds.patch deleted file mode 100644 index 1ea86ce6b2..0000000000 --- a/meta/packages/gtk+/gtk+-2.10.11/gtk+-handhelds.patch +++ /dev/null @@ -1,149 +0,0 @@ -Index: gtk+-2.10.6/gtk/gtkarrow.c -=================================================================== ---- gtk+-2.10.6.orig/gtk/gtkarrow.c 2006-05-14 05:25:28.000000000 +0100 -+++ gtk+-2.10.6/gtk/gtkarrow.c 2006-11-14 12:03:45.000000000 +0000 -@@ -31,7 +31,7 @@ - #include "gtkintl.h" - #include "gtkalias.h" - --#define MIN_ARROW_SIZE 15 -+#define MIN_ARROW_SIZE 7 - - enum { - PROP_0, -@@ -53,6 +53,8 @@ - guint prop_id, - GValue *value, - GParamSpec *pspec); -+static void gtk_arrow_size_request (GtkWidget *arrow, -+ GtkRequisition *requisition); - - - G_DEFINE_TYPE (GtkArrow, gtk_arrow, GTK_TYPE_MISC) -@@ -88,6 +90,7 @@ - GTK_PARAM_READWRITE)); - - widget_class->expose_event = gtk_arrow_expose; -+ widget_class->size_request = gtk_arrow_size_request; - } - - static void -@@ -143,13 +146,18 @@ - } - - static void -+gtk_arrow_size_request (GtkWidget *arrow, -+ GtkRequisition *requisition) -+{ -+ requisition->width = MIN_ARROW_SIZE + GTK_MISC (arrow)->xpad * 2; -+ requisition->height = MIN_ARROW_SIZE + GTK_MISC (arrow)->ypad * 2; -+} -+ -+static void - gtk_arrow_init (GtkArrow *arrow) - { - GTK_WIDGET_SET_FLAGS (arrow, GTK_NO_WINDOW); - -- GTK_WIDGET (arrow)->requisition.width = MIN_ARROW_SIZE + GTK_MISC (arrow)->xpad * 2; -- GTK_WIDGET (arrow)->requisition.height = MIN_ARROW_SIZE + GTK_MISC (arrow)->ypad * 2; -- - arrow->arrow_type = GTK_ARROW_RIGHT; - arrow->shadow_type = GTK_SHADOW_OUT; - } -Index: gtk+-2.10.6/gtk/gtkentry.c -=================================================================== ---- gtk+-2.10.6.orig/gtk/gtkentry.c 2006-11-14 12:03:45.000000000 +0000 -+++ gtk+-2.10.6/gtk/gtkentry.c 2006-11-14 12:07:02.000000000 +0000 -@@ -577,6 +577,18 @@ - 0.0, - GTK_PARAM_READWRITE)); - -+ // Added by gtk+-handhelds.patch -+ gtk_widget_class_install_style_property (widget_class, -+ g_param_spec_int ("min_width", -+ P_("Minimum width"), -+ P_("Minimum width of the entry field"), -+ 0, -+ G_MAXINT, -+ MIN_ENTRY_WIDTH, -+ G_PARAM_READABLE)); -+ -+ -+ - /** - * GtkEntry:truncate-multiline: - * -@@ -1286,7 +1298,7 @@ - { - GtkEntry *entry = GTK_ENTRY (widget); - PangoFontMetrics *metrics; -- gint xborder, yborder; -+ gint xborder, yborder, min_width; - GtkBorder inner_border; - PangoContext *context; - -@@ -1302,8 +1314,10 @@ - _gtk_entry_get_borders (entry, &xborder, &yborder); - _gtk_entry_effective_inner_border (entry, &inner_border); - -+ gtk_widget_style_get (widget, "min_width", &min_width, NULL); -+ - if (entry->width_chars < 0) -- requisition->width = MIN_ENTRY_WIDTH + xborder * 2 + inner_border.left + inner_border.right; -+ requisition->width = min_width + xborder * 2 + inner_border.left + inner_border.right; - else - { - gint char_width = pango_font_metrics_get_approximate_char_width (metrics); -Index: gtk+-2.10.6/gtk/gtkrange.c -=================================================================== ---- gtk+-2.10.6.orig/gtk/gtkrange.c 2006-11-14 12:03:44.000000000 +0000 -+++ gtk+-2.10.6/gtk/gtkrange.c 2006-11-14 12:07:40.000000000 +0000 -@@ -197,6 +197,7 @@ - static gboolean gtk_range_key_press (GtkWidget *range, - GdkEventKey *event); - -+static GdkAtom recognize_protocols_atom, atom_atom; - - static guint signals[LAST_SIGNAL]; - -@@ -213,6 +214,9 @@ - object_class = (GtkObjectClass*) class; - widget_class = (GtkWidgetClass*) class; - -+ recognize_protocols_atom = gdk_atom_intern ("RECOGNIZE_PROTOCOLS", FALSE); -+ atom_atom = gdk_atom_intern ("ATOM", FALSE); -+ - gobject_class->set_property = gtk_range_set_property; - gobject_class->get_property = gtk_range_get_property; - gobject_class->finalize = gtk_range_finalize; -@@ -1020,6 +1024,12 @@ - &attributes, attributes_mask); - gdk_window_set_user_data (range->event_window, range); - -+ gdk_property_change (range->event_window, -+ recognize_protocols_atom, -+ atom_atom, -+ 32, GDK_PROP_MODE_REPLACE, -+ NULL, 0); -+ - widget->style = gtk_style_attach (widget->style, widget->window); - } - -@@ -1569,7 +1579,7 @@ - - /* ignore presses when we're already doing something else. */ - if (range->layout->grab_location != MOUSE_OUTSIDE) -- return FALSE; -+ return TRUE; - - range->layout->mouse_x = event->x; - range->layout->mouse_y = event->y; -@@ -1778,7 +1788,7 @@ - return TRUE; - } - -- return FALSE; -+ return TRUE; - } - - /** diff --git a/meta/packages/gtk+/gtk+-2.10.11/gtklabel-resize-patch b/meta/packages/gtk+/gtk+-2.10.11/gtklabel-resize-patch deleted file mode 100644 index df29656343..0000000000 --- a/meta/packages/gtk+/gtk+-2.10.11/gtklabel-resize-patch +++ /dev/null @@ -1,10 +0,0 @@ ---- gtk+-2.4.3/gtk/gtklabel.c~ 2004-06-11 13:50:34.000000000 +0100 -+++ gtk+-2.4.3/gtk/gtklabel.c 2004-07-05 13:33:57.000000000 +0100 -@@ -1623,6 +1623,7 @@ - - /* We have to clear the layout, fonts etc. may have changed */ - gtk_label_clear_layout (label); -+ gtk_widget_queue_resize (GTK_WIDGET (label)); - } - - static void diff --git a/meta/packages/gtk+/gtk+-2.10.11/hardcoded_libtool.patch b/meta/packages/gtk+/gtk+-2.10.11/hardcoded_libtool.patch deleted file mode 100644 index 6adb0cfef6..0000000000 --- a/meta/packages/gtk+/gtk+-2.10.11/hardcoded_libtool.patch +++ /dev/null @@ -1,29 +0,0 @@ ---- /tmp/configure.in 2007-01-08 17:50:49.000000000 +0100 -+++ gtk+-2.10.7/configure.in 2007-01-08 17:52:33.495251000 +0100 -@@ -371,7 +371,7 @@ - case $enable_explicit_deps in - auto) - export SED -- deplibs_check_method=`(./libtool --config; echo 'eval echo $deplibs_check_method') | sh` -+ deplibs_check_method=`(./$host_alias-libtool --config; echo 'eval echo $deplibs_check_method') | sh` - if test "x$deplibs_check_method" '!=' xpass_all || test "x$enable_static" = xyes ; then - enable_explicit_deps=yes - else -@@ -773,7 +773,7 @@ - dnl Now we check to see if our libtool supports shared lib deps - dnl (in a rather ugly way even) - if $dynworks; then -- pixbuf_libtool_config="${CONFIG_SHELL-/bin/sh} ./libtool --config" -+ pixbuf_libtool_config="${CONFIG_SHELL-/bin/sh} ./$host_alias-libtool --config" - pixbuf_deplibs_check=`$pixbuf_libtool_config | \ - grep '^[[a-z_]]*check[[a-z_]]*_method=[['\''"]]' | \ - sed 's/.*[['\''"]]\(.*\)[['\''"]]$/\1/'` -@@ -1611,7 +1611,7 @@ - # We are using gmodule-no-export now, but I'm leaving the stripping - # code in place for now, since pango and atk still require gmodule. - export SED --export_dynamic=`(./libtool --config; echo eval echo \\$export_dynamic_flag_spec) | sh` -+export_dynamic=`(./$host_alias-libtool --config; echo eval echo \\$export_dynamic_flag_spec) | sh` - if test -n "$export_dynamic"; then - GDK_PIXBUF_DEP_LIBS=`echo $GDK_PIXBUF_DEP_LIBS | sed -e "s/$export_dynamic//"` - GDK_PIXBUF_XLIB_DEP_LIBS=`echo $GDK_PIXBUF_XLIB_DEP_LIBS | sed -e "s/$export_dynamic//"` diff --git a/meta/packages/gtk+/gtk+-2.10.11/menu-deactivate.patch b/meta/packages/gtk+/gtk+-2.10.11/menu-deactivate.patch deleted file mode 100644 index cfb8849e9f..0000000000 --- a/meta/packages/gtk+/gtk+-2.10.11/menu-deactivate.patch +++ /dev/null @@ -1,51 +0,0 @@ ---- gtk+-2.10.0/gtk/gtkmenushell.c.orig 2006-07-05 17:17:34.000000000 +0200 -+++ gtk+-2.10.0/gtk/gtkmenushell.c 2006-07-05 17:19:01.000000000 +0200 -@@ -42,7 +42,7 @@ - #include "gtkintl.h" - #include "gtkalias.h" - --#define MENU_SHELL_TIMEOUT 500 -+#define MENU_SHELL_TIMEOUT 2000 - - #define PACK_DIRECTION(m) \ - (GTK_IS_MENU_BAR (m) \ -@@ -203,6 +203,8 @@ - - G_DEFINE_TYPE (GtkMenuShell, gtk_menu_shell, GTK_TYPE_CONTAINER) - -+static int last_crossing_time; -+ - static void - gtk_menu_shell_class_init (GtkMenuShellClass *klass) - { -@@ -517,6 +519,7 @@ - gtk_grab_add (GTK_WIDGET (menu_shell)); - menu_shell->have_grab = TRUE; - menu_shell->active = TRUE; -+ last_crossing_time = 0; - } - } - -@@ -669,6 +672,13 @@ - menu_shell->activate_time = 0; - deactivate = FALSE; - } -+ -+ if (last_crossing_time != 0 -+ && ((event->time - last_crossing_time) < 500)) -+ { -+ last_crossing_time = 0; -+ deactivate = FALSE; -+ } - - if (deactivate) - { -@@ -716,6 +726,8 @@ - { - menu_item = gtk_get_event_widget ((GdkEvent*) event); - -+ last_crossing_time = event->time; -+ - if (!menu_item || - (GTK_IS_MENU_ITEM (menu_item) && - !_gtk_menu_item_is_selectable (menu_item))) diff --git a/meta/packages/gtk+/gtk+-2.10.11/migration.patch b/meta/packages/gtk+/gtk+-2.10.11/migration.patch deleted file mode 100644 index 4ee786e688..0000000000 --- a/meta/packages/gtk+/gtk+-2.10.11/migration.patch +++ /dev/null @@ -1,611 +0,0 @@ -Index: configure.in -=================================================================== ---- configure.in.orig 2006-10-03 17:54:09.000000000 +0100 -+++ configure.in 2006-10-30 12:58:33.000000000 +0000 -@@ -1529,6 +1529,16 @@ - GTK_EXTRA_CFLAGS="$msnative_struct" - fi - -+AC_ARG_ENABLE(display-migration, -+ [AC_HELP_STRING([--enable-display-migration], -+ [include support for GPE_CHANGE_DISPLAY protocol])], -+ enable_migration=yes, enable_migration=no) -+if test "$enable_migration" = "yes"; then -+ AC_DEFINE([ENABLE_MIGRATION], 1, [Define if display migration is enabled]) -+ GTK_DEP_LIBS="$GTK_DEP_LIBS -lgcrypt" -+fi -+AM_CONDITIONAL(ENABLE_MIGRATION, test $enable_migration = "yes") -+ - AC_SUBST(GTK_PACKAGES) - AC_SUBST(GTK_EXTRA_LIBS) - AC_SUBST(GTK_EXTRA_CFLAGS) -Index: gtk/Makefile.am -=================================================================== ---- gtk/Makefile.am.orig 2006-10-02 18:27:53.000000000 +0100 -+++ gtk/Makefile.am 2006-10-30 12:59:14.000000000 +0000 -@@ -589,6 +589,11 @@ - gtkwindow-decorate.c \ - gtkwindow.c \ - $(gtk_clipboard_dnd_c_sources) -+ -+if ENABLE_MIGRATION -+gtk_base_c_sources += gtkmigration.c -+endif -+ - gtk_c_sources = $(gtk_base_c_sources) - gtk_all_c_sources = $(gtk_base_c_sources) - -Index: gtk/gtkmain.c -=================================================================== ---- gtk/gtkmain.c.orig 2006-09-03 06:31:21.000000000 +0100 -+++ gtk/gtkmain.c 2006-10-30 12:56:34.000000000 +0000 -@@ -507,6 +507,10 @@ - _gtk_accel_map_init (); - _gtk_rc_init (); - -+#ifdef ENABLE_MIGRATION -+ gtk_migration_init (); -+#endif -+ - /* Set the 'initialized' flag. - */ - gtk_initialized = TRUE; -Index: gtk/gtkmigration.c -=================================================================== ---- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ gtk/gtkmigration.c 2006-10-30 12:56:34.000000000 +0000 -@@ -0,0 +1,529 @@ -+/* -+ * Copyright (C) 2003, 2005 Philip Blundell -+ * -+ * This program is free software; you can redistribute it and/or -+ * modify it under the terms of the GNU General Public License -+ * as published by the Free Software Foundation; either version -+ * 2 of the License, or (at your option) any later version. -+ */ -+ -+#include -+#include -+#include -+#include -+#include -+ -+#include -+#include -+#include -+ -+#include -+ -+#include "gtk.h" -+#include "gdk.h" -+#include "x11/gdkx.h" -+ -+#define _(x) gettext(x) -+ -+static GdkAtom string_gdkatom, display_change_gdkatom; -+static GdkAtom rsa_challenge_gdkatom; -+ -+#define DISPLAY_CHANGE_SUCCESS 0 -+#define DISPLAY_CHANGE_UNABLE_TO_CONNECT 1 -+#define DISPLAY_CHANGE_NO_SUCH_SCREEN 2 -+#define DISPLAY_CHANGE_AUTHENTICATION_BAD 3 -+#define DISPLAY_CHANGE_INDETERMINATE_ERROR 4 -+ -+static gboolean no_auth; -+ -+static GSList *all_widgets; -+ -+static gboolean gtk_migration_initialised; -+ -+#define CHALLENGE_LEN 64 -+ -+gchar *gtk_migration_auth_challenge_string; -+ -+static unsigned char challenge_bytes[CHALLENGE_LEN]; -+static unsigned long challenge_seq; -+ -+#define hexbyte(x) ((x) >= 10 ? (x) + 'a' - 10 : (x) + '0') -+ -+struct rsa_key -+{ -+ gcry_mpi_t n, e, d, p, q, u; -+}; -+ -+static gcry_mpi_t -+mpi_from_sexp (gcry_sexp_t r, char *tag) -+{ -+ gcry_sexp_t s = gcry_sexp_find_token (r, tag, 0); -+ return gcry_sexp_nth_mpi (s, 1, GCRYMPI_FMT_USG); -+} -+ -+static char * -+hex_from_mpi (gcry_mpi_t m) -+{ -+ char *buf; -+ gcry_mpi_aprint (GCRYMPI_FMT_HEX, (void *)&buf, NULL, m); -+ return buf; -+} -+ -+static void -+gtk_migration_crypt_create_hash (char *display, char *challenge, size_t len, char *result) -+{ -+ size_t dlen = strlen (display); -+ gchar *buf = g_malloc (dlen + 1 + len); -+ strcpy (buf, display); -+ memcpy (buf + dlen + 1, challenge, len); -+ gcry_md_hash_buffer (GCRY_MD_SHA1, result, buf, len + dlen + 1); -+ g_free (buf); -+} -+ -+static int -+do_encode_md (const unsigned char *digest, size_t digestlen, int algo, -+ unsigned int nbits, gcry_mpi_t *r_val) -+{ -+ int nframe = (nbits+7) / 8; -+ unsigned char *frame; -+ int i, n; -+ unsigned char asn[100]; -+ size_t asnlen; -+ -+ asnlen = sizeof(asn); -+ if (gcry_md_algo_info (algo, GCRYCTL_GET_ASNOID, asn, &asnlen)) -+ return -1; -+ -+ if (digestlen + asnlen + 4 > nframe ) -+ return -1; -+ -+ /* We encode the MD in this way: -+ * -+ * 0 1 PAD(n bytes) 0 ASN(asnlen bytes) MD(len bytes) -+ * -+ * PAD consists of FF bytes. -+ */ -+ frame = g_malloc (nframe); -+ n = 0; -+ frame[n++] = 0; -+ frame[n++] = 1; /* block type */ -+ i = nframe - digestlen - asnlen -3 ; -+ assert ( i > 1 ); -+ memset ( frame+n, 0xff, i ); n += i; -+ frame[n++] = 0; -+ memcpy ( frame+n, asn, asnlen ); n += asnlen; -+ memcpy ( frame+n, digest, digestlen ); n += digestlen; -+ assert ( n == nframe ); -+ -+ gcry_mpi_scan (r_val, GCRYMPI_FMT_USG, frame, nframe, &nframe); -+ g_free (frame); -+ return 0; -+} -+ -+static gboolean -+gtk_migration_crypt_check_signature (struct rsa_key *k, char *hash, char *sigbuf) -+{ -+ gcry_mpi_t mpi, mpi2; -+ gcry_sexp_t data, sig, key; -+ int rc; -+ -+ do_encode_md (hash, 20, GCRY_MD_SHA1, 1024, &mpi); -+ -+ gcry_sexp_build (&data, NULL, "(data (value %m))", mpi); -+ -+ gcry_mpi_release (mpi); -+ -+ gcry_sexp_build (&key, NULL, "(public-key (rsa (n %m) (e %m)))", k->n, k->e); -+ -+ if (gcry_mpi_scan (&mpi2, GCRYMPI_FMT_HEX, sigbuf, 0, NULL)) -+ { -+ gcry_sexp_release (data); -+ return FALSE; -+ } -+ -+ gcry_sexp_build (&sig, NULL, "(sig-val (rsa (s %m)))", mpi2); -+ -+ rc = gcry_pk_verify (sig, data, key); -+ -+ gcry_sexp_release (data); -+ gcry_sexp_release (key); -+ gcry_sexp_release (sig); -+ gcry_mpi_release (mpi2); -+ -+ if (rc) -+ return FALSE; -+ -+ return TRUE; -+} -+ -+static void -+gtk_migration_auth_update_challenge (void) -+{ -+ int i; -+ unsigned char *p; -+ -+ if (gtk_migration_auth_challenge_string == NULL) -+ gtk_migration_auth_challenge_string = g_malloc ((CHALLENGE_LEN * 2) + 9); -+ -+ p = gtk_migration_auth_challenge_string; -+ -+ for (i = 0; i < CHALLENGE_LEN; i++) -+ { -+ *p++ = hexbyte (challenge_bytes[i] >> 4); -+ *p++ = hexbyte (challenge_bytes[i] & 15); -+ } -+ -+ sprintf (p, "%08lx", challenge_seq++); -+} -+ -+static void -+gtk_migration_auth_generate_challenge (void) -+{ -+ gcry_randomize (challenge_bytes, sizeof (challenge_bytes), GCRY_STRONG_RANDOM); -+ gtk_migration_auth_update_challenge (); -+} -+ -+static struct rsa_key * -+parse_pubkey (char *s) -+{ -+ struct rsa_key *r; -+ gcry_mpi_t n, e; -+ gchar *sp; -+ -+ sp = strtok (s, " \n"); -+ gcry_mpi_scan (&e, GCRYMPI_FMT_HEX, sp, 0, NULL); -+ sp = strtok (NULL, " \n"); -+ gcry_mpi_scan (&n, GCRYMPI_FMT_HEX, sp, 0, NULL); -+ -+ r = g_malloc0 (sizeof (struct rsa_key)); -+ r->e = e; -+ r->n = n; -+ return r; -+} -+ -+static struct rsa_key * -+lookup_pubkey (u_int32_t id) -+{ -+ const gchar *home_dir = g_get_home_dir (); -+ gchar *filename = g_strdup_printf ("%s/.gpe/migrate/public", home_dir); -+ FILE *fp = fopen (filename, "r"); -+ struct rsa_key *r = NULL; -+ -+ if (fp) -+ { -+ while (!feof (fp)) -+ { -+ char buffer[4096]; -+ if (fgets (buffer, 4096, fp)) -+ { -+ char *p; -+ u_int32_t this_id = strtoul (buffer, &p, 16); -+ if (p != buffer && *p == ' ') -+ { -+#ifdef DEBUG -+ fprintf (stderr, "found id %x\n", this_id); -+#endif -+ if (this_id == id) -+ { -+ r = parse_pubkey (++p); -+ break; -+ } -+ } -+ } -+ } -+ fclose (fp); -+ } -+ -+ g_free (filename); -+ return r; -+} -+ -+static void -+free_pubkey (struct rsa_key *k) -+{ -+ gcry_mpi_release (k->n); -+ gcry_mpi_release (k->e); -+ -+ g_free (k); -+} -+ -+static gboolean -+gtk_migration_auth_validate_request (char *display, char *data) -+{ -+ u_int32_t key_id; -+ char *ep; -+ char *p; -+ struct rsa_key *k; -+ char hash[20]; -+ gboolean rc; -+ -+ p = strchr (data, ' '); -+ if (p == NULL) -+ return FALSE; -+ *p++ = 0; -+ -+ key_id = strtoul (data, &ep, 16); -+ if (*ep) -+ return FALSE; -+ -+ k = lookup_pubkey (key_id); -+ if (k == NULL) -+ return FALSE; -+ -+ gtk_migration_crypt_create_hash (display, gtk_migration_auth_challenge_string, -+ strlen (gtk_migration_auth_challenge_string), hash); -+ -+ rc = gtk_migration_crypt_check_signature (k, hash, p); -+ -+ free_pubkey (k); -+ -+ return rc; -+} -+ -+static int -+do_change_display (GtkWidget *w, char *display_name) -+{ -+ GdkDisplay *newdisplay; -+ guint screen_nr = 1; -+ guint i; -+ -+ if (display_name[0] == 0) -+ return DISPLAY_CHANGE_INDETERMINATE_ERROR; -+ -+ i = strlen (display_name) - 1; -+ while (i > 0 && isdigit (display_name[i])) -+ i--; -+ -+ if (display_name[i] == '.') -+ { -+ screen_nr = atoi (display_name + i + 1); -+ display_name[i] = 0; -+ } -+ -+ newdisplay = gdk_display_open (display_name); -+ if (newdisplay) -+ { -+ GdkScreen *screen = gdk_display_get_screen (newdisplay, screen_nr); -+ if (screen) -+ { -+ gtk_window_set_screen (GTK_WINDOW (w), screen); -+ gdk_display_manager_set_default_display (gdk_display_manager_get (), -+ newdisplay); -+ return DISPLAY_CHANGE_SUCCESS; -+ } -+ else -+ return DISPLAY_CHANGE_NO_SUCH_SCREEN; -+ } -+ -+ return DISPLAY_CHANGE_UNABLE_TO_CONNECT; -+} -+ -+static void -+set_challenge_on_window (GdkWindow *window) -+{ -+ gdk_property_change (window, rsa_challenge_gdkatom, string_gdkatom, -+ 8, GDK_PROP_MODE_REPLACE, gtk_migration_auth_challenge_string, -+ strlen (gtk_migration_auth_challenge_string)); -+} -+ -+static void -+update_challenge_on_windows (void) -+{ -+ GSList *i; -+ -+ gtk_migration_auth_update_challenge (); -+ -+ for (i = all_widgets; i; i = i->next) -+ { -+ GtkWidget *w = GTK_WIDGET (i->data); -+ if (w->window) -+ set_challenge_on_window (w->window); -+ } -+} -+ -+static void -+reset_state (GdkWindow *window) -+{ -+ gdk_property_change (window, display_change_gdkatom, string_gdkatom, -+ 8, GDK_PROP_MODE_REPLACE, NULL, 0); -+} -+ -+static void -+generate_response (GdkDisplay *gdisplay, Display *dpy, Window window, int code) -+{ -+ XClientMessageEvent ev; -+ Atom atom = gdk_x11_atom_to_xatom_for_display (gdisplay, -+ display_change_gdkatom); -+ -+ memset (&ev, 0, sizeof (ev)); -+ -+ ev.type = ClientMessage; -+ ev.window = window; -+ ev.message_type = atom; -+ ev.format = 32; -+ -+ ev.data.l[0] = window; -+ ev.data.l[1] = code; -+ -+ XSendEvent (dpy, DefaultRootWindow (dpy), False, SubstructureNotifyMask, (XEvent *)&ev); -+} -+ -+static int -+handle_request (GdkWindow *gwindow, char *prop) -+{ -+ GtkWidget *widget; -+ char *target, *auth_method, *auth_data; -+ char *p; -+ -+ target = prop; -+ auth_method = "NULL"; -+ auth_data = NULL; -+ -+ p = strchr (prop, ' '); -+ if (p) -+ { -+ *p = 0; -+ auth_method = ++p; -+ -+ p = strchr (p, ' '); -+ if (p) -+ { -+ *p = 0; -+ auth_data = ++p; -+ } -+ } -+ -+ if (no_auth == FALSE) -+ { -+ if (!strcasecmp (auth_method, "null")) -+ return DISPLAY_CHANGE_AUTHENTICATION_BAD; -+ else if (!strcasecmp (auth_method, "rsa-sig")) -+ { -+ if (gtk_migration_auth_validate_request (target, auth_data) == FALSE) -+ return DISPLAY_CHANGE_AUTHENTICATION_BAD; -+ } -+ else -+ return DISPLAY_CHANGE_AUTHENTICATION_BAD; -+ } -+ -+ gdk_window_get_user_data (gwindow, (gpointer*) &widget); -+ -+ if (widget) -+ return do_change_display (widget, target); -+ -+ return DISPLAY_CHANGE_INDETERMINATE_ERROR; -+} -+ -+static GdkFilterReturn -+filter_func (GdkXEvent *xevp, GdkEvent *ev, gpointer p) -+{ -+ XPropertyEvent *xev = (XPropertyEvent *)xevp; -+ -+ if (xev->type == PropertyNotify) -+ { -+ GdkDisplay *gdisplay; -+ Atom atom; -+ -+ gdisplay = gdk_x11_lookup_xdisplay (xev->display); -+ if (gdisplay) -+ { -+ atom = gdk_x11_atom_to_xatom_for_display (gdisplay, display_change_gdkatom); -+ -+ if (xev->atom == atom) -+ { -+ GdkWindow *gwindow; -+ -+ gwindow = gdk_window_lookup_for_display (gdisplay, xev->window); -+ -+ if (gwindow) -+ { -+ GdkAtom actual_type; -+ gint actual_format; -+ gint actual_length; -+ unsigned char *prop = NULL; -+ -+ if (gdk_property_get (gwindow, display_change_gdkatom, string_gdkatom, -+ 0, G_MAXLONG, FALSE, &actual_type, &actual_format, -+ &actual_length, &prop)) -+ { -+ if (actual_length != 0) -+ { -+ if (actual_type == string_gdkatom && actual_length > 8) -+ { -+ gchar *buf = g_malloc (actual_length + 1); -+ int rc; -+ -+ memcpy (buf, prop, actual_length); -+ buf[actual_length] = 0; -+ -+ rc = handle_request (gwindow, buf); -+ -+ g_free (buf); -+ generate_response (gdisplay, xev->display, xev->window, rc); -+ -+ if (rc == DISPLAY_CHANGE_SUCCESS) -+ update_challenge_on_windows (); -+ } -+ -+ reset_state (gwindow); -+ } -+ } -+ -+ if (prop) -+ g_free (prop); -+ } -+ } -+ -+ return GDK_FILTER_REMOVE; -+ } -+ } -+ -+ return GDK_FILTER_CONTINUE; -+} -+ -+static void -+unrealize_window (GtkWidget *w) -+{ -+ all_widgets = g_slist_remove (all_widgets, w); -+} -+ -+void -+gtk_migration_mark_window (GtkWidget *w) -+{ -+ if (! gtk_migration_initialised) -+ { -+ g_warning ("gtk_migration not initialised yet"); -+ return; -+ } -+ -+ if (GTK_WIDGET_REALIZED (w)) -+ { -+ GdkWindow *window = w->window; -+ -+ gdk_window_add_filter (window, filter_func, NULL); -+ -+ reset_state (window); -+ set_challenge_on_window (window); -+ -+ all_widgets = g_slist_append (all_widgets, w); -+ -+ g_signal_connect (G_OBJECT (w), "unrealize", G_CALLBACK (unrealize_window), NULL); -+ } -+ else -+ g_signal_connect (G_OBJECT (w), "realize", G_CALLBACK (gtk_migration_mark_window), NULL); -+} -+ -+void -+gtk_migration_init (void) -+{ -+ if (getenv ("GPE_DISPLAY_MIGRATION_NO_AUTH") != NULL) -+ no_auth = TRUE; -+ -+ string_gdkatom = gdk_atom_intern ("STRING", FALSE); -+ display_change_gdkatom = gdk_atom_intern ("_GPE_DISPLAY_CHANGE", FALSE); -+ rsa_challenge_gdkatom = gdk_atom_intern ("_GPE_DISPLAY_CHANGE_RSA_CHALLENGE", FALSE); -+ -+ gtk_migration_auth_generate_challenge (); -+ -+ gtk_migration_initialised = TRUE; -+} -Index: gtk/gtkwindow.c -=================================================================== ---- gtk/gtkwindow.c.orig 2006-10-03 16:51:46.000000000 +0100 -+++ gtk/gtkwindow.c 2006-10-30 12:56:34.000000000 +0000 -@@ -50,6 +50,9 @@ - #include "x11/gdkx.h" - #endif - -+extern void gtk_migration_mark_window (GtkWidget *w); -+ -+ - enum { - SET_FOCUS, - FRAME_EVENT, -@@ -823,6 +826,10 @@ - - g_signal_connect (window->screen, "composited_changed", - G_CALLBACK (gtk_window_on_composited_changed), window); -+ -+#ifdef ENABLE_MIGRATION -+ gtk_migration_mark_window (window); -+#endif - } - - static void diff --git a/meta/packages/gtk+/gtk+-2.10.11/no-demos.patch b/meta/packages/gtk+/gtk+-2.10.11/no-demos.patch deleted file mode 100644 index 0fc4c48d1a..0000000000 --- a/meta/packages/gtk+/gtk+-2.10.11/no-demos.patch +++ /dev/null @@ -1,10 +0,0 @@ ---- gtk+-2.10.1/Makefile.am.orig 2006-08-08 12:37:30.000000000 +0100 -+++ gtk+-2.10.1/Makefile.am 2006-08-08 12:37:48.000000000 +0100 -@@ -1,6 +1,6 @@ - ## Makefile.am for GTK+ - --SRC_SUBDIRS = gdk-pixbuf gdk gtk modules demos tests perf contrib -+SRC_SUBDIRS = gdk-pixbuf gdk gtk modules tests perf contrib - SUBDIRS = po po-properties $(SRC_SUBDIRS) docs m4macros - - # require automake 1.4 diff --git a/meta/packages/gtk+/gtk+-2.10.11/no-xwc.patch b/meta/packages/gtk+/gtk+-2.10.11/no-xwc.patch deleted file mode 100644 index affb4a303e..0000000000 --- a/meta/packages/gtk+/gtk+-2.10.11/no-xwc.patch +++ /dev/null @@ -1,151 +0,0 @@ -diff -urNd ../gtk+-2.6.0-r2/gtk+-2.6.0/gdk/x11/gdkdrawable-x11.c gtk+-2.6.0/gdk/x11/gdkdrawable-x11.c ---- ../gtk+-2.6.0-r2/gtk+-2.6.0/gdk/x11/gdkdrawable-x11.c 2004-11-30 14:57:14 +00:00 -+++ gtk+-2.6.0/gdk/x11/gdkdrawable-x11.c 2005-01-02 15:38:06 +00:00 -@@ -576,12 +576,14 @@ - GDK_GC_GET_XGC (gc), x, y, (XChar2b *) text, text_length / 2); - } - } -+#ifdef HAVE_XWC - else if (font->type == GDK_FONT_FONTSET) - { - XFontSet fontset = (XFontSet) GDK_FONT_XFONT (font); - XmbDrawString (xdisplay, impl->xid, - fontset, GDK_GC_GET_XGC (gc), x, y, text, text_length); - } -+#endif - else - g_error("undefined font type\n"); - } -@@ -613,6 +615,7 @@ - GDK_GC_GET_XGC (gc), x, y, text_8bit, text_length); - g_free (text_8bit); - } -+#ifdef HAVE_XWC - else if (font->type == GDK_FONT_FONTSET) - { - if (sizeof(GdkWChar) == sizeof(wchar_t)) -@@ -633,6 +636,7 @@ - g_free (text_wchar); - } - } -+#endif - else - g_error("undefined font type\n"); - } -diff -urNd ../gtk+-2.6.0-r2/gtk+-2.6.0/gdk/x11/gdkfont-x11.c gtk+-2.6.0/gdk/x11/gdkfont-x11.c ---- ../gtk+-2.6.0-r2/gtk+-2.6.0/gdk/x11/gdkfont-x11.c 2004-08-26 01:23:46 +01:00 -+++ gtk+-2.6.0/gdk/x11/gdkfont-x11.c 2005-01-02 15:45:39 +00:00 -@@ -525,10 +525,12 @@ - width = XTextWidth16 (xfont, (XChar2b *) text, text_length / 2); - } - break; -+#ifdef HAVE_XWC - case GDK_FONT_FONTSET: - fontset = (XFontSet) private->xfont; - width = XmbTextEscapement (fontset, text, text_length); - break; -+#endif - default: - width = 0; - } -@@ -578,6 +580,7 @@ - width = 0; - } - break; -+#ifdef HAVE_XWC - case GDK_FONT_FONTSET: - if (sizeof(GdkWChar) == sizeof(wchar_t)) - { -@@ -595,6 +598,7 @@ - g_free (text_wchar); - } - break; -+#endif - default: - width = 0; - } -@@ -667,6 +671,7 @@ - if (descent) - *descent = overall.descent; - break; -+#ifdef HAVE_XWC - case GDK_FONT_FONTSET: - fontset = (XFontSet) private->xfont; - XmbTextExtents (fontset, text, text_length, &ink, &logical); -@@ -681,6 +686,7 @@ - if (descent) - *descent = ink.y + ink.height; - break; -+#endif - } - - } -@@ -753,6 +759,7 @@ - *descent = overall.descent; - break; - } -+#ifdef HAVE_XWC - case GDK_FONT_FONTSET: - fontset = (XFontSet) private->xfont; - -@@ -780,6 +787,7 @@ - if (descent) - *descent = ink.y + ink.height; - break; -+#endif - } - - } -diff -urNd ../gtk+-2.6.0-r2/gtk+-2.6.0/gdk/x11/gdkim-x11.c gtk+-2.6.0/gdk/x11/gdkim-x11.c ---- ../gtk+-2.6.0-r2/gtk+-2.6.0/gdk/x11/gdkim-x11.c 2004-11-17 00:55:10 +00:00 -+++ gtk+-2.6.0/gdk/x11/gdkim-x11.c 2005-01-02 15:42:04 +00:00 -@@ -48,6 +48,7 @@ - void - _gdk_x11_initialize_locale (void) - { -+#ifdef HAVE_XWC - wchar_t result; - gchar *current_locale; - static char *last_locale = NULL; -@@ -93,7 +94,8 @@ - GDK_NOTE (XIM, - g_message ("%s multi-byte string functions.", - gdk_use_mb ? "Using" : "Not using")); -- -+#endif -+ - return; - } - -@@ -136,6 +138,7 @@ - { - gchar *mbstr; - -+#ifdef HAVE_XWC - if (gdk_use_mb) - { - GdkDisplay *display = find_a_display (); -@@ -178,6 +181,7 @@ - XFree (tpr.value); - } - else -+#endif - { - gint length = 0; - gint i; -@@ -210,6 +214,7 @@ - gint - gdk_mbstowcs (GdkWChar *dest, const gchar *src, gint dest_max) - { -+#ifdef HAVE_XWC - if (gdk_use_mb) - { - GdkDisplay *display = find_a_display (); -@@ -242,6 +247,7 @@ - return len_cpy; - } - else -+#endif - { - gint i; - diff --git a/meta/packages/gtk+/gtk+-2.10.11/pangoxft2.10.6.diff b/meta/packages/gtk+/gtk+-2.10.11/pangoxft2.10.6.diff deleted file mode 100644 index 63828cec63..0000000000 --- a/meta/packages/gtk+/gtk+-2.10.11/pangoxft2.10.6.diff +++ /dev/null @@ -1,2456 +0,0 @@ -http://mail.gnome.org/archives/performance-list/2006-October/msg00063.html - -From: Xan Lópe -To: ext Matt Hoosier -Cc: performance-list gnome org -Subject: Re: [patch] Remove pangocairo from Gtk+ 2.8.20 -Date: Mon, 30 Oct 2006 14:31:56 +0200 -Hi, - -I've upgraded your patch against GTK+ 2.10.6, and we are getting great -performance figures compared to GTK+ 2.10.6 with pangocairo too -(basically at the level of GTK+ 2.6.10 again). Right now I'm working on -a python/cairo script to get some nice graphics from a torture test -session with several GTK+s, hope to get it ready soon. - -Index: gtk+-2.10.6/configure.in -=================================================================== ---- gtk+-2.10.6.orig/configure.in 2006-10-30 12:59:28.000000000 +0000 -+++ gtk+-2.10.6/configure.in 2006-10-30 12:59:30.000000000 +0000 -@@ -1435,7 +1435,7 @@ - if test "x$gdktarget" = "xwin32"; then - PANGO_PACKAGES="pangowin32 pangocairo" - else -- PANGO_PACKAGES="pango pangocairo" -+ PANGO_PACKAGES="pango pangocairo pangoxft" - fi - - AC_MSG_CHECKING(Pango flags) -Index: gtk+-2.10.6/gdk/gdkaliasdef.c -=================================================================== ---- gtk+-2.10.6.orig/gdk/gdkaliasdef.c 2006-10-30 12:58:29.000000000 +0000 -+++ gtk+-2.10.6/gdk/gdkaliasdef.c 2006-10-30 12:59:30.000000000 +0000 -@@ -1799,9 +1799,6 @@ - #undef gdk_pango_context_get - extern __typeof (gdk_pango_context_get) gdk_pango_context_get __attribute((alias("IA__gdk_pango_context_get"), visibility("default"))); - --#undef gdk_pango_context_get_for_screen --extern __typeof (gdk_pango_context_get_for_screen) gdk_pango_context_get_for_screen __attribute((alias("IA__gdk_pango_context_get_for_screen"), visibility("default"))); -- - #ifndef GDK_DISABLE_DEPRECATED - #undef gdk_pango_context_set_colormap - extern __typeof (gdk_pango_context_set_colormap) gdk_pango_context_set_colormap __attribute((alias("IA__gdk_pango_context_set_colormap"), visibility("default"))); -@@ -1836,6 +1833,13 @@ - - #endif - #endif -+#if IN_HEADER(__GDK_PANGO_H__) -+#if IN_FILE(__GDK_PANGO_X11_C__) -+#undef gdk_pango_context_get_for_screen -+extern __typeof (gdk_pango_context_get_for_screen) gdk_pango_context_get_for_screen __attribute((alias("IA__gdk_pango_context_get_for_screen"), visibility("default"))); -+ -+#endif -+#endif - #if IN_HEADER(__GDK_PIXBUF_H__) - #if IN_FILE(__GDK_PIXBUF_DRAWABLE_C__) - #undef gdk_pixbuf_get_from_drawable -Index: gtk+-2.10.6/gdk/gdkalias.h -=================================================================== ---- gtk+-2.10.6.orig/gdk/gdkalias.h 2006-10-30 12:58:29.000000000 +0000 -+++ gtk+-2.10.6/gdk/gdkalias.h 2006-10-30 12:59:30.000000000 +0000 -@@ -1796,9 +1796,6 @@ - extern __typeof (gdk_pango_context_get) IA__gdk_pango_context_get __attribute((visibility("hidden"))); - #define gdk_pango_context_get IA__gdk_pango_context_get - --extern __typeof (gdk_pango_context_get_for_screen) IA__gdk_pango_context_get_for_screen __attribute((visibility("hidden"))); --#define gdk_pango_context_get_for_screen IA__gdk_pango_context_get_for_screen -- - #ifndef GDK_DISABLE_DEPRECATED - extern __typeof (gdk_pango_context_set_colormap) IA__gdk_pango_context_set_colormap __attribute((visibility("hidden"))); - #define gdk_pango_context_set_colormap IA__gdk_pango_context_set_colormap -@@ -1833,6 +1830,13 @@ - - #endif - #endif -+#if IN_HEADER(__GDK_PANGO_H__) -+#if IN_FILE(__GDK_PANGO_X11_C__) -+extern __typeof (gdk_pango_context_get_for_screen) IA__gdk_pango_context_get_for_screen __attribute((visibility("hidden"))); -+#define gdk_pango_context_get_for_screen IA__gdk_pango_context_get_for_screen -+ -+#endif -+#endif - #if IN_HEADER(__GDK_PIXBUF_H__) - #if IN_FILE(__GDK_PIXBUF_DRAWABLE_C__) - extern __typeof (gdk_pixbuf_get_from_drawable) IA__gdk_pixbuf_get_from_drawable __attribute((visibility("hidden"))); -Index: gtk+-2.10.6/gdk/gdkdraw.c -=================================================================== ---- gtk+-2.10.6.orig/gdk/gdkdraw.c 2006-10-30 12:58:29.000000000 +0000 -+++ gtk+-2.10.6/gdk/gdkdraw.c 2006-10-30 12:59:30.000000000 +0000 -@@ -909,9 +909,9 @@ - { - g_return_if_fail (GDK_IS_DRAWABLE (drawable)); - g_return_if_fail (GDK_IS_GC (gc)); -- -- real_draw_glyphs (drawable, gc, NULL, font, -- x, y, glyphs); -+ -+ -+ GDK_DRAWABLE_GET_CLASS (drawable)->draw_glyphs (drawable, gc, font, x, y, glyphs); - } - - /** -@@ -949,8 +949,9 @@ - g_return_if_fail (GDK_IS_DRAWABLE (drawable)); - g_return_if_fail (GDK_IS_GC (gc)); - -- real_draw_glyphs (drawable, gc, matrix, font, -- x / PANGO_SCALE, y / PANGO_SCALE, glyphs); -+ if (GDK_DRAWABLE_GET_CLASS (drawable)->draw_glyphs_transformed) -+ GDK_DRAWABLE_GET_CLASS (drawable)->draw_glyphs_transformed (drawable, gc, matrix, -+ font, x, y, glyphs); - } - - /** -@@ -974,28 +975,12 @@ - GdkTrapezoid *trapezoids, - gint n_trapezoids) - { -- cairo_t *cr; -- int i; -- - g_return_if_fail (GDK_IS_DRAWABLE (drawable)); - g_return_if_fail (GDK_IS_GC (gc)); - g_return_if_fail (n_trapezoids == 0 || trapezoids != NULL); - -- cr = gdk_cairo_create (drawable); -- _gdk_gc_update_context (gc, cr, NULL, NULL, TRUE); -- -- for (i = 0; i < n_trapezoids; i++) -- { -- cairo_move_to (cr, trapezoids[i].x11, trapezoids[i].y1); -- cairo_line_to (cr, trapezoids[i].x21, trapezoids[i].y1); -- cairo_line_to (cr, trapezoids[i].x22, trapezoids[i].y2); -- cairo_line_to (cr, trapezoids[i].x21, trapezoids[i].y2); -- cairo_close_path (cr); -- } -- -- cairo_fill (cr); -- -- cairo_destroy (cr); -+ GDK_DRAWABLE_GET_CLASS (drawable)->draw_trapezoids (drawable, gc, -+ trapezoids, n_trapezoids); - } - - /** -Index: gtk+-2.10.6/gdk/gdkpango.c -=================================================================== ---- gtk+-2.10.6.orig/gdk/gdkpango.c 2006-10-30 12:58:29.000000000 +0000 -+++ gtk+-2.10.6/gdk/gdkpango.c 2006-10-30 12:59:30.000000000 +0000 -@@ -50,19 +50,34 @@ - GdkBitmap *stipple[MAX_RENDER_PART + 1]; - gboolean embossed; - -- cairo_t *cr; -- PangoRenderPart last_part; -+ /* When switching between the normal and shadow copies when -+ * drawing shadows we can get unexpected recursion into the -+ * drawing functions; the 'in_emboss' flag guards against that. -+ */ -+ gboolean in_emboss; - - /* Current target */ - GdkDrawable *drawable; - GdkGC *base_gc; - - gboolean gc_changed; -+ -+ /* Cached GC, derived from base_gc */ -+ GdkGC *gc; -+ PangoColor gc_color; -+ gboolean gc_color_set; -+ GdkBitmap *gc_stipple; -+ -+ /* we accumulate trapezoids for the same PangoRenderPart */ -+ GArray *trapezoids; -+ PangoRenderPart trapezoid_part; - }; - - static PangoAttrType gdk_pango_attr_stipple_type; - static PangoAttrType gdk_pango_attr_embossed_type; - -+static void flush_trapezoids (GdkPangoRenderer *gdk_renderer); -+ - enum { - PROP_0, - PROP_SCREEN -@@ -77,6 +92,10 @@ - GdkPangoRendererPrivate *priv = gdk_renderer->priv; - int i; - -+ if (priv->gc) -+ g_object_unref (priv->gc); -+ if (priv->gc_stipple) -+ g_object_unref (priv->gc_stipple); - if (priv->base_gc) - g_object_unref (priv->base_gc); - if (priv->drawable) -@@ -86,6 +105,8 @@ - if (priv->stipple[i]) - g_object_unref (priv->stipple[i]); - -+ g_array_free (priv->trapezoids, TRUE); -+ - G_OBJECT_CLASS (gdk_pango_renderer_parent_class)->finalize (object); - } - -@@ -112,25 +133,6 @@ - return object; - } - --/* Adjusts matrix and color for the renderer to draw the secondary -- * "shadow" copy for embossed text */ --static void --emboss_context (cairo_t *cr) --{ -- cairo_matrix_t tmp_matrix; -- -- /* The gymnastics here to adjust the matrix are because we want -- * to offset by +1,+1 in device-space, not in user-space, -- * so we can't just draw the layout at x + 1, y + 1 -- */ -- cairo_get_matrix (cr, &tmp_matrix); -- tmp_matrix.x0 += 1.0; -- tmp_matrix.y0 += 1.0; -- cairo_set_matrix (cr, &tmp_matrix); -- -- cairo_set_source_rgb (cr, 1.0, 1.0, 1.0); --} -- - static inline gboolean - color_equal (PangoColor *c1, PangoColor *c2) - { -@@ -146,74 +148,154 @@ - return FALSE; - } - --static cairo_t * --get_cairo_context (GdkPangoRenderer *gdk_renderer, -- PangoRenderPart part) -+/* Adjusts matrix and color for the renderer to draw the secondar -+ * "shadow" copy for embossed text */ -+static void -+emboss_renderer (PangoRenderer *renderer, -+ PangoRenderPart part, -+ PangoMatrix **save_matrix, -+ PangoColor **save_color) -+{ -+ GdkPangoRendererPrivate *priv = GDK_PANGO_RENDERER(renderer)->priv; -+ static const PangoColor white = { 0xffff, 0xffff, 0xffff }; -+ PangoMatrix tmp_matrix = PANGO_MATRIX_INIT; -+ -+ priv->in_emboss = TRUE; -+ -+ *save_color = pango_renderer_get_color (renderer, part); -+ if (*save_color) -+ *save_color = pango_color_copy (*save_color); -+ -+ *save_matrix = renderer->matrix; -+ if (*save_matrix) -+ { -+ *save_matrix = pango_matrix_copy (*save_matrix); -+ tmp_matrix = **save_matrix; -+ } -+ -+ /* The gymnastics here to adjust the matrix are because we want -+ * to offset by +1,+1 in device-space, not in user-space, -+ * so we can't just draw the layout at x + 1, y + 1 -+ */ -+ tmp_matrix.x0 += 1; -+ tmp_matrix.y0 += 1; -+ -+ pango_renderer_set_matrix (renderer, &tmp_matrix); -+ pango_renderer_set_color (renderer, part, &white); -+} -+ -+/* Restores from emboss_renderer() */ -+static void -+unemboss_renderer (PangoRenderer *renderer, -+ PangoRenderPart part, -+ PangoMatrix **save_matrix, -+ PangoColor **save_color) -+{ -+ GdkPangoRendererPrivate *priv = GDK_PANGO_RENDERER(renderer)->priv; -+ pango_renderer_set_matrix (renderer, *save_matrix); -+ pango_renderer_set_color (renderer, part, *save_color); -+ -+ if (*save_matrix) -+ pango_matrix_free (*save_matrix); -+ if (*save_color) -+ pango_color_free (*save_color); -+ -+ priv->in_emboss = FALSE; -+} -+ -+/* Gets the GC for drawing @part. This make involve copying the base GC -+ * for the renderer, in which case we keep a one-GC cache. */ -+static GdkGC * -+get_gc (GdkPangoRenderer *gdk_renderer, -+ PangoRenderPart part) - { - PangoRenderer *renderer = PANGO_RENDERER (gdk_renderer); -+ PangoColor *color; -+ GdkBitmap *stipple; - GdkPangoRendererPrivate *priv = gdk_renderer->priv; - -- if (!priv->cr) -+ color = pango_renderer_get_color (renderer, part); -+ -+ if (part <= MAX_RENDER_PART) -+ stipple = priv->stipple[part]; -+ else -+ stipple = NULL; -+ -+ if (!color && !stipple) /* nothing override, use base_gc */ -+ return priv->base_gc; -+ else - { -- const PangoMatrix *matrix; -+ gboolean new_stipple = FALSE; -+ gboolean new_color = FALSE; - -- priv->cr = gdk_cairo_create (priv->drawable); -+ if (stipple != priv->gc_stipple) -+ new_stipple = TRUE; - -- matrix = pango_renderer_get_matrix (renderer); -- if (matrix) -+ if ((priv->gc_color_set && !color) || -+ (!priv->gc_color_set && color) || -+ priv->gc_color.red != color->red || -+ priv->gc_color.green != color->green || -+ priv->gc_color.blue != color->blue) -+ new_color = TRUE; -+ -+ if (!priv->gc) - { -- cairo_matrix_t cairo_matrix; -- -- cairo_matrix_init (&cairo_matrix, -- matrix->xx, matrix->yx, -- matrix->xy, matrix->yy, -- matrix->x0, matrix->y0); -- cairo_set_matrix (priv->cr, &cairo_matrix); -+ priv->gc = gdk_gc_new (priv->drawable); -+ gdk_gc_copy (priv->gc, priv->base_gc); -+ } -+ else if (new_color && priv->gc_color_set && !color) -+ { -+ /* We have to recopy the original GC onto the cached GC -+ * to get the default color */ -+ new_stipple = TRUE; -+ gdk_gc_copy (priv->gc, priv->base_gc); -+ } -+ else if (new_stipple && priv->gc_stipple && !stipple) -+ { -+ /* Similarly, we need to make a new copy to restore to the -+ * default stipple state (the caller may have set a stipple -+ * on the GC, and even if not, gdk_gc_set_stipple (gc, NULL) -+ * doesn't work currently to restore to the default X stipple) */ -+ new_color = TRUE; -+ gdk_gc_copy (priv->gc, priv->base_gc); - } -- } -- -- if (part != priv->last_part) -- { -- PangoColor *pango_color; -- GdkColor *color; -- GdkColor tmp_color; -- gboolean changed; - -- pango_color = pango_renderer_get_color (renderer, part); -- -- if (priv->last_part != -1) -- changed = priv->gc_changed || -- priv->stipple[priv->last_part] != priv->stipple[part] || -- !color_equal (pango_color, -- pango_renderer_get_color (renderer, priv->last_part)); -- else -- changed = TRUE; -- -- if (changed) -+ if (new_color) - { -- if (pango_color) -+ if (color) - { -- tmp_color.red = pango_color->red; -- tmp_color.green = pango_color->green; -- tmp_color.blue = pango_color->blue; -+ GdkColor gdk_color; -+ -+ gdk_color.red = color->red; -+ gdk_color.green = color->green; -+ gdk_color.blue = color->blue; - -- color = &tmp_color; -+ gdk_gc_set_rgb_fg_color (priv->gc, &gdk_color); -+ -+ priv->gc_color = *color; -+ priv->gc_color_set = TRUE; - } - else -- color = NULL; -+ priv->gc_color_set = FALSE; -+ } - -- _gdk_gc_update_context (priv->base_gc, -- priv->cr, -- color, -- priv->stipple[part], -- priv->gc_changed); -+ if (new_stipple) -+ { -+ if (priv->gc_stipple) -+ g_object_unref (priv->gc_stipple); -+ -+ if (stipple) -+ { -+ gdk_gc_set_stipple (priv->gc, stipple); -+ gdk_gc_set_fill (priv->gc, GDK_STIPPLED); -+ priv->gc_stipple = g_object_ref (stipple); -+ } -+ else -+ priv->gc_stipple = NULL; - } - -- priv->last_part = part; -- priv->gc_changed = FALSE; -+ return priv->gc; - } -- -- return priv->cr; - } - - static void -@@ -225,133 +307,78 @@ - { - GdkPangoRenderer *gdk_renderer = GDK_PANGO_RENDERER (renderer); - GdkPangoRendererPrivate *priv = gdk_renderer->priv; -- cairo_t *cr; - -- cr = get_cairo_context (gdk_renderer, -- PANGO_RENDER_PART_FOREGROUND); -+ flush_trapezoids (gdk_renderer); - -- if (priv->embossed) -+ if (!priv->in_emboss && priv->embossed) - { -- cairo_save (cr); -- emboss_context (cr); -- cairo_move_to (cr, (double)x / PANGO_SCALE, (double)y / PANGO_SCALE); -- pango_cairo_show_glyph_string (cr, font, glyphs); -- cairo_restore (cr); -- } -- -- cairo_move_to (cr, (double)x / PANGO_SCALE, (double)y / PANGO_SCALE); -- pango_cairo_show_glyph_string (cr, font, glyphs); --} -- --/* Draws an error underline that looks like one of: -- * H E H -- * /\ /\ /\ /\ /\ - -- * A/ \ / \ / \ A/ \ / \ | -- * \ \ / \ / /D \ \ / \ | -- * \ \/ C \/ / \ \/ C \ | height = HEIGHT_SQUARES * square -- * \ /\ F / \ F /\ \ | -- * \ / \ / \ / \ \G | -- * \ / \ / \ / \ / | -- * \/ \/ \/ \/ - -- * B B -- * |----| -- * unit_width = (HEIGHT_SQUARES - 1) * square -- * -- * The x, y, width, height passed in give the desired bounding box; -- * x/width are adjusted to make the underline a integer number of units -- * wide. -- */ --#define HEIGHT_SQUARES 2.5 -+ PangoMatrix *save_matrix; -+ PangoColor *save_color; - --/* Cut-and-pasted between here and pango/pango/pangocairo-render.c */ -+ emboss_renderer (renderer, PANGO_RENDER_PART_FOREGROUND, &save_matrix, &save_color); -+ gdk_draw_glyphs_transformed (priv->drawable, -+ get_gc (gdk_renderer, PANGO_RENDER_PART_FOREGROUND), -+ renderer->matrix, font, x, y, glyphs); -+ unemboss_renderer (renderer, PANGO_RENDER_PART_FOREGROUND, &save_matrix, &save_color); -+ } -+ -+ gdk_draw_glyphs_transformed (priv->drawable, -+ get_gc (gdk_renderer, PANGO_RENDER_PART_FOREGROUND), -+ renderer->matrix, font, x, y, glyphs); -+} -+ -+/* Outputs any pending trapezoids, we do this when the part or -+ * part color changes, when we are about to draw text, etc. */ - static void --draw_error_underline (cairo_t *cr, -- double x, -- double y, -- double width, -- double height) --{ -- double square = height / HEIGHT_SQUARES; -- double unit_width = (HEIGHT_SQUARES - 1) * square; -- int width_units = (width + unit_width / 2) / unit_width; -- double y_top, y_bottom; -- int i; -+flush_trapezoids (GdkPangoRenderer *gdk_renderer) -+{ -+ GdkPangoRendererPrivate *priv = gdk_renderer->priv; - -- x += (width - width_units * unit_width) / 2; -- width = width_units * unit_width; -+ if (!priv->trapezoids || priv->trapezoids->len == 0) -+ return; - -- y_top = y; -- y_bottom = y + height; -- -- /* Bottom of squiggle */ -- cairo_move_to (cr, x - square / 2, y_top + square / 2); /* A */ -- for (i = 0; i < width_units; i += 2) -- { -- double x_middle = x + (i + 1) * unit_width; -- double x_right = x + (i + 2) * unit_width; -- -- cairo_line_to (cr, x_middle, y_bottom); /* B */ -- -- if (i + 1 == width_units) -- /* Nothing */; -- else if (i + 2 == width_units) -- cairo_line_to (cr, x_right + square / 2, y_top + square / 2); /* D */ -- else -- cairo_line_to (cr, x_right, y_top + square); /* C */ -- } -- -- /* Top of squiggle */ -- for (i -= 2; i >= 0; i -= 2) -- { -- double x_left = x + i * unit_width; -- double x_middle = x + (i + 1) * unit_width; -- double x_right = x + (i + 2) * unit_width; -- -- if (i + 1 == width_units) -- cairo_line_to (cr, x_middle + square / 2, y_bottom - square / 2); /* G */ -- else { -- if (i + 2 == width_units) -- cairo_line_to (cr, x_right, y_top); /* E */ -- cairo_line_to (cr, x_middle, y_bottom - square); /* F */ -- } -- -- cairo_line_to (cr, x_left, y_top); /* H */ -- } -+ gdk_draw_trapezoids (priv->drawable, -+ get_gc (gdk_renderer, priv->trapezoid_part), -+ (GdkTrapezoid *)priv->trapezoids->data, -+ priv->trapezoids->len); - -- cairo_close_path (cr); -- cairo_fill (cr); -+ g_array_set_size (priv->trapezoids, 0); - } - -+/* Draws a single trapezoid ... we don't draw it immediately, but rather -+ * cache it to join together with other trapezoids that form part of the -+ * same logical shape */ - static void --gdk_pango_renderer_draw_rectangle (PangoRenderer *renderer, -- PangoRenderPart part, -- int x, -- int y, -- int width, -- int height) -+gdk_pango_renderer_draw_trapezoid (PangoRenderer *renderer, -+ PangoRenderPart part, -+ double y1, -+ double x11, -+ double x21, -+ double y2, -+ double x12, -+ double x22) - { - GdkPangoRenderer *gdk_renderer = GDK_PANGO_RENDERER (renderer); -- GdkPangoRendererPrivate *priv = gdk_renderer->priv; -- cairo_t *cr; -- -- cr = get_cairo_context (gdk_renderer, part); -- -- if (priv->embossed && part != PANGO_RENDER_PART_BACKGROUND) -- { -- cairo_save (cr); -- emboss_context (cr); -- cairo_rectangle (cr, -- (double)x / PANGO_SCALE, (double)y / PANGO_SCALE, -- (double)width / PANGO_SCALE, (double)height / PANGO_SCALE); -+ GdkTrapezoid trap; - -- cairo_fill (cr); -- cairo_restore (cr); -- } -+ if (!gdk_renderer->priv->trapezoids) -+ gdk_renderer->priv->trapezoids = g_array_new (FALSE, FALSE, -+ sizeof (GdkTrapezoid)); -+ -+ if (gdk_renderer->priv->trapezoids->len > 0 && -+ gdk_renderer->priv->trapezoid_part != part) -+ flush_trapezoids (gdk_renderer); -+ -+ gdk_renderer->priv->trapezoid_part = part; -+ -+ trap.y1 = y1; -+ trap.x11 = x11 / 2; -+ trap.x21 = x21; -+ trap.y2 = y2; -+ trap.x12 = x12; -+ trap.x22 = x22; - -- cairo_rectangle (cr, -- (double)x / PANGO_SCALE, (double)y / PANGO_SCALE, -- (double)width / PANGO_SCALE, (double)height / PANGO_SCALE); -- cairo_fill (cr); -+ g_array_append_val (gdk_renderer->priv->trapezoids, trap); - } - - static void -@@ -363,23 +390,51 @@ - { - GdkPangoRenderer *gdk_renderer = GDK_PANGO_RENDERER (renderer); - GdkPangoRendererPrivate *priv = gdk_renderer->priv; -- cairo_t *cr; -- -- cr = get_cairo_context (gdk_renderer,