summaryrefslogtreecommitdiffstats
path: root/meta/packages/gtk+
diff options
context:
space:
mode:
authorRoss Burton <ross@openedhand.com>2007-09-03 09:17:51 +0000
committerRoss Burton <ross@openedhand.com>2007-09-03 09:17:51 +0000
commitd392c1c19cc5f865d412c8deec2c61826d48a6e4 (patch)
tree78777259032f9b20f9d1c41ce9d334d7e3b9a0a0 /meta/packages/gtk+
parentd4cb583671f85e6a4c790d103c839106453658fb (diff)
downloadpoky-d392c1c19cc5f865d412c8deec2c61826d48a6e4.tar.gz
Remove more unused or useless patches, and update the range patch
git-svn-id: https://svn.o-hand.com/repos/poky/trunk@2671 311d38ba-8fff-0310-9ca6-ca027cbcb966
Diffstat (limited to 'meta/packages/gtk+')
-rw-r--r--meta/packages/gtk+/gtk+-2.11.6/automake-lossage.patch24
-rw-r--r--meta/packages/gtk+/gtk+-2.11.6/disable-tooltips.patch11
-rw-r--r--meta/packages/gtk+/gtk+-2.11.6/migration.patch611
-rw-r--r--meta/packages/gtk+/gtk+-2.11.6/no-xwc.patch151
-rw-r--r--meta/packages/gtk+/gtk+-2.11.6/range-no-redraw.patch4
-rw-r--r--meta/packages/gtk+/gtk+_2.11.6.bb5
6 files changed, 4 insertions, 802 deletions
diff --git a/meta/packages/gtk+/gtk+-2.11.6/automake-lossage.patch b/meta/packages/gtk+/gtk+-2.11.6/automake-lossage.patch
deleted file mode 100644
index 0d423ddbb9..0000000000
--- a/meta/packages/gtk+/gtk+-2.11.6/automake-lossage.patch
+++ /dev/null
@@ -1,24 +0,0 @@
1--- gtk+-2.4.1/docs/tutorial/Makefile.am~ 2003-05-06 22:54:20.000000000 +0100
2+++ gtk+-2.4.1/docs/tutorial/Makefile.am 2004-05-08 12:31:41.000000000 +0100
3@@ -52,21 +52,5 @@
4
5 dist-hook: html
6 cp -Rp $(srcdir)/html $(distdir)
7-else
8-html:
9- echo "***"
10- echo "*** Warning: Tutorial not built"
11- echo "***"
12-
13-pdf:
14- echo "***"
15- echo "*** Warning: Tutorial not built"
16- echo "***"
17-
18-dist-hook:
19- echo "***"
20- echo "*** Warning: Tutorial not built"
21- echo "*** DISTRIBUTION IS INCOMPLETE"
22- echo "***"
23 endif
24
diff --git a/meta/packages/gtk+/gtk+-2.11.6/disable-tooltips.patch b/meta/packages/gtk+/gtk+-2.11.6/disable-tooltips.patch
deleted file mode 100644
index d71d839c3c..0000000000
--- a/meta/packages/gtk+/gtk+-2.11.6/disable-tooltips.patch
+++ /dev/null
@@ -1,11 +0,0 @@
1--- gtk+-2.4.3/gtk/gtktooltips.c.old 2004-07-04 18:52:04.000000000 +0100
2+++ gtk+-2.4.3/gtk/gtktooltips.c 2004-07-04 18:52:08.000000000 +0100
3@@ -118,7 +118,7 @@
4 tooltips->tips_data_list = NULL;
5
6 tooltips->delay = DEFAULT_DELAY;
7- tooltips->enabled = TRUE;
8+ tooltips->enabled = FALSE;
9 tooltips->timer_tag = 0;
10 tooltips->use_sticky_delay = FALSE;
11 tooltips->last_popdown.tv_sec = -1;
diff --git a/meta/packages/gtk+/gtk+-2.11.6/migration.patch b/meta/packages/gtk+/gtk+-2.11.6/migration.patch
deleted file mode 100644
index 4ee786e688..0000000000
--- a/meta/packages/gtk+/gtk+-2.11.6/migration.patch
+++ /dev/null
@@ -1,611 +0,0 @@
1Index: configure.in
2===================================================================
3--- configure.in.orig 2006-10-03 17:54:09.000000000 +0100
4+++ configure.in 2006-10-30 12:58:33.000000000 +0000
5@@ -1529,6 +1529,16 @@
6 GTK_EXTRA_CFLAGS="$msnative_struct"
7 fi
8
9+AC_ARG_ENABLE(display-migration,
10+ [AC_HELP_STRING([--enable-display-migration],
11+ [include support for GPE_CHANGE_DISPLAY protocol])],
12+ enable_migration=yes, enable_migration=no)
13+if test "$enable_migration" = "yes"; then
14+ AC_DEFINE([ENABLE_MIGRATION], 1, [Define if display migration is enabled])
15+ GTK_DEP_LIBS="$GTK_DEP_LIBS -lgcrypt"
16+fi
17+AM_CONDITIONAL(ENABLE_MIGRATION, test $enable_migration = "yes")
18+
19 AC_SUBST(GTK_PACKAGES)
20 AC_SUBST(GTK_EXTRA_LIBS)
21 AC_SUBST(GTK_EXTRA_CFLAGS)
22Index: gtk/Makefile.am
23===================================================================
24--- gtk/Makefile.am.orig 2006-10-02 18:27:53.000000000 +0100
25+++ gtk/Makefile.am 2006-10-30 12:59:14.000000000 +0000
26@@ -589,6 +589,11 @@
27 gtkwindow-decorate.c \
28 gtkwindow.c \
29 $(gtk_clipboard_dnd_c_sources)
30+
31+if ENABLE_MIGRATION
32+gtk_base_c_sources += gtkmigration.c
33+endif
34+
35 gtk_c_sources = $(gtk_base_c_sources)
36 gtk_all_c_sources = $(gtk_base_c_sources)
37
38Index: gtk/gtkmain.c
39===================================================================
40--- gtk/gtkmain.c.orig 2006-09-03 06:31:21.000000000 +0100
41+++ gtk/gtkmain.c 2006-10-30 12:56:34.000000000 +0000
42@@ -507,6 +507,10 @@
43 _gtk_accel_map_init ();
44 _gtk_rc_init ();
45
46+#ifdef ENABLE_MIGRATION
47+ gtk_migration_init ();
48+#endif
49+
50 /* Set the 'initialized' flag.
51 */
52 gtk_initialized = TRUE;
53Index: gtk/gtkmigration.c
54===================================================================
55--- /dev/null 1970-01-01 00:00:00.000000000 +0000
56+++ gtk/gtkmigration.c 2006-10-30 12:56:34.000000000 +0000
57@@ -0,0 +1,529 @@
58+/*
59+ * Copyright (C) 2003, 2005 Philip Blundell <philb@gnu.org>
60+ *
61+ * This program is free software; you can redistribute it and/or
62+ * modify it under the terms of the GNU General Public License
63+ * as published by the Free Software Foundation; either version
64+ * 2 of the License, or (at your option) any later version.
65+ */
66+
67+#include <stdlib.h>
68+#include <ctype.h>
69+#include <libintl.h>
70+#include <string.h>
71+#include <assert.h>
72+
73+#include <X11/X.h>
74+#include <X11/Xlib.h>
75+#include <X11/Xatom.h>
76+
77+#include <gcrypt.h>
78+
79+#include "gtk.h"
80+#include "gdk.h"
81+#include "x11/gdkx.h"
82+
83+#define _(x) gettext(x)
84+
85+static GdkAtom string_gdkatom, display_change_gdkatom;
86+static GdkAtom rsa_challenge_gdkatom;
87+
88+#define DISPLAY_CHANGE_SUCCESS 0
89+#define DISPLAY_CHANGE_UNABLE_TO_CONNECT 1
90+#define DISPLAY_CHANGE_NO_SUCH_SCREEN 2
91+#define DISPLAY_CHANGE_AUTHENTICATION_BAD 3
92+#define DISPLAY_CHANGE_INDETERMINATE_ERROR 4
93+
94+static gboolean no_auth;
95+
96+static GSList *all_widgets;
97+
98+static gboolean gtk_migration_initialised;
99+
100+#define CHALLENGE_LEN 64
101+
102+gchar *gtk_migration_auth_challenge_string;
103+
104+static unsigned char challenge_bytes[CHALLENGE_LEN];
105+static unsigned long challenge_seq;
106+
107+#define hexbyte(x) ((x) >= 10 ? (x) + 'a' - 10 : (x) + '0')
108+
109+struct rsa_key
110+{
111+ gcry_mpi_t n, e, d, p, q, u;
112+};
113+
114+static gcry_mpi_t
115+mpi_from_sexp (gcry_sexp_t r, char *tag)
116+{
117+ gcry_sexp_t s = gcry_sexp_find_token (r, tag, 0);
118+ return gcry_sexp_nth_mpi (s, 1, GCRYMPI_FMT_USG);
119+}
120+
121+static char *
122+hex_from_mpi (gcry_mpi_t m)
123+{
124+ char *buf;
125+ gcry_mpi_aprint (GCRYMPI_FMT_HEX, (void *)&buf, NULL, m);
126+ return buf;
127+}
128+
129+static void
130+gtk_migration_crypt_create_hash (char *display, char *challenge, size_t len, char *result)
131+{
132+ size_t dlen = strlen (display);
133+ gchar *buf = g_malloc (dlen + 1 + len);
134+ strcpy (buf, display);
135+ memcpy (buf + dlen + 1, challenge, len);
136+ gcry_md_hash_buffer (GCRY_MD_SHA1, result, buf, len + dlen + 1);
137+ g_free (buf);
138+}
139+
140+static int
141+do_encode_md (const unsigned char *digest, size_t digestlen, int algo,
142+ unsigned int nbits, gcry_mpi_t *r_val)
143+{
144+ int nframe = (nbits+7) / 8;
145+ unsigned char *frame;
146+ int i, n;
147+ unsigned char asn[100];
148+ size_t asnlen;
149+
150+ asnlen = sizeof(asn);
151+ if (gcry_md_algo_info (algo, GCRYCTL_GET_ASNOID, asn, &asnlen))
152+ return -1;
153+
154+ if (digestlen + asnlen + 4 > nframe )
155+ return -1;
156+
157+ /* We encode the MD in this way:
158+ *
159+ * 0 1 PAD(n bytes) 0 ASN(asnlen bytes) MD(len bytes)
160+ *
161+ * PAD consists of FF bytes.
162+ */
163+ frame = g_malloc (nframe);
164+ n = 0;
165+ frame[n++] = 0;
166+ frame[n++] = 1; /* block type */
167+ i = nframe - digestlen - asnlen -3 ;
168+ assert ( i > 1 );
169+ memset ( frame+n, 0xff, i ); n += i;
170+ frame[n++] = 0;
171+ memcpy ( frame+n, asn, asnlen ); n += asnlen;
172+ memcpy ( frame+n, digest, digestlen ); n += digestlen;
173+ assert ( n == nframe );
174+
175+ gcry_mpi_scan (r_val, GCRYMPI_FMT_USG, frame, nframe, &nframe);
176+ g_free (frame);
177+ return 0;
178+}
179+
180+static gboolean
181+gtk_migration_crypt_check_signature (struct rsa_key *k, char *hash, char *sigbuf)
182+{
183+ gcry_mpi_t mpi, mpi2;
184+ gcry_sexp_t data, sig, key;
185+ int rc;
186+
187+ do_encode_md (hash, 20, GCRY_MD_SHA1, 1024, &mpi);
188+
189+ gcry_sexp_build (&data, NULL, "(data (value %m))", mpi);
190+
191+ gcry_mpi_release (mpi);
192+
193+ gcry_sexp_build (&key, NULL, "(public-key (rsa (n %m) (e %m)))", k->n, k->e);
194+
195+ if (gcry_mpi_scan (&mpi2, GCRYMPI_FMT_HEX, sigbuf, 0, NULL))
196+ {
197+ gcry_sexp_release (data);
198+ return FALSE;
199+ }
200+
201+ gcry_sexp_build (&sig, NULL, "(sig-val (rsa (s %m)))", mpi2);
202+
203+ rc = gcry_pk_verify (sig, data, key);
204+
205+ gcry_sexp_release (data);
206+ gcry_sexp_release (key);
207+ gcry_sexp_release (sig);
208+ gcry_mpi_release (mpi2);
209+
210+ if (rc)
211+ return FALSE;
212+
213+ return TRUE;
214+}
215+
216+static void
217+gtk_migration_auth_update_challenge (void)
218+{
219+ int i;
220+ unsigned char *p;
221+
222+ if (gtk_migration_auth_challenge_string == NULL)
223+ gtk_migration_auth_challenge_string = g_malloc ((CHALLENGE_LEN * 2) + 9);
224+
225+ p = gtk_migration_auth_challenge_string;
226+
227+ for (i = 0; i < CHALLENGE_LEN; i++)
228+ {
229+ *p++ = hexbyte (challenge_bytes[i] >> 4);
230+ *p++ = hexbyte (challenge_bytes[i] & 15);
231+ }
232+
233+ sprintf (p, "%08lx", challenge_seq++);
234+}
235+
236+static void
237+gtk_migration_auth_generate_challenge (void)
238+{
239+ gcry_randomize (challenge_bytes, sizeof (challenge_bytes), GCRY_STRONG_RANDOM);
240+ gtk_migration_auth_update_challenge ();
241+}
242+
243+static struct rsa_key *
244+parse_pubkey (char *s)
245+{
246+ struct rsa_key *r;
247+ gcry_mpi_t n, e;
248+ gchar *sp;
249+
250+ sp = strtok (s, " \n");
251+ gcry_mpi_scan (&e, GCRYMPI_FMT_HEX, sp, 0, NULL);
252+ sp = strtok (NULL, " \n");
253+ gcry_mpi_scan (&n, GCRYMPI_FMT_HEX, sp, 0, NULL);
254+
255+ r = g_malloc0 (sizeof (struct rsa_key));
256+ r->e = e;
257+ r->n = n;
258+ return r;
259+}
260+
261+static struct rsa_key *
262+lookup_pubkey (u_int32_t id)
263+{
264+ const gchar *home_dir = g_get_home_dir ();
265+ gchar *filename = g_strdup_printf ("%s/.gpe/migrate/public", home_dir);
266+ FILE *fp = fopen (filename, "r");
267+ struct rsa_key *r = NULL;
268+
269+ if (fp)
270+ {
271+ while (!feof (fp))
272+ {
273+ char buffer[4096];
274+ if (fgets (buffer, 4096, fp))
275+ {
276+ char *p;
277+ u_int32_t this_id = strtoul (buffer, &p, 16);
278+ if (p != buffer && *p == ' ')
279+ {
280+#ifdef DEBUG
281+ fprintf (stderr, "found id %x\n", this_id);
282+#endif
283+ if (this_id == id)
284+ {
285+ r = parse_pubkey (++p);
286+ break;
287+ }
288+ }
289+ }
290+ }
291+ fclose (fp);
292+ }
293+
294+ g_free (filename);
295+ return r;
296+}
297+
298+static void
299+free_pubkey (struct rsa_key *k)
300+{
301+ gcry_mpi_release (k->n);
302+ gcry_mpi_release (k->e);
303+
304+ g_free (k);
305+}
306+
307+static gboolean
308+gtk_migration_auth_validate_request (char *display, char *data)
309+{
310+ u_int32_t key_id;
311+ char *ep;
312+ char *p;
313+ struct rsa_key *k;
314+ char hash[20];
315+ gboolean rc;
316+
317+ p = strchr (data, ' ');
318+ if (p == NULL)
319+ return FALSE;
320+ *p++ = 0;
321+
322+ key_id = strtoul (data, &ep, 16);
323+ if (*ep)
324+ return FALSE;
325+
326+ k = lookup_pubkey (key_id);
327+ if (k == NULL)
328+ return FALSE;
329+
330+ gtk_migration_crypt_create_hash (display, gtk_migration_auth_challenge_string,
331+ strlen (gtk_migration_auth_challenge_string), hash);
332+
333+ rc = gtk_migration_crypt_check_signature (k, hash, p);
334+
335+ free_pubkey (k);
336+
337+ return rc;
338+}
339+
340+static int
341+do_change_display (GtkWidget *w, char *display_name)
342+{
343+ GdkDisplay *newdisplay;
344+ guint screen_nr = 1;
345+ guint i;
346+
347+ if (display_name[0] == 0)
348+ return DISPLAY_CHANGE_INDETERMINATE_ERROR;
349+
350+ i = strlen (display_name) - 1;
351+ while (i > 0 && isdigit (display_name[i]))
352+ i--;
353+
354+ if (display_name[i] == '.')
355+ {
356+ screen_nr = atoi (display_name + i + 1);
357+ display_name[i] = 0;
358+ }
359+
360+ newdisplay = gdk_display_open (display_name);
361+ if (newdisplay)
362+ {
363+ GdkScreen *screen = gdk_display_get_screen (newdisplay, screen_nr);
364+ if (screen)
365+ {
366+ gtk_window_set_screen (GTK_WINDOW (w), screen);
367+ gdk_display_manager_set_default_display (gdk_display_manager_get (),
368+ newdisplay);
369+ return DISPLAY_CHANGE_SUCCESS;
370+ }
371+ else
372+ return DISPLAY_CHANGE_NO_SUCH_SCREEN;
373+ }
374+
375+ return DISPLAY_CHANGE_UNABLE_TO_CONNECT;
376+}
377+
378+static void
379+set_challenge_on_window (GdkWindow *window)
380+{
381+ gdk_property_change (window, rsa_challenge_gdkatom, string_gdkatom,
382+ 8, GDK_PROP_MODE_REPLACE, gtk_migration_auth_challenge_string,
383+ strlen (gtk_migration_auth_challenge_string));
384+}
385+
386+static void
387+update_challenge_on_windows (void)
388+{
389+ GSList *i;
390+
391+ gtk_migration_auth_update_challenge ();
392+
393+ for (i = all_widgets; i; i = i->next)
394+ {
395+ GtkWidget *w = GTK_WIDGET (i->data);
396+ if (w->window)
397+ set_challenge_on_window (w->window);
398+ }
399+}
400+
401+static void
402+reset_state (GdkWindow *window)
403+{
404+ gdk_property_change (window, display_change_gdkatom, string_gdkatom,
405+ 8, GDK_PROP_MODE_REPLACE, NULL, 0);
406+}
407+
408+static void
409+generate_response (GdkDisplay *gdisplay, Display *dpy, Window window, int code)
410+{
411+ XClientMessageEvent ev;
412+ Atom atom = gdk_x11_atom_to_xatom_for_display (gdisplay,
413+ display_change_gdkatom);
414+
415+ memset (&ev, 0, sizeof (ev));
416+
417+ ev.type = ClientMessage;
418+ ev.window = window;
419+ ev.message_type = atom;
420+ ev.format = 32;
421+
422+ ev.data.l[0] = window;
423+ ev.data.l[1] = code;
424+
425+ XSendEvent (dpy, DefaultRootWindow (dpy), False, SubstructureNotifyMask, (XEvent *)&ev);
426+}
427+
428+static int
429+handle_request (GdkWindow *gwindow, char *prop)
430+{
431+ GtkWidget *widget;
432+ char *target, *auth_method, *auth_data;
433+ char *p;
434+
435+ target = prop;
436+ auth_method = "NULL";
437+ auth_data = NULL;
438+
439+ p = strchr (prop, ' ');
440+ if (p)
441+ {
442+ *p = 0;
443+ auth_method = ++p;
444+
445+ p = strchr (p, ' ');
446+ if (p)
447+ {
448+ *p = 0;
449+ auth_data = ++p;
450+ }
451+ }
452+
453+ if (no_auth == FALSE)
454+ {
455+ if (!strcasecmp (auth_method, "null"))
456+ return DISPLAY_CHANGE_AUTHENTICATION_BAD;
457+ else if (!strcasecmp (auth_method, "rsa-sig"))
458+ {
459+ if (gtk_migration_auth_validate_request (target, auth_data) == FALSE)
460+ return DISPLAY_CHANGE_AUTHENTICATION_BAD;
461+ }
462+ else
463+ return DISPLAY_CHANGE_AUTHENTICATION_BAD;
464+ }
465+
466+ gdk_window_get_user_data (gwindow, (gpointer*) &widget);
467+
468+ if (widget)
469+ return do_change_display (widget, target);
470+
471+ return DISPLAY_CHANGE_INDETERMINATE_ERROR;
472+}
473+
474+static GdkFilterReturn
475+filter_func (GdkXEvent *xevp, GdkEvent *ev, gpointer p)
476+{
477+ XPropertyEvent *xev = (XPropertyEvent *)xevp;
478+
479+ if (xev->type == PropertyNotify)
480+ {
481+ GdkDisplay *gdisplay;
482+ Atom atom;
483+
484+ gdisplay = gdk_x11_lookup_xdisplay (xev->display);
485+ if (gdisplay)
486+ {
487+ atom = gdk_x11_atom_to_xatom_for_display (gdisplay, display_change_gdkatom);
488+
489+ if (xev->atom == atom)
490+ {
491+ GdkWindow *gwindow;
492+
493+ gwindow = gdk_window_lookup_for_display (gdisplay, xev->window);
494+
495+ if (gwindow)
496+ {
497+ GdkAtom actual_type;
498+ gint actual_format;
499+ gint actual_length;
500+ unsigned char *prop = NULL;
501+
502+ if (gdk_property_get (gwindow, display_change_gdkatom, string_gdkatom,
503+ 0, G_MAXLONG, FALSE, &actual_type, &actual_format,
504+ &actual_length, &prop))
505+ {
506+ if (actual_length != 0)
507+ {
508+ if (actual_type == string_gdkatom && actual_length > 8)
509+ {
510+ gchar *buf = g_malloc (actual_length + 1);
511+ int rc;
512+
513+ memcpy (buf, prop, actual_length);
514+ buf[actual_length] = 0;
515+
516+ rc = handle_request (gwindow, buf);
517+
518+ g_free (buf);
519+ generate_response (gdisplay, xev->display, xev->window, rc);
520+
521+ if (rc == DISPLAY_CHANGE_SUCCESS)
522+ update_challenge_on_windows ();
523+ }
524+
525+ reset_state (gwindow);
526+ }
527+ }
528+
529+ if (prop)
530+ g_free (prop);
531+ }
532+ }
533+
534+ return GDK_FILTER_REMOVE;
535+ }
536+ }
537+
538+ return GDK_FILTER_CONTINUE;
539+}
540+
541+static void
542+unrealize_window (GtkWidget *w)
543+{
544+ all_widgets = g_slist_remove (all_widgets, w);
545+}
546+
547+void
548+gtk_migration_mark_window (GtkWidget *w)
549+{
550+ if (! gtk_migration_initialised)
551+ {
552+ g_warning ("gtk_migration not initialised yet");
553+ return;
554+ }
555+
556+ if (GTK_WIDGET_REALIZED (w))
557+ {
558+ GdkWindow *window = w->window;
559+
560+ gdk_window_add_filter (window, filter_func, NULL);
561+
562+ reset_state (window);
563+ set_challenge_on_window (window);
564+
565+ all_widgets = g_slist_append (all_widgets, w);
566+
567+ g_signal_connect (G_OBJECT (w), "unrealize", G_CALLBACK (unrealize_window), NULL);
568+ }
569+ else
570+ g_signal_connect (G_OBJECT (w), "realize", G_CALLBACK (gtk_migration_mark_window), NULL);
571+}
572+
573+void
574+gtk_migration_init (void)
575+{
576+ if (getenv ("GPE_DISPLAY_MIGRATION_NO_AUTH") != NULL)
577+ no_auth = TRUE;
578+
579+ string_gdkatom = gdk_atom_intern ("STRING", FALSE);
580+ display_change_gdkatom = gdk_atom_intern ("_GPE_DISPLAY_CHANGE", FALSE);
581+ rsa_challenge_gdkatom = gdk_atom_intern ("_GPE_DISPLAY_CHANGE_RSA_CHALLENGE", FALSE);
582+
583+ gtk_migration_auth_generate_challenge ();
584+
585+ gtk_migration_initialised = TRUE;
586+}
587Index: gtk/gtkwindow.c
588===================================================================
589--- gtk/gtkwindow.c.orig 2006-10-03 16:51:46.000000000 +0100
590+++ gtk/gtkwindow.c 2006-10-30 12:56:34.000000000 +0000
591@@ -50,6 +50,9 @@
592 #include "x11/gdkx.h"
593 #endif
594
595+extern void gtk_migration_mark_window (GtkWidget *w);
596+
597+
598 enum {
599 SET_FOCUS,
600 FRAME_EVENT,
601@@ -823,6 +826,10 @@
602
603 g_signal_connect (window->screen, "composited_changed",
604 G_CALLBACK (gtk_window_on_composited_changed), window);
605+
606+#ifdef ENABLE_MIGRATION
607+ gtk_migration_mark_window (window);
608+#endif
609 }
610
611 static void
diff --git a/meta/packages/gtk+/gtk+-2.11.6/no-xwc.patch b/meta/packages/gtk+/gtk+-2.11.6/no-xwc.patch
deleted file mode 100644
index affb4a303e..0000000000
--- a/meta/packages/gtk+/gtk+-2.11.6/no-xwc.patch
+++ /dev/null
@@ -1,151 +0,0 @@
1diff -urNd ../gtk+-2.6.0-r2/gtk+-2.6.0/gdk/x11/gdkdrawable-x11.c gtk+-2.6.0/gdk/x11/gdkdrawable-x11.c
2--- ../gtk+-2.6.0-r2/gtk+-2.6.0/gdk/x11/gdkdrawable-x11.c 2004-11-30 14:57:14 +00:00
3+++ gtk+-2.6.0/gdk/x11/gdkdrawable-x11.c 2005-01-02 15:38:06 +00:00
4@@ -576,12 +576,14 @@
5 GDK_GC_GET_XGC (gc), x, y, (XChar2b *) text, text_length / 2);
6 }
7 }
8+#ifdef HAVE_XWC
9 else if (font->type == GDK_FONT_FONTSET)
10 {
11 XFontSet fontset = (XFontSet) GDK_FONT_XFONT (font);
12 XmbDrawString (xdisplay, impl->xid,
13 fontset, GDK_GC_GET_XGC (gc), x, y, text, text_length);
14 }
15+#endif
16 else
17 g_error("undefined font type\n");
18 }
19@@ -613,6 +615,7 @@
20 GDK_GC_GET_XGC (gc), x, y, text_8bit, text_length);
21 g_free (text_8bit);
22 }
23+#ifdef HAVE_XWC
24 else if (font->type == GDK_FONT_FONTSET)
25 {
26 if (sizeof(GdkWChar) == sizeof(wchar_t))
27@@ -633,6 +636,7 @@
28 g_free (text_wchar);
29 }
30 }
31+#endif
32 else
33 g_error("undefined font type\n");
34 }
35diff -urNd ../gtk+-2.6.0-r2/gtk+-2.6.0/gdk/x11/gdkfont-x11.c gtk+-2.6.0/gdk/x11/gdkfont-x11.c
36--- ../gtk+-2.6.0-r2/gtk+-2.6.0/gdk/x11/gdkfont-x11.c 2004-08-26 01:23:46 +01:00
37+++ gtk+-2.6.0/gdk/x11/gdkfont-x11.c 2005-01-02 15:45:39 +00:00
38@@ -525,10 +525,12 @@
39 width = XTextWidth16 (xfont, (XChar2b *) text, text_length / 2);
40 }
41 break;
42+#ifdef HAVE_XWC
43 case GDK_FONT_FONTSET:
44 fontset = (XFontSet) private->xfont;
45 width = XmbTextEscapement (fontset, text, text_length);
46 break;
47+#endif
48 default:
49 width = 0;
50 }
51@@ -578,6 +580,7 @@
52 width = 0;
53 }
54 break;
55+#ifdef HAVE_XWC
56 case GDK_FONT_FONTSET:
57 if (sizeof(GdkWChar) == sizeof(wchar_t))
58 {
59@@ -595,6 +598,7 @@
60 g_free (text_wchar);
61 }
62 break;
63+#endif
64 default:
65 width = 0;
66 }
67@@ -667,6 +671,7 @@
68 if (descent)
69 *descent = overall.descent;
70 break;
71+#ifdef HAVE_XWC
72 case GDK_FONT_FONTSET:
73 fontset = (XFontSet) private->xfont;
74 XmbTextExtents (fontset, text, text_length, &ink, &logical);
75@@ -681,6 +686,7 @@
76 if (descent)
77 *descent = ink.y + ink.height;
78 break;
79+#endif
80 }
81
82 }
83@@ -753,6 +759,7 @@
84 *descent = overall.descent;
85 break;
86 }
87+#ifdef HAVE_XWC
88 case GDK_FONT_FONTSET:
89 fontset = (XFontSet) private->xfont;
90
91@@ -780,6 +787,7 @@
92 if (descent)
93 *descent = ink.y + ink.height;
94 break;
95+#endif
96 }
97
98 }
99diff -urNd ../gtk+-2.6.0-r2/gtk+-2.6.0/gdk/x11/gdkim-x11.c gtk+-2.6.0/gdk/x11/gdkim-x11.c
100--- ../gtk+-2.6.0-r2/gtk+-2.6.0/gdk/x11/gdkim-x11.c 2004-11-17 00:55:10 +00:00
101+++ gtk+-2.6.0/gdk/x11/gdkim-x11.c 2005-01-02 15:42:04 +00:00
102@@ -48,6 +48,7 @@
103 void
104 _gdk_x11_initialize_locale (void)
105 {
106+#ifdef HAVE_XWC
107 wchar_t result;
108 gchar *current_locale;
109 static char *last_locale = NULL;
110@@ -93,7 +94,8 @@
111 GDK_NOTE (XIM,
112 g_message ("%s multi-byte string functions.",
113 gdk_use_mb ? "Using" : "Not using"));
114-
115+#endif
116+
117 return;
118 }
119
120@@ -136,6 +138,7 @@
121 {
122 gchar *mbstr;
123
124+#ifdef HAVE_XWC
125 if (gdk_use_mb)
126 {
127 GdkDisplay *display = find_a_display ();
128@@ -178,6 +181,7 @@
129 XFree (tpr.value);
130 }
131 else
132+#endif
133 {
134 gint length = 0;
135 gint i;
136@@ -210,6 +214,7 @@
137 gint
138 gdk_mbstowcs (GdkWChar *dest, const gchar *src, gint dest_max)
139 {
140+#ifdef HAVE_XWC
141 if (gdk_use_mb)
142 {
143 GdkDisplay *display = find_a_display ();
144@@ -242,6 +247,7 @@
145 return len_cpy;
146 }
147 else
148+#endif
149 {
150 gint i;
151
diff --git a/meta/packages/gtk+/gtk+-2.11.6/range-no-redraw.patch b/meta/packages/gtk+/gtk+-2.11.6/range-no-redraw.patch
index e3603d7700..15de0c25d8 100644
--- a/meta/packages/gtk+/gtk+-2.11.6/range-no-redraw.patch
+++ b/meta/packages/gtk+/gtk+-2.11.6/range-no-redraw.patch
@@ -2,10 +2,12 @@ Index: gtk/gtkrange.c
2=================================================================== 2===================================================================
3--- gtk/gtkrange.c (revision 18523) 3--- gtk/gtkrange.c (revision 18523)
4+++ gtk/gtkrange.c (working copy) 4+++ gtk/gtkrange.c (working copy)
5@@ -99,6 +99,8 @@ 5@@ -99,8 +99,10 @@
6 6
7 GtkSensitivityType lower_sensitivity; 7 GtkSensitivityType lower_sensitivity;
8 GtkSensitivityType upper_sensitivity; 8 GtkSensitivityType upper_sensitivity;
9
10 gdouble fill_level;
9+ 11+
10+ guint motion_idle; 12+ guint motion_idle;
11 }; 13 };
diff --git a/meta/packages/gtk+/gtk+_2.11.6.bb b/meta/packages/gtk+/gtk+_2.11.6.bb
index 8cdfa8bcb1..6b1ceef63d 100644
--- a/meta/packages/gtk+/gtk+_2.11.6.bb
+++ b/meta/packages/gtk+/gtk+_2.11.6.bb
@@ -1,17 +1,14 @@
1require gtk+.inc 1require gtk+.inc
2 2
3DEPENDS += "cairo" 3DEPENDS += "cairo"
4PR = "r1"
4 5
5# disable per default - untested and not all patches included. 6# disable per default - untested and not all patches included.
6DEFAULT_PREFERENCE = "-1" 7DEFAULT_PREFERENCE = "-1"
7 8
8SRC_URI = "http://download.gnome.org/sources/gtk+/2.11/gtk+-${PV}.tar.bz2 \ 9SRC_URI = "http://download.gnome.org/sources/gtk+/2.11/gtk+-${PV}.tar.bz2 \
9 file://no-xwc.patch;patch=1 \
10 file://automake-lossage.patch;patch=1 \
11 file://disable-tooltips.patch;patch=1 \
12 file://xsettings.patch;patch=1 \ 10 file://xsettings.patch;patch=1 \
13 file://small-gtkfilesel.patch;patch=1 \ 11 file://small-gtkfilesel.patch;patch=1 \
14 file://migration.patch;patch=1;pnum=0 \
15 file://run-iconcache.patch;patch=1 \ 12 file://run-iconcache.patch;patch=1 \
16 file://disable-print.patch;patch=1 \ 13 file://disable-print.patch;patch=1 \
17 file://hardcoded_libtool.patch;patch=1 \ 14 file://hardcoded_libtool.patch;patch=1 \