Annotation of /trunk/tigervnc/patches/tigervnc-1.2.0-xserver112.patch
Parent Directory | Revision Log
Revision 2079 -
(hide annotations)
(download)
Mon Feb 18 15:20:23 2013 UTC (11 years, 7 months ago) by niro
File size: 11945 byte(s)
Mon Feb 18 15:20:23 2013 UTC (11 years, 7 months ago) by niro
File size: 11945 byte(s)
-added patches for tigervnc-1.2.0
1 | niro | 2079 | diff -ur tigervnc-1.2.0.orig/unix/xserver/hw/vnc/Makefile.am tigervnc-1.2.0/unix/xserver/hw/vnc/Makefile.am |
2 | --- tigervnc-1.2.0.orig/unix/xserver/hw/vnc/Makefile.am 2011-10-31 09:14:40.000000000 +0100 | ||
3 | +++ tigervnc-1.2.0/unix/xserver/hw/vnc/Makefile.am 2012-04-15 12:19:00.995517546 +0200 | ||
4 | @@ -63,7 +63,7 @@ | ||
5 | BUILT_SOURCES = $(nodist_Xvnc_SOURCES) | ||
6 | |||
7 | fb.h: $(top_srcdir)/fb/fb.h | ||
8 | - cat $(top_srcdir)/fb/fb.h | sed -e 's,and,c_and,' -e 's,xor,c_xor,' > $(srcdir)/fb.h | ||
9 | + cat $(top_srcdir)/fb/fb.h | sed -e 's,and,c_and,g' -e 's,xor,c_xor,g' > $(srcdir)/fb.h | ||
10 | |||
11 | pixman.h: | ||
12 | for i in ${XSERVERLIBS_CFLAGS}; do \ | ||
13 | @@ -78,4 +78,4 @@ | ||
14 | fi | ||
15 | |||
16 | fbrop.h: $(top_srcdir)/fb/fbrop.h | ||
17 | - cat $(top_srcdir)/fb/fbrop.h | sed -e 's,and,c_and,' -e 's,xor,c_xor,' > $(srcdir)/fbrop.h | ||
18 | + cat $(top_srcdir)/fb/fbrop.h | sed -e 's,and,c_and,g' -e 's,xor,c_xor,g' > $(srcdir)/fbrop.h | ||
19 | diff -ur tigervnc-1.2.0.orig/unix/xserver/hw/vnc/vncExtInit.cc tigervnc-1.2.0/unix/xserver/hw/vnc/vncExtInit.cc | ||
20 | --- tigervnc-1.2.0.orig/unix/xserver/hw/vnc/vncExtInit.cc 2011-11-07 13:51:34.000000000 +0100 | ||
21 | +++ tigervnc-1.2.0/unix/xserver/hw/vnc/vncExtInit.cc 2012-04-15 12:18:57.819557251 +0200 | ||
22 | @@ -59,6 +59,7 @@ | ||
23 | #include "XserverDesktop.h" | ||
24 | #include "vncHooks.h" | ||
25 | #include "vncExtInit.h" | ||
26 | +#include "xorg-version.h" | ||
27 | |||
28 | extern "C" { | ||
29 | |||
30 | @@ -449,10 +450,16 @@ | ||
31 | ev.window = cur->window; | ||
32 | ev.time = GetTimeInMillis(); | ||
33 | if (cur->client->swapped) { | ||
34 | +#if XORG < 112 | ||
35 | int n; | ||
36 | swaps(&ev.sequenceNumber, n); | ||
37 | swapl(&ev.window, n); | ||
38 | swapl(&ev.time, n); | ||
39 | +#else | ||
40 | + swaps(&ev.sequenceNumber); | ||
41 | + swapl(&ev.window); | ||
42 | + swapl(&ev.time); | ||
43 | +#endif | ||
44 | } | ||
45 | WriteToClient(cur->client, sizeof(xVncExtClientCutTextNotifyEvent), | ||
46 | (char *)&ev); | ||
47 | @@ -495,9 +502,14 @@ | ||
48 | ev.sequenceNumber = cur->client->sequence; | ||
49 | ev.window = cur->window; | ||
50 | if (cur->client->swapped) { | ||
51 | +#if XORG < 112 | ||
52 | int n; | ||
53 | swaps(&ev.sequenceNumber, n); | ||
54 | swapl(&ev.window, n); | ||
55 | +#else | ||
56 | + swaps(&ev.sequenceNumber); | ||
57 | + swapl(&ev.window); | ||
58 | +#endif | ||
59 | } | ||
60 | WriteToClient(cur->client, sizeof(xVncExtQueryConnectNotifyEvent), | ||
61 | (char *)&ev); | ||
62 | @@ -538,10 +550,16 @@ | ||
63 | ev.window = cur->window; | ||
64 | ev.selection = selection; | ||
65 | if (cur->client->swapped) { | ||
66 | +#if XORG < 112 | ||
67 | int n; | ||
68 | swaps(&ev.sequenceNumber, n); | ||
69 | swapl(&ev.window, n); | ||
70 | swapl(&ev.selection, n); | ||
71 | +#else | ||
72 | + swaps(&ev.sequenceNumber); | ||
73 | + swapl(&ev.window); | ||
74 | + swapl(&ev.selection); | ||
75 | +#endif | ||
76 | } | ||
77 | WriteToClient(cur->client, sizeof(xVncExtSelectionChangeNotifyEvent), | ||
78 | (char *)&ev); | ||
79 | @@ -562,7 +580,6 @@ | ||
80 | param.buf[stuff->paramLen] = 0; | ||
81 | |||
82 | xVncExtSetParamReply rep; | ||
83 | - int n; | ||
84 | rep.type = X_Reply; | ||
85 | rep.length = 0; | ||
86 | rep.success = 0; | ||
87 | @@ -603,8 +620,14 @@ | ||
88 | |||
89 | deny: | ||
90 | if (client->swapped) { | ||
91 | +#if XORG < 112 | ||
92 | + int n; | ||
93 | swaps(&rep.sequenceNumber, n); | ||
94 | swapl(&rep.length, n); | ||
95 | +#else | ||
96 | + swaps(&rep.sequenceNumber); | ||
97 | + swapl(&rep.length); | ||
98 | +#endif | ||
99 | } | ||
100 | WriteToClient(client, sizeof(xVncExtSetParamReply), (char *)&rep); | ||
101 | return (client->noClientException); | ||
102 | @@ -612,9 +635,13 @@ | ||
103 | |||
104 | static int SProcVncExtSetParam(ClientPtr client) | ||
105 | { | ||
106 | - register char n; | ||
107 | REQUEST(xVncExtSetParamReq); | ||
108 | +#if XORG < 112 | ||
109 | + register char n; | ||
110 | swaps(&stuff->length, n); | ||
111 | +#else | ||
112 | + swaps(&stuff->length); | ||
113 | +#endif | ||
114 | REQUEST_AT_LEAST_SIZE(xVncExtSetParamReq); | ||
115 | return ProcVncExtSetParam(client); | ||
116 | } | ||
117 | @@ -628,7 +655,6 @@ | ||
118 | param.buf[stuff->paramLen] = 0; | ||
119 | |||
120 | xVncExtGetParamReply rep; | ||
121 | - int n; | ||
122 | rep.type = X_Reply; | ||
123 | rep.sequenceNumber = client->sequence; | ||
124 | rep.success = 0; | ||
125 | @@ -646,9 +672,16 @@ | ||
126 | rep.length = (len + 3) >> 2; | ||
127 | rep.valueLen = len; | ||
128 | if (client->swapped) { | ||
129 | +#if XORG < 112 | ||
130 | + int n; | ||
131 | swaps(&rep.sequenceNumber, n); | ||
132 | swapl(&rep.length, n); | ||
133 | swaps(&rep.valueLen, n); | ||
134 | +#else | ||
135 | + swaps(&rep.sequenceNumber); | ||
136 | + swapl(&rep.length); | ||
137 | + swaps(&rep.valueLen); | ||
138 | +#endif | ||
139 | } | ||
140 | WriteToClient(client, sizeof(xVncExtGetParamReply), (char *)&rep); | ||
141 | if (value) | ||
142 | @@ -659,9 +692,13 @@ | ||
143 | |||
144 | static int SProcVncExtGetParam(ClientPtr client) | ||
145 | { | ||
146 | - register char n; | ||
147 | REQUEST(xVncExtGetParamReq); | ||
148 | +#if XORG < 112 | ||
149 | + register char n; | ||
150 | swaps(&stuff->length, n); | ||
151 | +#else | ||
152 | + swaps(&stuff->length); | ||
153 | +#endif | ||
154 | REQUEST_AT_LEAST_SIZE(xVncExtGetParamReq); | ||
155 | return ProcVncExtGetParam(client); | ||
156 | } | ||
157 | @@ -675,7 +712,6 @@ | ||
158 | param.buf[stuff->paramLen] = 0; | ||
159 | |||
160 | xVncExtGetParamDescReply rep; | ||
161 | - int n; | ||
162 | rep.type = X_Reply; | ||
163 | rep.sequenceNumber = client->sequence; | ||
164 | rep.success = 0; | ||
165 | @@ -690,9 +726,16 @@ | ||
166 | rep.length = (len + 3) >> 2; | ||
167 | rep.descLen = len; | ||
168 | if (client->swapped) { | ||
169 | +#if XORG < 112 | ||
170 | + int n; | ||
171 | swaps(&rep.sequenceNumber, n); | ||
172 | swapl(&rep.length, n); | ||
173 | swaps(&rep.descLen, n); | ||
174 | +#else | ||
175 | + swaps(&rep.sequenceNumber); | ||
176 | + swapl(&rep.length); | ||
177 | + swaps(&rep.descLen); | ||
178 | +#endif | ||
179 | } | ||
180 | WriteToClient(client, sizeof(xVncExtGetParamDescReply), (char *)&rep); | ||
181 | if (desc) | ||
182 | @@ -702,9 +745,13 @@ | ||
183 | |||
184 | static int SProcVncExtGetParamDesc(ClientPtr client) | ||
185 | { | ||
186 | - register char n; | ||
187 | REQUEST(xVncExtGetParamDescReq); | ||
188 | +#if XORG < 112 | ||
189 | + register char n; | ||
190 | swaps(&stuff->length, n); | ||
191 | +#else | ||
192 | + swaps(&stuff->length); | ||
193 | +#endif | ||
194 | REQUEST_AT_LEAST_SIZE(xVncExtGetParamDescReq); | ||
195 | return ProcVncExtGetParamDesc(client); | ||
196 | } | ||
197 | @@ -715,7 +762,6 @@ | ||
198 | REQUEST_SIZE_MATCH(xVncExtListParamsReq); | ||
199 | |||
200 | xVncExtListParamsReply rep; | ||
201 | - int n; | ||
202 | rep.type = X_Reply; | ||
203 | rep.sequenceNumber = client->sequence; | ||
204 | |||
205 | @@ -731,9 +777,16 @@ | ||
206 | rep.length = (len + 3) >> 2; | ||
207 | rep.nParams = nParams; | ||
208 | if (client->swapped) { | ||
209 | +#if XORG < 112 | ||
210 | + int n; | ||
211 | swaps(&rep.sequenceNumber, n); | ||
212 | swapl(&rep.length, n); | ||
213 | swaps(&rep.nParams, n); | ||
214 | +#else | ||
215 | + swaps(&rep.sequenceNumber); | ||
216 | + swapl(&rep.length); | ||
217 | + swaps(&rep.nParams); | ||
218 | +#endif | ||
219 | } | ||
220 | WriteToClient(client, sizeof(xVncExtListParamsReply), (char *)&rep); | ||
221 | rdr::U8* data = new rdr::U8[len]; | ||
222 | @@ -753,9 +806,13 @@ | ||
223 | |||
224 | static int SProcVncExtListParams(ClientPtr client) | ||
225 | { | ||
226 | - register char n; | ||
227 | REQUEST(xVncExtListParamsReq); | ||
228 | +#if XORG < 112 | ||
229 | + register char n; | ||
230 | swaps(&stuff->length, n); | ||
231 | +#else | ||
232 | + swaps(&stuff->length); | ||
233 | +#endif | ||
234 | REQUEST_SIZE_MATCH(xVncExtListParamsReq); | ||
235 | return ProcVncExtListParams(client); | ||
236 | } | ||
237 | @@ -778,11 +835,19 @@ | ||
238 | |||
239 | static int SProcVncExtSetServerCutText(ClientPtr client) | ||
240 | { | ||
241 | - register char n; | ||
242 | REQUEST(xVncExtSetServerCutTextReq); | ||
243 | +#if XORG < 112 | ||
244 | + register char n; | ||
245 | swaps(&stuff->length, n); | ||
246 | +#else | ||
247 | + swaps(&stuff->length); | ||
248 | +#endif | ||
249 | REQUEST_AT_LEAST_SIZE(xVncExtSetServerCutTextReq); | ||
250 | +#if XORG < 112 | ||
251 | swapl(&stuff->textLen, n); | ||
252 | +#else | ||
253 | + swapl(&stuff->textLen); | ||
254 | +#endif | ||
255 | return ProcVncExtSetServerCutText(client); | ||
256 | } | ||
257 | |||
258 | @@ -792,15 +857,21 @@ | ||
259 | REQUEST_SIZE_MATCH(xVncExtGetClientCutTextReq); | ||
260 | |||
261 | xVncExtGetClientCutTextReply rep; | ||
262 | - int n; | ||
263 | rep.type = X_Reply; | ||
264 | rep.length = (clientCutTextLen + 3) >> 2; | ||
265 | rep.sequenceNumber = client->sequence; | ||
266 | rep.textLen = clientCutTextLen; | ||
267 | if (client->swapped) { | ||
268 | +#if XORG < 112 | ||
269 | + int n; | ||
270 | swaps(&rep.sequenceNumber, n); | ||
271 | swapl(&rep.length, n); | ||
272 | swapl(&rep.textLen, n); | ||
273 | +#else | ||
274 | + swaps(&rep.sequenceNumber); | ||
275 | + swapl(&rep.length); | ||
276 | + swapl(&rep.textLen); | ||
277 | +#endif | ||
278 | } | ||
279 | WriteToClient(client, sizeof(xVncExtGetClientCutTextReply), (char *)&rep); | ||
280 | if (clientCutText) | ||
281 | @@ -810,9 +881,13 @@ | ||
282 | |||
283 | static int SProcVncExtGetClientCutText(ClientPtr client) | ||
284 | { | ||
285 | - register char n; | ||
286 | REQUEST(xVncExtGetClientCutTextReq); | ||
287 | +#if XORG < 112 | ||
288 | + register char n; | ||
289 | swaps(&stuff->length, n); | ||
290 | +#else | ||
291 | + swaps(&stuff->length); | ||
292 | +#endif | ||
293 | REQUEST_SIZE_MATCH(xVncExtGetClientCutTextReq); | ||
294 | return ProcVncExtGetClientCutText(client); | ||
295 | } | ||
296 | @@ -842,12 +917,21 @@ | ||
297 | |||
298 | static int SProcVncExtSelectInput(ClientPtr client) | ||
299 | { | ||
300 | - register char n; | ||
301 | REQUEST(xVncExtSelectInputReq); | ||
302 | +#if XORG < 112 | ||
303 | + register char n; | ||
304 | swaps(&stuff->length, n); | ||
305 | +#else | ||
306 | + swaps(&stuff->length); | ||
307 | +#endif | ||
308 | REQUEST_SIZE_MATCH(xVncExtSelectInputReq); | ||
309 | +#if XORG < 112 | ||
310 | swapl(&stuff->window, n); | ||
311 | swapl(&stuff->mask, n); | ||
312 | +#else | ||
313 | + swapl(&stuff->window); | ||
314 | + swapl(&stuff->mask); | ||
315 | +#endif | ||
316 | return ProcVncExtSelectInput(client); | ||
317 | } | ||
318 | |||
319 | @@ -893,9 +977,14 @@ | ||
320 | rep.length = 0; | ||
321 | rep.sequenceNumber = client->sequence; | ||
322 | if (client->swapped) { | ||
323 | +#if XORG < 112 | ||
324 | int n; | ||
325 | swaps(&rep.sequenceNumber, n); | ||
326 | swapl(&rep.length, n); | ||
327 | +#else | ||
328 | + swaps(&rep.sequenceNumber); | ||
329 | + swapl(&rep.length); | ||
330 | +#endif | ||
331 | } | ||
332 | WriteToClient(client, sizeof(xVncExtConnectReply), (char *)&rep); | ||
333 | return (client->noClientException); | ||
334 | @@ -903,9 +992,13 @@ | ||
335 | |||
336 | static int SProcVncExtConnect(ClientPtr client) | ||
337 | { | ||
338 | - register char n; | ||
339 | REQUEST(xVncExtConnectReq); | ||
340 | +#if XORG < 112 | ||
341 | + register char n; | ||
342 | swaps(&stuff->length, n); | ||
343 | +#else | ||
344 | + swaps(&stuff->length); | ||
345 | +#endif | ||
346 | REQUEST_AT_LEAST_SIZE(xVncExtConnectReq); | ||
347 | return ProcVncExtConnect(client); | ||
348 | } | ||
349 | @@ -925,7 +1018,6 @@ | ||
350 | qcTimeout = 0; | ||
351 | |||
352 | xVncExtGetQueryConnectReply rep; | ||
353 | - int n; | ||
354 | rep.type = X_Reply; | ||
355 | rep.sequenceNumber = client->sequence; | ||
356 | rep.timeout = qcTimeout; | ||
357 | @@ -934,11 +1026,20 @@ | ||
358 | rep.opaqueId = (CARD32)(long)queryConnectId; | ||
359 | rep.length = (rep.userLen + rep.addrLen + 3) >> 2; | ||
360 | if (client->swapped) { | ||
361 | +#if XORG < 112 | ||
362 | + int n; | ||
363 | swaps(&rep.sequenceNumber, n); | ||
364 | swapl(&rep.userLen, n); | ||
365 | swapl(&rep.addrLen, n); | ||
366 | swapl(&rep.timeout, n); | ||
367 | swapl(&rep.opaqueId, n); | ||
368 | +#else | ||
369 | + swaps(&rep.sequenceNumber); | ||
370 | + swapl(&rep.userLen); | ||
371 | + swapl(&rep.addrLen); | ||
372 | + swapl(&rep.timeout); | ||
373 | + swapl(&rep.opaqueId); | ||
374 | +#endif | ||
375 | } | ||
376 | WriteToClient(client, sizeof(xVncExtGetQueryConnectReply), (char *)&rep); | ||
377 | if (qcTimeout) | ||
378 | @@ -950,9 +1051,13 @@ | ||
379 | |||
380 | static int SProcVncExtGetQueryConnect(ClientPtr client) | ||
381 | { | ||
382 | - register char n; | ||
383 | REQUEST(xVncExtGetQueryConnectReq); | ||
384 | +#if XORG < 112 | ||
385 | + register char n; | ||
386 | swaps(&stuff->length, n); | ||
387 | +#else | ||
388 | + swaps(&stuff->length); | ||
389 | +#endif | ||
390 | REQUEST_SIZE_MATCH(xVncExtGetQueryConnectReq); | ||
391 | return ProcVncExtGetQueryConnect(client); | ||
392 | } | ||
393 | @@ -977,10 +1082,15 @@ | ||
394 | |||
395 | static int SProcVncExtApproveConnect(ClientPtr client) | ||
396 | { | ||
397 | - register char n; | ||
398 | REQUEST(xVncExtApproveConnectReq); | ||
399 | +#if XORG < 112 | ||
400 | + register char n; | ||
401 | swaps(&stuff->length, n); | ||
402 | swapl(&stuff->opaqueId, n); | ||
403 | +#else | ||
404 | + swaps(&stuff->length); | ||
405 | + swapl(&stuff->opaqueId); | ||
406 | +#endif | ||
407 | REQUEST_SIZE_MATCH(xVncExtApproveConnectReq); | ||
408 | return ProcVncExtApproveConnect(client); | ||
409 | } | ||
410 | diff -ur tigervnc-1.2.0.orig/unix/xserver/hw/vnc/xf86vncModule.cc tigervnc-1.2.0/unix/xserver/hw/vnc/xf86vncModule.cc | ||
411 | --- tigervnc-1.2.0.orig/unix/xserver/hw/vnc/xf86vncModule.cc 2010-04-23 15:55:10.000000000 +0200 | ||
412 | +++ tigervnc-1.2.0/unix/xserver/hw/vnc/xf86vncModule.cc 2012-04-15 12:18:57.820557239 +0200 | ||
413 | @@ -26,6 +26,8 @@ | ||
414 | #include <rfb/Logger_stdio.h> | ||
415 | #include <rfb/LogWriter.h> | ||
416 | |||
417 | +#include "xorg-version.h" | ||
418 | + | ||
419 | extern "C" { | ||
420 | #define class c_class | ||
421 | #define private c_private | ||
422 | @@ -89,7 +91,12 @@ | ||
423 | ScrnInfoPtr pScrn = xf86Screens[scr]; | ||
424 | |||
425 | for (ParameterIterator i(Configuration::global()); i.param; i.next()) { | ||
426 | - char* val = xf86FindOptionValue(pScrn->options, i.param->getName()); | ||
427 | + const char *val; | ||
428 | +#if XORG < 112 | ||
429 | + val = xf86FindOptionValue(pScrn->options, i.param->getName()); | ||
430 | +#else | ||
431 | + val = xf86FindOptionValue((XF86OptionPtr)pScrn->options, i.param->getName()); | ||
432 | +#endif | ||
433 | if (val) | ||
434 | i.param->setParam(val); | ||
435 | } | ||
436 | diff -ur tigervnc-1.2.0.orig/unix/xserver/hw/vnc/xorg-version.h tigervnc-1.2.0/unix/xserver/hw/vnc/xorg-version.h | ||
437 | --- tigervnc-1.2.0.orig/unix/xserver/hw/vnc/xorg-version.h 2012-04-15 12:18:21.272014160 +0200 | ||
438 | +++ tigervnc-1.2.0/unix/xserver/hw/vnc/xorg-version.h 2012-04-15 12:18:57.821557227 +0200 | ||
439 | @@ -38,6 +38,8 @@ | ||
440 | #define XORG 110 | ||
441 | #elif XORG_VERSION_CURRENT < ((1 * 10000000) + (11 * 100000) + (99 * 1000)) | ||
442 | #define XORG 111 | ||
443 | +#elif XORG_VERSION_CURRENT < ((1 * 10000000) + (12 * 100000) + (99 * 1000)) | ||
444 | +#define XORG 112 | ||
445 | #else | ||
446 | #error "X.Org newer than 1.10 is not supported" | ||
447 | #endif |