1
0
xorg-x11-server/xorg-server-xf4vnc-fixes_1_9.diff

613 lines
25 KiB
Diff
Raw Normal View History

Index: xorg-server-1.9.3/hw/vnc/rfb.h
===================================================================
--- xorg-server-1.9.3.orig/hw/vnc/rfb.h
+++ xorg-server-1.9.3/hw/vnc/rfb.h
@@ -189,8 +189,8 @@ typedef struct
CloseScreenProcPtr CloseScreen;
CreateGCProcPtr CreateGC;
- PaintWindowBackgroundProcPtr PaintWindowBackground;
- PaintWindowBorderProcPtr PaintWindowBorder;
+// PaintWindowBackgroundProcPtr PaintWindowBackground;
+// PaintWindowBorderProcPtr PaintWindowBorder;
CopyWindowProcPtr CopyWindow;
ClearToBackgroundProcPtr ClearToBackground;
RestoreAreasProcPtr RestoreAreas;
Index: xorg-server-1.9.3/hw/vnc/draw.c
===================================================================
--- xorg-server-1.9.3.orig/hw/vnc/draw.c
+++ xorg-server-1.9.3/hw/vnc/draw.c
@@ -61,6 +61,10 @@ in this Software without prior written a
int rfbDeferUpdateTime = 40; /* ms */
+extern DevPrivateKeyRec rfbGCKeyRec;
+#define rfbGCKey (&rfbGCKeyRec)
+
+
/****************************************************************************/
/*
@@ -217,8 +221,8 @@ rfbCloseScreen (int i, ScreenPtr pScreen
pScreen->CloseScreen = pVNC->CloseScreen;
pScreen->CreateGC = pVNC->CreateGC;
- pScreen->PaintWindowBackground = pVNC->PaintWindowBackground;
- pScreen->PaintWindowBorder = pVNC->PaintWindowBorder;
+// pScreen->PaintWindowBackground = pVNC->PaintWindowBackground;
+// pScreen->PaintWindowBorder = pVNC->PaintWindowBorder;
pScreen->CopyWindow = pVNC->CopyWindow;
pScreen->ClearToBackground = pVNC->ClearToBackground;
pScreen->RestoreAreas = pVNC->RestoreAreas;
@@ -252,7 +256,7 @@ rfbEnableDisableFBAccess (int index, Boo
* control even when switched away.
*/
if (!enable) {
- WindowPtr pWin = WindowTable[index];
+ WindowPtr pWin = pScrn->pScreen->root;
ScreenPtr pScreen = pWin->drawable.pScreen;
GCPtr pGC;
xRectangle rect;
@@ -268,7 +272,7 @@ rfbEnableDisableFBAccess (int index, Boo
CARD32 attributes[2];
attributes[0] = pScreen->whitePixel;
attributes[1] = pScreen->blackPixel;
- (void)ChangeGC(pGC, GCForeground | GCBackground, attributes);
+ (void)ChangeGC(NullClient, pGC, GCForeground | GCBackground, attributes);
ValidateGC((DrawablePtr)pWin, pGC);
@@ -317,6 +321,7 @@ rfbCreateGC (GCPtr pGC)
return ret;
}
+#if 0
/*
* PaintWindowBackground - the region being modified is just the given region.
*/
@@ -356,6 +361,7 @@ rfbPaintWindowBorder (WindowPtr pWin, Re
SCREEN_EPILOGUE(PaintWindowBorder,rfbPaintWindowBorder);
}
+#endif
#ifdef CHROMIUM
Bool
Index: xorg-server-1.9.3/hw/vnc/init.c
===================================================================
--- xorg-server-1.9.3.orig/hw/vnc/init.c
+++ xorg-server-1.9.3/hw/vnc/init.c
@@ -670,8 +670,8 @@ rfbScreenInit(index, pScreen, argc, argv
prfb->CloseScreen = pScreen->CloseScreen;
prfb->WakeupHandler = pScreen->WakeupHandler;
prfb->CreateGC = pScreen->CreateGC;
- prfb->PaintWindowBackground = pScreen->PaintWindowBackground;
- prfb->PaintWindowBorder = pScreen->PaintWindowBorder;
+// prfb->PaintWindowBackground = pScreen->PaintWindowBackground;
+// prfb->PaintWindowBorder = pScreen->PaintWindowBorder;
prfb->CopyWindow = pScreen->CopyWindow;
prfb->ClearToBackground = pScreen->ClearToBackground;
prfb->RestoreAreas = pScreen->RestoreAreas;
@@ -691,8 +691,8 @@ rfbScreenInit(index, pScreen, argc, argv
pScreen->CloseScreen = rfbCloseScreen;
pScreen->WakeupHandler = rfbWakeupHandler;
pScreen->CreateGC = rfbCreateGC;
- pScreen->PaintWindowBackground = rfbPaintWindowBackground;
- pScreen->PaintWindowBorder = rfbPaintWindowBorder;
+// pScreen->PaintWindowBackground = rfbPaintWindowBackground;
+// pScreen->PaintWindowBorder = rfbPaintWindowBorder;
pScreen->CopyWindow = rfbCopyWindow;
pScreen->ClearToBackground = rfbClearToBackground;
pScreen->RestoreAreas = rfbRestoreAreas;
Index: xorg-server-1.9.3/hw/vnc/sprite.c
===================================================================
--- xorg-server-1.9.3.orig/hw/vnc/sprite.c
+++ xorg-server-1.9.3/hw/vnc/sprite.c
@@ -96,8 +96,10 @@ static void rfbSpriteInstallColormap
static void rfbSpriteStoreColors(ColormapPtr pMap, int ndef,
xColorItem *pdef);
+#if 0
static void rfbSpritePaintWindowBackground(WindowPtr pWin,
RegionPtr pRegion, int what);
+#endif
static void rfbSpritePaintWindowBorder(WindowPtr pWin,
RegionPtr pRegion, int what);
static void rfbSpriteCopyWindow(WindowPtr pWin, DDXPointRec ptOldOrg,
@@ -112,8 +114,9 @@ static void rfbSpriteSaveDoomedAreas
static RegionPtr rfbSpriteRestoreAreas(WindowPtr pWin, RegionPtr pRgnExposed);
static void rfbSpriteComputeSaved(ScreenPtr pScreen);
-static int rfbSpriteScreenKeyStore;
-static DevPrivateKey rfbSpriteScreenKey = &rfbSpriteScreenKeyStore;
+static DevPrivateKeyRec rfbSpriteScreenKeyRec;
+#define rfbSpriteScreenKey (&rfbSpriteScreenKeyRec)
+
#define SCREEN_PROLOGUE(pScreen, field) ((pScreen)->field = \
((rfbSpriteScreenPtr)dixLookupPrivate(&(pScreen)->devPrivates, \
@@ -145,8 +148,8 @@ static GCFuncs rfbSpriteGCFuncs = {
rfbSpriteCopyClip,
};
-static int rfbSpriteGCKeyStore;
-static DevPrivateKey rfbSpriteGCKey = &rfbSpriteGCKeyStore;
+static DevPrivateKeyRec rfbSpriteGCKeyRec;
+#define rfbSpriteGCKey (&rfbSpriteGCKeyRec)
#define GC_FUNC_PROLOGUE(pGC) \
rfbSpriteGCPtr pGCPriv = \
@@ -329,7 +332,10 @@ rfbSpriteInitialize (pScreen, cursorFunc
rfbSpriteScreenPtr pPriv;
VisualPtr pVisual;
- if (!dixRequestPrivate(rfbSpriteGCKey, sizeof(rfbSpriteGCRec)))
+ if (!dixRegisterPrivateKey(rfbSpriteScreenKey, PRIVATE_SCREEN, 0))
+ return FALSE;
+
+ if (!dixRegisterPrivateKey(rfbSpriteGCKey, PRIVATE_GC, sizeof(rfbSpriteGCRec)))
return FALSE;
pPriv = (rfbSpriteScreenPtr) xalloc (sizeof (rfbSpriteScreenRec));
@@ -357,8 +363,8 @@ rfbSpriteInitialize (pScreen, cursorFunc
pPriv->StoreColors = pScreen->StoreColors;
pPriv->DisplayCursor = pScreen->DisplayCursor;
- pPriv->PaintWindowBackground = pScreen->PaintWindowBackground;
- pPriv->PaintWindowBorder = pScreen->PaintWindowBorder;
+// pPriv->PaintWindowBackground = pScreen->PaintWindowBackground;
+// pPriv->PaintWindowBorder = pScreen->PaintWindowBorder;
pPriv->CopyWindow = pScreen->CopyWindow;
pPriv->ClearToBackground = pScreen->ClearToBackground;
@@ -393,8 +399,8 @@ rfbSpriteInitialize (pScreen, cursorFunc
pScreen->InstallColormap = rfbSpriteInstallColormap;
pScreen->StoreColors = rfbSpriteStoreColors;
- pScreen->PaintWindowBackground = rfbSpritePaintWindowBackground;
- pScreen->PaintWindowBorder = rfbSpritePaintWindowBorder;
+// pScreen->PaintWindowBackground = rfbSpritePaintWindowBackground;
+// pScreen->PaintWindowBorder = rfbSpritePaintWindowBorder;
pScreen->CopyWindow = rfbSpriteCopyWindow;
pScreen->ClearToBackground = rfbSpriteClearToBackground;
@@ -435,8 +441,8 @@ rfbSpriteCloseScreen (i, pScreen)
pScreen->InstallColormap = pScreenPriv->InstallColormap;
pScreen->StoreColors = pScreenPriv->StoreColors;
- pScreen->PaintWindowBackground = pScreenPriv->PaintWindowBackground;
- pScreen->PaintWindowBorder = pScreenPriv->PaintWindowBorder;
+// pScreen->PaintWindowBackground = pScreenPriv->PaintWindowBackground;
+// pScreen->PaintWindowBorder = pScreenPriv->PaintWindowBorder;
pScreen->CopyWindow = pScreenPriv->CopyWindow;
pScreen->ClearToBackground = pScreenPriv->ClearToBackground;
@@ -809,6 +815,7 @@ rfbSpriteRestoreAreas (pWin, prgnExposed
* Window wrappers
*/
+#if 0
static void
rfbSpritePaintWindowBackground (pWin, pRegion, what)
WindowPtr pWin;
@@ -866,6 +873,7 @@ rfbSpritePaintWindowBorder (pWin, pRegio
SCREEN_EPILOGUE (pScreen, PaintWindowBorder, rfbSpritePaintWindowBorder);
}
+#endif
static void
rfbSpriteCopyWindow (pWin, ptOldOrg, pRegion)
Index: xorg-server-1.9.3/hw/vnc/spritest.h
===================================================================
--- xorg-server-1.9.3.orig/hw/vnc/spritest.h
+++ xorg-server-1.9.3/hw/vnc/spritest.h
@@ -70,8 +70,8 @@ typedef struct {
ScreenBlockHandlerProcPtr BlockHandler;
InstallColormapProcPtr InstallColormap;
StoreColorsProcPtr StoreColors;
- PaintWindowBackgroundProcPtr PaintWindowBackground;
- PaintWindowBorderProcPtr PaintWindowBorder;
+// PaintWindowBackgroundProcPtr PaintWindowBackground;
+// PaintWindowBorderProcPtr PaintWindowBorder;
CopyWindowProcPtr CopyWindow;
ClearToBackgroundProcPtr ClearToBackground;
SaveDoomedAreasProcPtr SaveDoomedAreas;
Index: xorg-server-1.9.3/hw/vnc/cutpaste.c
===================================================================
--- xorg-server-1.9.3.orig/hw/vnc/cutpaste.c
+++ xorg-server-1.9.3/hw/vnc/cutpaste.c
@@ -54,7 +54,7 @@ rfbSetXCutText(char *str, int len)
Selection *pSel;
inSetXCutText = TRUE;
- ChangeWindowProperty(WindowTable[0], XA_CUT_BUFFER0, XA_STRING,
+ ChangeWindowProperty(screenInfo.screens[0]->root, XA_CUT_BUFFER0, XA_STRING,
8, PropModeReplace, len,
(pointer)str, TRUE);
Index: xorg-server-1.9.3/hw/vnc/dispcur.c
===================================================================
--- xorg-server-1.9.3.orig/hw/vnc/dispcur.c
+++ xorg-server-1.9.3/hw/vnc/dispcur.c
@@ -74,10 +74,10 @@ in this Software without prior written a
/* per-screen private data */
-static int rfbDCScreenKeyStore;
-static DevPrivateKey rfbDCScreenKey = &rfbDCScreenKeyStore;
-static int rfbScreenKeyStore;
-static DevPrivateKey rfbScreenKey = &rfbScreenKeyStore;
+static DevPrivateKeyRec rfbDCScreenKeyRec;
+#define rfbDCScreenKey (&rfbDCScreenKeyRec)
+static DevPrivateKeyRec rfbScreenKeyRec;
+#define rfbScreenKey (&rfbScreenKeyRec)
static Bool rfbDCCloseScreen(int index, ScreenPtr pScreen);
@@ -137,6 +137,12 @@ rfbDCInitialize (ScreenPtr pScreen, miPo
{
rfbDCScreenPtr pScreenPriv;
+ if (!dixRegisterPrivateKey(rfbDCScreenKey, PRIVATE_SCREEN, 0))
+ return FALSE;
+
+ if (!dixRegisterPrivateKey(rfbScreenKey, PRIVATE_CURSOR_BITS, 0))
+ return FALSE;
+
pScreenPriv = (rfbDCScreenPtr) xalloc (sizeof (rfbDCScreenRec));
if (!pScreenPriv)
return FALSE;
@@ -340,7 +346,7 @@ rfbDCRealize (ScreenPtr pScreen, CursorP
0, 0, pCursor->bits->width, pCursor->bits->height,
0, XYPixmap, (char *)pCursor->bits->source);
gcvals[0] = GXand;
- ChangeGC (pGC, GCFunction, gcvals);
+ ChangeGCXIDs (NullClient, pGC, GCFunction, gcvals);
ValidateGC ((DrawablePtr)pPriv->sourceBits, pGC);
(*pGC->ops->PutImage) ((DrawablePtr)pPriv->sourceBits, pGC, 1,
0, 0, pCursor->bits->width, pCursor->bits->height,
@@ -348,13 +354,13 @@ rfbDCRealize (ScreenPtr pScreen, CursorP
/* mask bits -- pCursor->mask & ~pCursor->source */
gcvals[0] = GXcopy;
- ChangeGC (pGC, GCFunction, gcvals);
+ ChangeGCXIDs (NullClient, pGC, GCFunction, gcvals);
ValidateGC ((DrawablePtr)pPriv->maskBits, pGC);
(*pGC->ops->PutImage) ((DrawablePtr)pPriv->maskBits, pGC, 1,
0, 0, pCursor->bits->width, pCursor->bits->height,
0, XYPixmap, (char *)pCursor->bits->mask);
gcvals[0] = GXandInverted;
- ChangeGC (pGC, GCFunction, gcvals);
+ ChangeGCXIDs (NullClient, pGC, GCFunction, gcvals);
ValidateGC ((DrawablePtr)pPriv->maskBits, pGC);
(*pGC->ops->PutImage) ((DrawablePtr)pPriv->maskBits, pGC, 1,
0, 0, pCursor->bits->width, pCursor->bits->height,
@@ -396,7 +402,7 @@ rfbDCPutBits (DrawablePtr pDrawable, rfb
if (sourceGC->fgPixel != source)
{
gcvals[0] = source;
- DoChangeGC (sourceGC, GCForeground, gcvals, 0);
+ ChangeGCXIDs (NullClient, sourceGC, GCForeground, gcvals);
}
if (sourceGC->serialNumber != pDrawable->serialNumber)
ValidateGC (pDrawable, sourceGC);
@@ -404,7 +410,7 @@ rfbDCPutBits (DrawablePtr pDrawable, rfb
if (maskGC->fgPixel != mask)
{
gcvals[0] = mask;
- DoChangeGC (maskGC, GCForeground, gcvals, 0);
+ ChangeGCXIDs (NullClient, maskGC, GCForeground, gcvals);
}
if (maskGC->serialNumber != pDrawable->serialNumber)
ValidateGC (pDrawable, maskGC);
@@ -451,7 +457,7 @@ rfbDCPutUpCursor (pScreen, pCursor, x, y
}
pScreenPriv = (rfbDCScreenPtr)dixLookupPrivate(&pScreen->devPrivates,
rfbDCScreenKey);
- pWin = WindowTable[pScreen->myNum];
+ pWin = pScreen->root;
#ifdef ARGB_CURSOR
if (pPriv->pPicture)
{
@@ -498,7 +504,7 @@ rfbDCSaveUnderCursor (pScreen, x, y, w,
pScreenPriv = (rfbDCScreenPtr)dixLookupPrivate(&pScreen->devPrivates,
rfbDCScreenKey);
pSave = pScreenPriv->pSave;
- pWin = WindowTable[pScreen->myNum];
+ pWin = pScreen->root;
if (!pSave || pSave->drawable.width < w || pSave->drawable.height < h)
{
if (pSave)
@@ -531,7 +537,7 @@ rfbDCRestoreUnderCursor (pScreen, x, y,
pScreenPriv = (rfbDCScreenPtr)dixLookupPrivate(&pScreen->devPrivates,
rfbDCScreenKey);
pSave = pScreenPriv->pSave;
- pWin = WindowTable[pScreen->myNum];
+ pWin = pScreen->root;
if (!pSave)
return FALSE;
if (!EnsureGC(pScreenPriv->pRestoreGC, pWin))
@@ -558,7 +564,7 @@ rfbDCChangeSave (pScreen, x, y, w, h, dx
pScreenPriv = (rfbDCScreenPtr)dixLookupPrivate(&pScreen->devPrivates,
rfbDCScreenKey);
pSave = pScreenPriv->pSave;
- pWin = WindowTable[pScreen->myNum];
+ pWin = pScreen->root;
/*
* restore the bits which are about to get trashed
*/
@@ -702,7 +708,7 @@ rfbDCMoveCursor (pScreen, pCursor, x, y,
}
pScreenPriv = (rfbDCScreenPtr)dixLookupPrivate(&pScreen->devPrivates,
rfbDCScreenKey);
- pWin = WindowTable[pScreen->myNum];
+ pWin = pScreen->root;
pTemp = pScreenPriv->pTemp;
if (!pTemp ||
pTemp->drawable.width != pScreenPriv->pSave->drawable.width ||
Index: xorg-server-1.9.3/hw/vnc/kbdptr.c
===================================================================
--- xorg-server-1.9.3.orig/hw/vnc/kbdptr.c
+++ xorg-server-1.9.3/hw/vnc/kbdptr.c
@@ -153,7 +153,7 @@ KbdAddEvent(Bool down, KeySym keySym, rf
#ifdef CORBA
if (cl) {
CARD32 clientId = cl->sock;
- ChangeWindowProperty(WindowTable[0], VNC_LAST_CLIENT_ID, XA_INTEGER,
+ ChangeWindowProperty(screenInfo.screens[0]->root, VNC_LAST_CLIENT_ID, XA_INTEGER,
32, PropModeReplace, 1, (pointer)&clientId, TRUE);
}
#endif
@@ -310,7 +310,7 @@ PtrAddEvent(int buttonMask, int x, int y
#ifdef CORBA
if (cl) {
CARD32 clientId = cl->sock;
- ChangeWindowProperty(WindowTable[0], VNC_LAST_CLIENT_ID, XA_INTEGER,
+ ChangeWindowProperty(screenInfo.screens[0]->root, VNC_LAST_CLIENT_ID, XA_INTEGER,
32, PropModeReplace, 1, (pointer)&clientId, TRUE);
}
#endif
Index: xorg-server-1.9.3/hw/vnc/rfbserver.c
===================================================================
--- xorg-server-1.9.3.orig/hw/vnc/rfbserver.c
+++ xorg-server-1.9.3/hw/vnc/rfbserver.c
@@ -82,7 +82,7 @@ void
rfbRootPropertyChange(ScreenPtr pScreen)
{
PropertyPtr pProp;
- WindowPtr pWin = WindowTable[pScreen->myNum];
+ WindowPtr pWin = pScreen->root;
pProp = wUserProps (pWin);
@@ -1068,7 +1068,7 @@ rfbProcessClientNormalMessage(cl)
GenerateVncChromiumConnectedEvent(cl->sock);
if (enc == rfbEncodingChromium) {
/* Generate exposures for all windows */
- WindowPtr pWin = WindowTable[cl->pScreen->myNum];
+ WindowPtr pWin = cl->pScreen->root;
rfbSetClip(pWin, 1);
}
else {
@@ -1866,13 +1866,13 @@ rfbSendSetColourMapEntries(cl, firstColo
/* PseudoColor */
#if XFREE86VNC
- if (miInstalledMaps[cl->pScreen->myNum]->class == PseudoColor) {
+ if (GetInstalledmiColormap(cl->pScreen)->class == PseudoColor) {
#else
if (pVNC->rfbInstalledColormap->class == PseudoColor) {
#endif
scme->firstColour = Swap16IfLE(firstColour);
#if XFREE86VNC
- pent = (EntryPtr)&miInstalledMaps[cl->pScreen->myNum]->red[firstColour];
+ pent = (EntryPtr)&GetInstalledmiColormap(cl->pScreen)->red[firstColour];
#else
pent = (EntryPtr)&pVNC->rfbInstalledColormap->red[firstColour];
#endif
@@ -1894,12 +1894,12 @@ rfbSendSetColourMapEntries(cl, firstColo
/* Break the DirectColor pixel into its r/g/b components */
#if XFREE86VNC
- redPart = (firstColour & miInstalledMaps[cl->pScreen->myNum]->pVisual->redMask)
- >> miInstalledMaps[cl->pScreen->myNum]->pVisual->offsetRed;
- greenPart = (firstColour & miInstalledMaps[cl->pScreen->myNum]->pVisual->greenMask)
- >> miInstalledMaps[cl->pScreen->myNum]->pVisual->offsetGreen;
- bluePart = (firstColour & miInstalledMaps[cl->pScreen->myNum]->pVisual->blueMask)
- >> miInstalledMaps[cl->pScreen->myNum]->pVisual->offsetBlue;
+ redPart = (firstColour & GetInstalledmiColormap(cl->pScreen)->pVisual->redMask)
+ >> GetInstalledmiColormap(cl->pScreen)->pVisual->offsetRed;
+ greenPart = (firstColour & GetInstalledmiColormap(cl->pScreen)->pVisual->greenMask)
+ >> GetInstalledmiColormap(cl->pScreen)->pVisual->offsetGreen;
+ bluePart = (firstColour & GetInstalledmiColormap(cl->pScreen)->pVisual->blueMask)
+ >> GetInstalledmiColormap(cl->pScreen)->pVisual->offsetBlue;
#else
redPart = (firstColour & pVNC->rfbInstalledColormap->pVisual->redMask)
>> pVNC->rfbInstalledColormap->pVisual->offsetRed;
@@ -1918,9 +1918,9 @@ rfbSendSetColourMapEntries(cl, firstColo
scme->firstColour = Swap16IfLE((greenPart << 8) | bluePart);
#if XFREE86VNC
- redEntry = (EntryPtr)&miInstalledMaps[cl->pScreen->myNum]->red[redPart];
- greenEntry = (EntryPtr)&miInstalledMaps[cl->pScreen->myNum]->green[greenPart];
- blueEntry = (EntryPtr)&miInstalledMaps[cl->pScreen->myNum]->blue[bluePart];
+ redEntry = (EntryPtr)&GetInstalledmiColormap(cl->pScreen)->red[redPart];
+ greenEntry = (EntryPtr)&GetInstalledmiColormap(cl->pScreen)->green[greenPart];
+ blueEntry = (EntryPtr)&GetInstalledmiColormap(cl->pScreen)->blue[bluePart];
#else
redEntry = (EntryPtr)&pVNC->rfbInstalledColormap->red[redPart];
greenEntry = (EntryPtr)&pVNC->rfbInstalledColormap->green[greenPart];
Index: xorg-server-1.9.3/hw/vnc/tabletranstemplate.c
===================================================================
--- xorg-server-1.9.3.orig/hw/vnc/tabletranstemplate.c
+++ xorg-server-1.9.3/hw/vnc/tabletranstemplate.c
@@ -67,7 +67,7 @@ rfbTranslateWithSingleTableINtoOUT (Scre
OUT_T *op = (OUT_T *)optr;
OUT_T *opLineEnd;
OUT_T *t = (OUT_T *)table;
- DrawablePtr pDraw = (DrawablePtr)WindowTable[pScreen->myNum];
+ DrawablePtr pDraw = (DrawablePtr)pScreen->root;
int truewidth = PixmapBytePad(width, in->bitsPerPixel);
unsigned char *iptr = malloc(truewidth * height * in->bitsPerPixel / 8);
int ipextra = truewidth - width;
@@ -107,7 +107,7 @@ rfbTranslateWithRGBTablesINtoOUT (Screen
OUT_T *redTable = (OUT_T *)table;
OUT_T *greenTable = redTable + in->redMax + 1;
OUT_T *blueTable = greenTable + in->greenMax + 1;
- DrawablePtr pDraw = (DrawablePtr)WindowTable[pScreen->myNum];
+ DrawablePtr pDraw = (DrawablePtr)pScreen->root;
int truewidth = PixmapBytePad(width, in->bitsPerPixel);
unsigned char *iptr = malloc(truewidth * height * in->bitsPerPixel / 8);
int ipextra = truewidth - width;
Index: xorg-server-1.9.3/hw/vnc/translate.c
===================================================================
--- xorg-server-1.9.3.orig/hw/vnc/translate.c
+++ xorg-server-1.9.3/hw/vnc/translate.c
@@ -167,7 +167,7 @@ rfbTranslateNone(ScreenPtr pScreen, char
int width, int height, int x, int y)
{
VNCSCREENPTR(pScreen);
- DrawablePtr pDraw = (DrawablePtr)WindowTable[pScreen->myNum];
+ DrawablePtr pDraw = (DrawablePtr)pScreen->root;
int truewidth = PixmapBytePad(width, in->bitsPerPixel);
if ((x + width > pVNC->width) || truewidth != width * in->bitsPerPixel / 8) {
@@ -227,7 +227,7 @@ rfbSetTranslateFunction(cl)
if (!pVNC->rfbServerFormat.trueColour &&
(pVNC->rfbServerFormat.bitsPerPixel != 8) &&
#if XFREE86VNC
- (miInstalledMaps[cl->pScreen->myNum]->class == PseudoColor)) {
+ (GetInstalledmiColormap(cl->pScreen)->class == PseudoColor)) {
#else
(pVNC->rfbInstalledColormap->class == PseudoColor)) {
#endif
@@ -241,7 +241,7 @@ rfbSetTranslateFunction(cl)
if (!cl->format.trueColour &&
(cl->format.bitsPerPixel != 8) &&
#if XFREE86VNC
- (miInstalledMaps[cl->pScreen->myNum]->class == PseudoColor)) {
+ (GetInstalledmiColormap(cl->pScreen)->class == PseudoColor)) {
#else
(pVNC->rfbInstalledColormap->class == PseudoColor) ) {
#endif
@@ -265,7 +265,7 @@ rfbSetTranslateFunction(cl)
/* colour map -> colour map */
#if XFREE86VNC
- if (miInstalledMaps[cl->pScreen->myNum]->class == DirectColor) {
+ if (GetInstalledmiColormap(cl->pScreen)->class == DirectColor) {
#else
if (pVNC->rfbInstalledColormap->class == DirectColor) {
#endif
@@ -433,7 +433,7 @@ rfbSetClientColourMap(cl, firstColour, n
if (nColours == 0) {
#if XFREE86VNC
- nColours = miInstalledMaps[cl->pScreen->myNum]->pVisual->ColormapEntries;
+ nColours = GetInstalledmiColormap(cl->pScreen)->pVisual->ColormapEntries;
#else
nColours = pVNC->rfbInstalledColormap->pVisual->ColormapEntries;
#endif
Index: xorg-server-1.9.3/hw/dmx/vnc/vncint.h
===================================================================
--- xorg-server-1.9.3.orig/hw/dmx/vnc/vncint.h
+++ xorg-server-1.9.3/hw/dmx/vnc/vncint.h
@@ -114,8 +114,8 @@ typedef struct {
CloseScreenProcPtr CloseScreen;
CreateGCProcPtr CreateGC;
- PaintWindowBackgroundProcPtr PaintWindowBackground;
- PaintWindowBorderProcPtr PaintWindowBorder;
+// PaintWindowBackgroundProcPtr PaintWindowBackground;
+// PaintWindowBorderProcPtr PaintWindowBorder;
CopyWindowProcPtr CopyWindow;
ClearToBackgroundProcPtr ClearToBackground;
RestoreAreasProcPtr RestoreAreas;
Index: xorg-server-1.9.3/hw/xfree86/vnc/vncint.h
===================================================================
--- xorg-server-1.9.3.orig/hw/xfree86/vnc/vncint.h
+++ xorg-server-1.9.3/hw/xfree86/vnc/vncint.h
@@ -112,8 +112,8 @@ typedef struct {
CloseScreenProcPtr CloseScreen;
CreateGCProcPtr CreateGC;
- PaintWindowBackgroundProcPtr PaintWindowBackground;
- PaintWindowBorderProcPtr PaintWindowBorder;
+// PaintWindowBackgroundProcPtr PaintWindowBackground;
+// PaintWindowBorderProcPtr PaintWindowBorder;
CopyWindowProcPtr CopyWindow;
ClearToBackgroundProcPtr ClearToBackground;
RestoreAreasProcPtr RestoreAreas;
Index: xorg-server-1.9.3/hw/vnc/vncext.c
===================================================================
--- xorg-server-1.9.3.orig/hw/vnc/vncext.c
+++ xorg-server-1.9.3/hw/vnc/vncext.c
@@ -36,9 +36,10 @@
#include <arpa/inet.h>
#include <netdb.h>
-static int vncCreateScreenResourcesKeyStore, rfbGCKeyStore;
-DevPrivateKey vncCreateScreenResourcesKey = &vncCreateScreenResourcesKeyStore;
-DevPrivateKey rfbGCKey = &rfbGCKeyStore;
+static DevPrivateKeyRec vncCreateScreenResourcesKeyRec;
+#define vncCreateScreenResourcesKey (&vncCreateScreenResourcesKeyRec)
+DevPrivateKeyRec rfbGCKeyRec;
+#define rfbGCKey (&rfbGCKeyRec)
int VncSelectNotify(ClientPtr client, BOOL onoff);
void VncExtensionInit(void);
@@ -762,8 +763,12 @@ VncExtensionInit(void)
vncExtGeneration = serverGeneration;
+ // doesn't seem to be valid any more - mhopf 21.12.2010
// no allocation needed for screen privates
- if (!dixRequestPrivate(rfbGCKey, sizeof(rfbGCRec)))
+ if (!dixRegisterPrivateKey(vncCreateScreenResourcesKey, PRIVATE_SCREEN, 0))
+ return;
+
+ if (!dixRegisterPrivateKey(rfbGCKey, PRIVATE_GC, sizeof(rfbGCRec)))
return;
#if XFREE86VNC
Index: xorg-server-1.9.3/hw/vnc/tableinitcmtemplate.c
===================================================================
--- xorg-server-1.9.3.orig/hw/vnc/tableinitcmtemplate.c
+++ xorg-server-1.9.3/hw/vnc/tableinitcmtemplate.c
@@ -61,7 +61,7 @@ rfbInitColourMapSingleTableOUT (ScreenPt
t = (OUT_T *)*table;
#if XFREE86VNC
- pent = (EntryPtr)&miInstalledMaps[pScreen->myNum]->red[0];
+ pent = (EntryPtr)&GetInstalledmiColormap(pScreen)->red[0];
#else
pent = (EntryPtr)&pVNC->rfbInstalledColormap->red[0];
#endif
Index: xorg-server-1.9.3/hw/xfree86/vnc/vncInit.c
===================================================================
--- xorg-server-1.9.3.orig/hw/xfree86/vnc/vncInit.c
+++ xorg-server-1.9.3/hw/xfree86/vnc/vncInit.c
@@ -286,8 +286,8 @@ VNCInit(ScreenPtr pScreen, unsigned char
pScreenPriv->CloseScreen = pScreen->CloseScreen;
pScreenPriv->CreateGC = pScreen->CreateGC;
- pScreenPriv->PaintWindowBackground = pScreen->PaintWindowBackground;
- pScreenPriv->PaintWindowBorder = pScreen->PaintWindowBorder;
+// pScreenPriv->PaintWindowBackground = pScreen->PaintWindowBackground;
+// pScreenPriv->PaintWindowBorder = pScreen->PaintWindowBorder;
pScreenPriv->CopyWindow = pScreen->CopyWindow;
pScreenPriv->ClearToBackground = pScreen->ClearToBackground;
pScreenPriv->RestoreAreas = pScreen->RestoreAreas;
@@ -313,8 +313,8 @@ VNCInit(ScreenPtr pScreen, unsigned char
#endif
pScreen->CloseScreen = rfbCloseScreen;
pScreen->CreateGC = rfbCreateGC;
- pScreen->PaintWindowBackground = rfbPaintWindowBackground;
- pScreen->PaintWindowBorder = rfbPaintWindowBorder;
+// pScreen->PaintWindowBackground = rfbPaintWindowBackground;
+// pScreen->PaintWindowBorder = rfbPaintWindowBorder;
pScreen->CopyWindow = rfbCopyWindow;
pScreen->ClearToBackground = rfbClearToBackground;
pScreen->RestoreAreas = rfbRestoreAreas;