Magellan Linux

Contents of /trunk/tigervnc/patches/tigervnc-1.2.0-xserver113.patch

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2079 - (show annotations) (download)
Mon Feb 18 15:20:23 2013 UTC (11 years, 2 months ago) by niro
File size: 7785 byte(s)
-added patches for tigervnc-1.2.0
1 diff -ur tigervnc-1.2.0.orig/unix/xserver/hw/vnc/vncHooks.cc tigervnc-1.2.0/unix/xserver/hw/vnc/vncHooks.cc
2 --- tigervnc-1.2.0.orig/unix/xserver/hw/vnc/vncHooks.cc 2012-01-23 16:54:11.000000000 +0100
3 +++ tigervnc-1.2.0/unix/xserver/hw/vnc/vncHooks.cc 2012-09-06 18:53:26.392282102 +0200
4 @@ -116,7 +116,11 @@
5
6 // screen functions
7
8 +#if XORG < 112
9 static Bool vncHooksCloseScreen(int i, ScreenPtr pScreen);
10 +#else
11 +static Bool vncHooksCloseScreen(ScreenPtr pScreen);
12 +#endif
13 static Bool vncHooksCreateGC(GCPtr pGC);
14 static void vncHooksCopyWindow(WindowPtr pWin, DDXPointRec ptOldOrg,
15 RegionPtr pOldRegion);
16 @@ -133,8 +137,13 @@
17 DeviceIntPtr pDev,
18 #endif
19 ScreenPtr pScreen, CursorPtr cursor);
20 +#if XORG < 112
21 static void vncHooksBlockHandler(int i, pointer blockData, pointer pTimeout,
22 pointer pReadmask);
23 +#else
24 +static void vncHooksBlockHandler(ScreenPtr pScreen, pointer pTimeout,
25 + pointer pReadmask);
26 +#endif
27 #ifdef RENDER
28 static void vncHooksComposite(CARD8 op, PicturePtr pSrc, PicturePtr pMask,
29 PicturePtr pDst, INT16 xSrc, INT16 ySrc, INT16 xMask,
30 @@ -335,7 +344,11 @@
31 // CloseScreen - unwrap the screen functions and call the original CloseScreen
32 // function
33
34 +#if XORG < 112
35 static Bool vncHooksCloseScreen(int i, ScreenPtr pScreen_)
36 +#else
37 +static Bool vncHooksCloseScreen(ScreenPtr pScreen_)
38 +#endif
39 {
40 SCREEN_UNWRAP(pScreen_, CloseScreen);
41
42 @@ -366,7 +379,11 @@
43
44 DBGPRINT((stderr,"vncHooksCloseScreen: unwrapped screen functions\n"));
45
46 +#if XORG < 112
47 return (*pScreen->CloseScreen)(i, pScreen);
48 +#else
49 + return (*pScreen->CloseScreen)(pScreen);
50 +#endif
51 }
52
53 // CreateGC - wrap the "GC funcs"
54 @@ -531,14 +548,27 @@
55 // BlockHandler - ignore any changes during the block handler - it's likely
56 // these are just drawing the cursor.
57
58 +#if XORG < 112
59 static void vncHooksBlockHandler(int i, pointer blockData, pointer pTimeout,
60 pointer pReadmask)
61 +#else
62 +static void vncHooksBlockHandler(ScreenPtr pScreen_, pointer pTimeout,
63 + pointer pReadmask)
64 +#endif
65 {
66 +#if XORG < 112
67 SCREEN_UNWRAP(screenInfo.screens[i], BlockHandler);
68 +#else
69 + SCREEN_UNWRAP(pScreen_, BlockHandler);
70 +#endif
71
72 vncHooksScreen->desktop->ignoreHooks(true);
73
74 +#if XORG < 112
75 (*pScreen->BlockHandler) (i, blockData, pTimeout, pReadmask);
76 +#else
77 + (*pScreen->BlockHandler) (pScreen, pTimeout, pReadmask);
78 +#endif
79
80 vncHooksScreen->desktop->ignoreHooks(false);
81
82 diff -ur tigervnc-1.2.0.orig/unix/xserver/hw/vnc/xf86vncModule.cc tigervnc-1.2.0/unix/xserver/hw/vnc/xf86vncModule.cc
83 --- tigervnc-1.2.0.orig/unix/xserver/hw/vnc/xf86vncModule.cc 2012-09-06 18:52:54.668284962 +0200
84 +++ tigervnc-1.2.0/unix/xserver/hw/vnc/xf86vncModule.cc 2012-09-06 18:53:26.393282091 +0200
85 @@ -53,8 +53,10 @@
86 {
87 vncExtensionInitWithParams,
88 "VNC",
89 +#if XORG < 112
90 NULL,
91 NULL,
92 +#endif
93 NULL
94 };
95
96 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
97 --- tigervnc-1.2.0.orig/unix/xserver/hw/vnc/xorg-version.h 2012-09-06 18:52:54.669284923 +0200
98 +++ tigervnc-1.2.0/unix/xserver/hw/vnc/xorg-version.h 2012-09-06 18:53:26.393282091 +0200
99 @@ -40,8 +40,10 @@
100 #define XORG 111
101 #elif XORG_VERSION_CURRENT < ((1 * 10000000) + (12 * 100000) + (99 * 1000))
102 #define XORG 112
103 +#elif XORG_VERSION_CURRENT < ((1 * 10000000) + (13 * 100000) + (99 * 1000))
104 +#define XORG 113
105 #else
106 -#error "X.Org newer than 1.10 is not supported"
107 +#error "X.Org newer than 1.13 is not supported"
108 #endif
109
110 #endif
111 diff -ur tigervnc-1.2.0.orig/unix/xserver/hw/vnc/xvnc.cc tigervnc-1.2.0/unix/xserver/hw/vnc/xvnc.cc
112 --- tigervnc-1.2.0.orig/unix/xserver/hw/vnc/xvnc.cc 2012-09-06 18:52:51.896283812 +0200
113 +++ tigervnc-1.2.0/unix/xserver/hw/vnc/xvnc.cc 2012-09-06 18:59:25.784263082 +0200
114 @@ -285,7 +285,11 @@
115 }
116
117 void
118 +#if XORG < 113
119 OsVendorFatalError()
120 +#else
121 +OsVendorFatalError(const char *f, va_list args)
122 +#endif
123 {
124 }
125
126 @@ -626,14 +630,25 @@
127 }
128 #endif
129
130 +#if XORG < 113
131 static ColormapPtr InstalledMaps[MAXSCREENS];
132 +#else
133 +static DevPrivateKeyRec cmapScrPrivateKeyRec;
134 +#define cmapScrPrivateKey (&cmapScrPrivateKeyRec)
135 +#define GetInstalledColormap(s) ((ColormapPtr) dixLookupPrivate(&(s)->devPrivates, cmapScrPrivateKey))
136 +#define SetInstalledColormap(s,c) (dixSetPrivate(&(s)->devPrivates, cmapScrPrivateKey, c))
137 +#endif
138
139 static int
140 vfbListInstalledColormaps(ScreenPtr pScreen, Colormap *pmaps)
141 {
142 /* By the time we are processing requests, we can guarantee that there
143 * is always a colormap installed */
144 +#if XORG < 113
145 *pmaps = InstalledMaps[pScreen->myNum]->mid;
146 +#else
147 + *pmaps = GetInstalledColormap(pScreen)->mid;
148 +#endif
149 return (1);
150 }
151
152 @@ -641,8 +656,16 @@
153 static void
154 vfbInstallColormap(ColormapPtr pmap)
155 {
156 +#if XORG < 113
157 int index = pmap->pScreen->myNum;
158 - ColormapPtr oldpmap = InstalledMaps[index];
159 +#endif
160 + ColormapPtr oldpmap;
161 +
162 +#if XORG < 113
163 + oldpmap = InstalledMaps[index];
164 +#else
165 + oldpmap = GetInstalledColormap(pmap->pScreen);
166 +#endif
167
168 if (pmap != oldpmap)
169 {
170 @@ -656,7 +679,11 @@
171 if(oldpmap != (ColormapPtr)None)
172 WalkTree(pmap->pScreen, TellLostMap, (char *)&oldpmap->mid);
173 /* Install pmap */
174 +#if XORG < 113
175 InstalledMaps[index] = pmap;
176 +#else
177 + SetInstalledColormap(pmap->pScreen, pmap);
178 +#endif
179 WalkTree(pmap->pScreen, TellGainedMap, (char *)&pmap->mid);
180
181 entries = pmap->pVisual->ColormapEntries;
182 @@ -692,7 +719,11 @@
183 static void
184 vfbUninstallColormap(ColormapPtr pmap)
185 {
186 +#if XORG < 113
187 ColormapPtr curpmap = InstalledMaps[pmap->pScreen->myNum];
188 +#else
189 + ColormapPtr curpmap = GetInstalledColormap(pmap->pScreen);
190 +#endif
191
192 if(pmap == curpmap)
193 {
194 @@ -1153,31 +1184,66 @@
195 #endif
196
197 static Bool
198 +#if XORG < 113
199 vfbCloseScreen(int index, ScreenPtr pScreen)
200 +#else
201 +vfbCloseScreen(ScreenPtr pScreen)
202 +#endif
203 {
204 +#if XORG < 113
205 vfbScreenInfoPtr pvfb = &vfbScreens[index];
206 +#else
207 + vfbScreenInfoPtr pvfb = &vfbScreens[pScreen->myNum];
208 +#endif
209 int i;
210
211 pScreen->CloseScreen = pvfb->closeScreen;
212
213 /*
214 * XXX probably lots of stuff to clean. For now,
215 - * clear InstalledMaps[] so that server reset works correctly.
216 + * clear installed colormaps so that server reset works correctly.
217 */
218 +#if XORG < 113
219 for (i = 0; i < MAXSCREENS; i++)
220 InstalledMaps[i] = NULL;
221
222 return pScreen->CloseScreen(index, pScreen);
223 +#else
224 + for (i = 0; i < screenInfo.numScreens; i++)
225 + SetInstalledColormap(screenInfo.screens[i], NULL);
226 +
227 + /*
228 + * fb overwrites miCloseScreen, so do this here
229 + */
230 + if (pScreen->devPrivate)
231 + (*pScreen->DestroyPixmap) ((PixmapPtr) pScreen->devPrivate);
232 + pScreen->devPrivate = NULL;
233 +
234 + return pScreen->CloseScreen(pScreen);
235 +#endif
236 }
237
238 static Bool
239 +#if XORG < 113
240 vfbScreenInit(int index, ScreenPtr pScreen, int argc, char **argv)
241 +#else
242 +vfbScreenInit(ScreenPtr pScreen, int argc, char **argv)
243 +#endif
244 {
245 +#if XORG < 113
246 vfbScreenInfoPtr pvfb = &vfbScreens[index];
247 +#else
248 + vfbScreenInfoPtr pvfb = &vfbScreens[pScreen->myNum];
249 +#endif
250 int dpi;
251 int ret;
252 void *pbits;
253
254 +#if XORG >= 113
255 + if (!dixRegisterPrivateKey(&cmapScrPrivateKeyRec, PRIVATE_SCREEN, 0))
256 + return FALSE;
257 +#endif
258 +
259 /* 96 is the default used by most other systems */
260 dpi = 96;
261 if (monitorResolution)
262 @@ -1185,8 +1251,13 @@
263
264 pbits = vfbAllocateFramebufferMemory(&pvfb->fb);
265 if (!pbits) return FALSE;
266 +#if XORG < 113
267 vncFbptr[index] = pbits;
268 vncFbstride[index] = pvfb->fb.paddedWidth;
269 +#else
270 + vncFbptr[pScreen->myNum] = pbits;
271 + vncFbstride[pScreen->myNum] = pvfb->fb.paddedWidth;
272 +#endif
273
274 miSetPixmapDepths();