3d8b0bc070
Fix vnc startup crashes (bnc #631994). Reenabled build of Xvnc. Massive rendering errors, still. OBS-URL: https://build.opensuse.org/package/show/X11:XOrg/xorg-x11-server?expand=0&rev=316
111 lines
4.1 KiB
Diff
111 lines
4.1 KiB
Diff
diff -urp xorg-server-1.9.3.orig//hw/vnc/dispcur.c xorg-server-1.9.3/hw/vnc/dispcur.c
|
|
--- xorg-server-1.9.3.orig//hw/vnc/dispcur.c 2010-12-21 16:51:38.000000000 +0100
|
|
+++ xorg-server-1.9.3/hw/vnc/dispcur.c 2010-12-21 18:23:02.000000000 +0100
|
|
@@ -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;
|
|
diff -urp xorg-server-1.9.3.orig//hw/vnc/draw.c xorg-server-1.9.3/hw/vnc/draw.c
|
|
--- xorg-server-1.9.3.orig//hw/vnc/draw.c 2010-12-21 16:51:38.000000000 +0100
|
|
+++ xorg-server-1.9.3/hw/vnc/draw.c 2010-12-21 18:30:00.000000000 +0100
|
|
@@ -61,6 +61,10 @@ in this Software without prior written a
|
|
|
|
int rfbDeferUpdateTime = 40; /* ms */
|
|
|
|
+extern DevPrivateKeyRec rfbGCKeyRec;
|
|
+#define rfbGCKey (&rfbGCKeyRec)
|
|
+
|
|
+
|
|
|
|
/****************************************************************************/
|
|
/*
|
|
diff -urp xorg-server-1.9.3.orig//hw/vnc/sprite.c xorg-server-1.9.3/hw/vnc/sprite.c
|
|
--- xorg-server-1.9.3.orig//hw/vnc/sprite.c 2010-12-21 16:51:38.000000000 +0100
|
|
+++ xorg-server-1.9.3/hw/vnc/sprite.c 2010-12-21 18:21:32.000000000 +0100
|
|
@@ -114,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, \
|
|
@@ -147,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 = \
|
|
@@ -331,6 +332,9 @@ rfbSpriteInitialize (pScreen, cursorFunc
|
|
rfbSpriteScreenPtr pPriv;
|
|
VisualPtr pVisual;
|
|
|
|
+ if (!dixRegisterPrivateKey(rfbSpriteScreenKey, PRIVATE_SCREEN, 0))
|
|
+ return FALSE;
|
|
+
|
|
if (!dixRegisterPrivateKey(rfbSpriteGCKey, PRIVATE_CLIENT, sizeof(rfbSpriteGCRec)))
|
|
return FALSE;
|
|
|
|
diff -urp xorg-server-1.9.3.orig//hw/vnc/vncext.c xorg-server-1.9.3/hw/vnc/vncext.c
|
|
--- xorg-server-1.9.3.orig//hw/vnc/vncext.c 2010-12-21 16:51:38.000000000 +0100
|
|
+++ xorg-server-1.9.3/hw/vnc/vncext.c 2010-12-21 18:29:54.000000000 +0100
|
|
@@ -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,7 +763,11 @@ VncExtensionInit(void)
|
|
|
|
vncExtGeneration = serverGeneration;
|
|
|
|
+ // doesn't seem to be valid any more - mhopf 21.12.2010
|
|
// no allocation needed for screen privates
|
|
+ if (!dixRegisterPrivateKey(vncCreateScreenResourcesKey, PRIVATE_SCREEN, 0))
|
|
+ return;
|
|
+
|
|
if (!dixRegisterPrivateKey(rfbGCKey, PRIVATE_CLIENT, sizeof(rfbGCRec)))
|
|
return;
|
|
|