1
0

- xorg-server-xf4vnc-fix-crash-on-193.diff

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
This commit is contained in:
Matthias Hopf 2010-12-21 18:12:23 +00:00 committed by Git OBS Bridge
parent d467ccc7e1
commit 3d8b0bc070
4 changed files with 145 additions and 1 deletions

View File

@ -0,0 +1,25 @@
Index: xorg-server-1.6.5/hw/vnc/kbdptr.c
===================================================================
--- xorg-server-1.6.5.orig/hw/vnc/kbdptr.c
+++ xorg-server-1.6.5/hw/vnc/kbdptr.c
@@ -166,7 +166,9 @@ KbdAddEvent(Bool down, KeySym keySym, rf
if (!kbdDevice)
return;
- keySyms = &kbdDevice->key->curKeySyms;
+ /* Use virtual core keyboard for keysyms - see discussion on
+ * https://defect.opensolaris.org/bz/show_bug.cgi?id=8687 */
+ keySyms = &inputInfo.keyboard->key->curKeySyms;
#ifdef CORBA
if (cl) {
@@ -277,7 +279,8 @@ KbdAddEvent(Bool down, KeySym keySym, rf
shiftMustBePressed = TRUE;
}
- SendMappingNotify(kbdDevice, MappingKeyboard, keyCode, 1, serverClient);
+ /* Use virtual core keyboard for keysyms */
+ SendMappingNotify(inputInfo.keyboard, MappingKeyboard, keyCode, 1, serverClient);
ErrorF("KbdAddEvent: unknown KeySym 0x%x - allocating KeyCode %d\n",
(int)keySym, keyCode);

View File

@ -0,0 +1,110 @@
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;

View File

@ -1,3 +1,10 @@
-------------------------------------------------------------------
Tue Dec 21 18:08:15 UTC 2010 - mhopf@novell.com
- xorg-server-xf4vnc-fix-crash-on-193.diff
Fix vnc startup crashes (bnc #660208).
Reenabled build of Xvnc. Massive rendering errors, still.
------------------------------------------------------------------- -------------------------------------------------------------------
Tue Dec 21 02:51:19 UTC 2010 - sndirsch@novell.com Tue Dec 21 02:51:19 UTC 2010 - sndirsch@novell.com

View File

@ -21,7 +21,7 @@
Name: xorg-x11-server Name: xorg-x11-server
%define dirsuffix 1.9.3 %define dirsuffix 1.9.3
%define vnc 0 %define vnc 1
BuildRequires: Mesa-devel bison flex fontconfig-devel freetype2-devel ghostscript-library libdrm-devel libopenssl-devel pkgconfig xorg-x11 xorg-x11-devel xorg-x11-fonts-devel xorg-x11-libICE-devel xorg-x11-libSM-devel xorg-x11-libX11-devel xorg-x11-libXau-devel xorg-x11-libXdmcp-devel xorg-x11-libXext-devel xorg-x11-libXfixes-devel xorg-x11-libXmu-devel xorg-x11-libXp-devel xorg-x11-libXpm-devel xorg-x11-libXprintUtil-devel xorg-x11-libXrender-devel xorg-x11-libXt-devel xorg-x11-libXv-devel xorg-x11-libfontenc-devel xorg-x11-libxkbfile-devel xorg-x11-proto-devel xorg-x11-xtrans-devel BuildRequires: Mesa-devel bison flex fontconfig-devel freetype2-devel ghostscript-library libdrm-devel libopenssl-devel pkgconfig xorg-x11 xorg-x11-devel xorg-x11-fonts-devel xorg-x11-libICE-devel xorg-x11-libSM-devel xorg-x11-libX11-devel xorg-x11-libXau-devel xorg-x11-libXdmcp-devel xorg-x11-libXext-devel xorg-x11-libXfixes-devel xorg-x11-libXmu-devel xorg-x11-libXp-devel xorg-x11-libXpm-devel xorg-x11-libXprintUtil-devel xorg-x11-libXrender-devel xorg-x11-libXt-devel xorg-x11-libXv-devel xorg-x11-libfontenc-devel xorg-x11-libxkbfile-devel xorg-x11-proto-devel xorg-x11-xtrans-devel
### udev support (broken on openSUSE 11.2, see also bnc #589997) ### udev support (broken on openSUSE 11.2, see also bnc #589997)
%if %suse_version > 1120 %if %suse_version > 1120
@ -80,6 +80,7 @@ Patch48: xorg-server-xf4vnc-fix.diff
Patch49: xorg-server-xf4vnc-fixes_1_8.diff Patch49: xorg-server-xf4vnc-fixes_1_8.diff
Patch50: xorg-server-xf4vnc-fixes_1_9.diff Patch50: xorg-server-xf4vnc-fixes_1_9.diff
#Patch51: xorg-server-xf4vnc-bug605015-vnc-umlauts.diff #Patch51: xorg-server-xf4vnc-bug605015-vnc-umlauts.diff
Patch52: xorg-server-xf4vnc-fix-crash-on-193.diff
%endif %endif
Patch45: bug-197858_dpms.diff Patch45: bug-197858_dpms.diff
Patch67: xorg-docs.diff Patch67: xorg-docs.diff
@ -204,6 +205,7 @@ An X Window System server for Virtual Network Computing (VNC).
%patch49 -p0 %patch49 -p0
%patch50 -p1 %patch50 -p1
#%patch51 -p1 #%patch51 -p1
%patch52 -p1
chmod 755 hw/vnc/symlink-vnc.sh chmod 755 hw/vnc/symlink-vnc.sh
%endif %endif
%patch45 -p0 %patch45 -p0