summaryrefslogtreecommitdiff
path: root/packages/gtk+/gtk+-2.8.16/no-xwc.patch
blob: 318b1503597694b1cadd13bd45dc27e844142ac2 (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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
Index: configure.in
===================================================================
RCS file: /cvs/gnome/gtk+/configure.in,v
retrieving revision 1.469.2.22
diff -u -r1.469.2.22 configure.in
--- gtk/configure.in	16 Mar 2006 16:39:45 -0000	1.469.2.22
+++ gtk/configure.in	20 Mar 2006 12:07:11 -0000
@@ -1115,6 +1115,8 @@
 
   AC_CHECK_FUNCS(XConvertCase XInternAtoms)
 
+  AC_CHECK_FUNCS(XmbDrawString)
+
   # Generic X11R6 check needed for XIM support; we could
   # probably use this to replace the above, but we'll
   # leave the separate checks for XConvertCase and XInternAtoms 
Index: gdk/x11/gdkdrawable-x11.c
===================================================================
RCS file: /cvs/gnome/gtk+/gdk/x11/gdkdrawable-x11.c,v
retrieving revision 1.58
diff -u -r1.58 gdkdrawable-x11.c
--- gtk/gdk/x11/gdkdrawable-x11.c	15 Aug 2005 19:04:54 -0000	1.58
+++ gtk/gdk/x11/gdkdrawable-x11.c	20 Mar 2006 12:07:12 -0000
@@ -579,12 +579,14 @@
 			 GDK_GC_GET_XGC (gc), x, y, (XChar2b *) text, text_length / 2);
 	}
     }
+#ifdef HAVE_XMBDRAWSTRING
   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");
 }
@@ -616,6 +618,7 @@
                    GDK_GC_GET_XGC (gc), x, y, text_8bit, text_length);
       g_free (text_8bit);
     }
+#ifdef HAVE_XMBDRAWSTRING
   else if (font->type == GDK_FONT_FONTSET)
     {
       if (sizeof(GdkWChar) == sizeof(wchar_t))
@@ -636,6 +639,7 @@
 	  g_free (text_wchar);
 	}
     }
+#endif
   else
     g_error("undefined font type\n");
 }
Index: gdk/x11/gdkfont-x11.c
===================================================================
RCS file: /cvs/gnome/gtk+/gdk/x11/gdkfont-x11.c,v
retrieving revision 1.48.2.1
diff -u -r1.48.2.1 gdkfont-x11.c
--- gtk/gdk/x11/gdkfont-x11.c	20 Jan 2006 04:39:43 -0000	1.48.2.1
+++ gtk/gdk/x11/gdkfont-x11.c	20 Mar 2006 12:07:12 -0000
@@ -527,10 +527,12 @@
 	  width = XTextWidth16 (xfont, (XChar2b *) text, text_length / 2);
 	}
       break;
+#ifdef HAVE_XMBDRAWSTRING
     case GDK_FONT_FONTSET:
       fontset = (XFontSet) private->xfont;
       width = XmbTextEscapement (fontset, text, text_length);
       break;
+#endif
     default:
       width = 0;
     }
@@ -580,6 +582,7 @@
           width = 0;
         }
       break;
+#ifdef HAVE_XMBDRAWSTRING
     case GDK_FONT_FONTSET:
       if (sizeof(GdkWChar) == sizeof(wchar_t))
 	{
@@ -597,6 +600,7 @@
 	  g_free (text_wchar);
 	}
       break;
+#endif
     default:
       width = 0;
     }
@@ -669,6 +673,7 @@
       if (descent)
 	*descent = overall.descent;
       break;
+#ifdef HAVE_XMBDRAWSTRING
     case GDK_FONT_FONTSET:
       fontset = (XFontSet) private->xfont;
       XmbTextExtents (fontset, text, text_length, &ink, &logical);
@@ -683,6 +688,7 @@
       if (descent)
 	*descent = ink.y + ink.height;
       break;
+#endif
     }
 
 }
@@ -755,6 +761,7 @@
 	  *descent = overall.descent;
 	break;
       }
+#ifdef HAVE_XMBDRAWSTRING
     case GDK_FONT_FONTSET:
       fontset = (XFontSet) private->xfont;
 
@@ -782,6 +789,7 @@
       if (descent)
 	*descent = ink.y + ink.height;
       break;
+#endif
     }
 
 }
Index: gdk/x11/gdkim-x11.c
===================================================================
RCS file: /cvs/gnome/gtk+/gdk/x11/gdkim-x11.c,v
retrieving revision 1.38
diff -u -r1.38 gdkim-x11.c
--- gtk/gdk/x11/gdkim-x11.c	16 Mar 2005 03:17:27 -0000	1.38
+++ gtk/gdk/x11/gdkim-x11.c	20 Mar 2006 12:07:12 -0000
@@ -48,6 +48,7 @@
 void
 _gdk_x11_initialize_locale (void)
 {
+#ifdef HAVE_XMBDRAWSTRING
   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_XMBDRAWSTRING
   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_XMBDRAWSTRING
   if (gdk_use_mb)
     {
       GdkDisplay *display = find_a_display ();
@@ -242,6 +247,7 @@
       return len_cpy;
     }
   else
+#endif
     {
       gint i;