diff --git a/ppc.diff b/ppc.diff new file mode 100644 index 0000000..2f5451d --- /dev/null +++ b/ppc.diff @@ -0,0 +1,207 @@ +diff -u -r -p xorg-server-1.4.99.905.orig//Xext/panoramiX.c xorg-server-1.4.99.905/Xext/panoramiX.c +--- xorg-server-1.4.99.905.orig//Xext/panoramiX.c 2008-06-30 20:11:03.000000000 +0000 ++++ xorg-server-1.4.99.905/Xext/panoramiX.c 2008-07-10 10:31:28.675430884 +0000 +@@ -1099,14 +1099,8 @@ ProcPanoramiXDispatch (ClientPtr client) + return BadRequest; + } + +- +-#if X_BYTE_ORDER == X_LITTLE_ENDIAN +-#define SHIFT_L(v,s) (v) << (s) +-#define SHIFT_R(v,s) (v) >> (s) +-#else + #define SHIFT_L(v,s) (v) >> (s) + #define SHIFT_R(v,s) (v) << (s) +-#endif + + static void + CopyBits(char *dst, int shiftL, char *src, int bytes) +diff -u -r -p xorg-server-1.4.99.905.orig//dix/colormap.c xorg-server-1.4.99.905/dix/colormap.c +--- xorg-server-1.4.99.905.orig//dix/colormap.c 2008-06-17 18:41:48.000000000 +0000 ++++ xorg-server-1.4.99.905/dix/colormap.c 2008-07-10 10:31:28.765431880 +0000 +@@ -281,9 +281,6 @@ CreateColormap (Colormap mid, ScreenPtr + #if defined(_XSERVER64) + pmap->pad0 = 0; + pmap->pad1 = 0; +-#if (X_BYTE_ORDER == X_LITTLE_ENDIAN) +- pmap->pad2 = 0; +-#endif + #endif + pmap->red = (EntryPtr)((char *)pmap + sizeof(ColormapRec)); + sizebytes = size * sizeof(Entry); +diff -u -r -p xorg-server-1.4.99.905.orig//glx/glxdri.c xorg-server-1.4.99.905/glx/glxdri.c +--- xorg-server-1.4.99.905.orig//glx/glxdri.c 2008-06-26 21:14:44.000000000 +0000 ++++ xorg-server-1.4.99.905/glx/glxdri.c 2008-07-10 10:31:29.025434759 +0000 +@@ -465,9 +465,7 @@ nooverride: + bpp = 4; + format = GL_BGRA; + type = +-#if X_BYTE_ORDER == X_BIG_ENDIAN + !override ? GL_UNSIGNED_INT_8_8_8_8_REV : +-#endif + GL_UNSIGNED_BYTE; + } else { + bpp = 2; +diff -u -r -p xorg-server-1.4.99.905.orig//hw/xfree86/common/xf86xv.c xorg-server-1.4.99.905/hw/xfree86/common/xf86xv.c +--- xorg-server-1.4.99.905.orig//hw/xfree86/common/xf86xv.c 2008-06-17 18:41:48.000000000 +0000 ++++ xorg-server-1.4.99.905/hw/xfree86/common/xf86xv.c 2008-07-10 10:31:28.965434095 +0000 +@@ -2013,29 +2013,18 @@ xf86XVCopyYUV12ToPacked( + Y = srcy; V = srcv; U = srcu; + i = w; + while (i >= 4) { +-#if X_BYTE_ORDER == X_LITTLE_ENDIAN +- Dst[0] = Y[0] | (Y[1] << 16) | (U[0] << 8) | (V[0] << 24); +- Dst[1] = Y[2] | (Y[3] << 16) | (U[1] << 8) | (V[1] << 24); +- Dst[2] = Y[4] | (Y[5] << 16) | (U[2] << 8) | (V[2] << 24); +- Dst[3] = Y[6] | (Y[7] << 16) | (U[3] << 8) | (V[3] << 24); +-#else + /* This assumes a little-endian framebuffer */ + Dst[0] = (Y[0] << 24) | (Y[1] << 8) | (U[0] << 16) | V[0]; + Dst[1] = (Y[2] << 24) | (Y[3] << 8) | (U[1] << 16) | V[1]; + Dst[2] = (Y[4] << 24) | (Y[5] << 8) | (U[2] << 16) | V[2]; + Dst[3] = (Y[6] << 24) | (Y[7] << 8) | (U[3] << 16) | V[3]; +-#endif + Dst += 4; Y += 8; V += 4; U += 4; + i -= 4; + } + + while (i--) { +-#if X_BYTE_ORDER == X_LITTLE_ENDIAN +- Dst[0] = Y[0] | (Y[1] << 16) | (U[0] << 8) | (V[0] << 24); +-#else + /* This assumes a little-endian framebuffer */ + Dst[0] = (Y[0] << 24) | (Y[1] << 8) | (U[0] << 16) | V[0]; +-#endif + Dst++; Y += 2; V++; U++; + } + +diff -u -r -p xorg-server-1.4.99.905.orig//hw/xfree86/int10/generic.c xorg-server-1.4.99.905/hw/xfree86/int10/generic.c +--- xorg-server-1.4.99.905.orig//hw/xfree86/int10/generic.c 2008-06-17 18:41:48.000000000 +0000 ++++ xorg-server-1.4.99.905/hw/xfree86/int10/generic.c 2008-07-10 10:31:28.915433541 +0000 +@@ -449,20 +449,12 @@ read_b(xf86Int10InfoPtr pInt, int addr) + static CARD16 + read_w(xf86Int10InfoPtr pInt, int addr) + { +-#if X_BYTE_ORDER == X_LITTLE_ENDIAN +- if (OFF(addr + 1) > 0) +- return V_ADDR_RW(addr); +-#endif + return V_ADDR_RB(addr) | (V_ADDR_RB(addr + 1) << 8); + } + + static CARD32 + read_l(xf86Int10InfoPtr pInt, int addr) + { +-#if X_BYTE_ORDER == X_LITTLE_ENDIAN +- if (OFF(addr + 3) > 2) +- return V_ADDR_RL(addr); +-#endif + return V_ADDR_RB(addr) | + (V_ADDR_RB(addr + 1) << 8) | + (V_ADDR_RB(addr + 2) << 16) | +@@ -478,10 +470,6 @@ write_b(xf86Int10InfoPtr pInt, int addr, + static void + write_w(xf86Int10InfoPtr pInt, int addr, CARD16 val) + { +-#if X_BYTE_ORDER == X_LITTLE_ENDIAN +- if (OFF(addr + 1) > 0) +- { V_ADDR_WW(addr, val); } +-#endif + V_ADDR_WB(addr, val); + V_ADDR_WB(addr + 1, val >> 8); + } +@@ -489,10 +477,6 @@ write_w(xf86Int10InfoPtr pInt, int addr, + static void + write_l(xf86Int10InfoPtr pInt, int addr, CARD32 val) + { +-#if X_BYTE_ORDER == X_LITTLE_ENDIAN +- if (OFF(addr + 3) > 2) +- { V_ADDR_WL(addr, val); } +-#endif + V_ADDR_WB(addr, val); + V_ADDR_WB(addr + 1, val >> 8); + V_ADDR_WB(addr + 2, val >> 16); +diff -u -r -p xorg-server-1.4.99.905.orig//hw/xfree86/modes/xf86Cursors.c xorg-server-1.4.99.905/hw/xfree86/modes/xf86Cursors.c +--- xorg-server-1.4.99.905.orig//hw/xfree86/modes/xf86Cursors.c 2008-06-30 20:11:03.000000000 +0000 ++++ xorg-server-1.4.99.905/hw/xfree86/modes/xf86Cursors.c 2008-07-10 10:31:28.915433541 +0000 +@@ -137,6 +137,7 @@ cursor_bitpos (int flags, int x, Bool ma + mask = !mask; + if (flags & HARDWARE_CURSOR_NIBBLE_SWAPPED) + x = (x & ~3) | (3 - (x & 3)); ++#define X_BYTE_ORDER X_BIG_ENDIAN + if (((flags & HARDWARE_CURSOR_BIT_ORDER_MSBFIRST) == 0) == + (X_BYTE_ORDER == X_BIG_ENDIAN)) + x = (x & ~7) | (7 - (x & 7)); +diff -u -r -p xorg-server-1.4.99.905.orig//hw/xfree86/vbe/vbe.c xorg-server-1.4.99.905/hw/xfree86/vbe/vbe.c +--- xorg-server-1.4.99.905.orig//hw/xfree86/vbe/vbe.c 2008-06-17 18:41:48.000000000 +0000 ++++ xorg-server-1.4.99.905/hw/xfree86/vbe/vbe.c 2008-07-10 10:31:28.925433652 +0000 +@@ -23,14 +23,9 @@ + + #define VERSION(x) VBE_VERSION_MAJOR(x),VBE_VERSION_MINOR(x) + +-#if X_BYTE_ORDER == X_LITTLE_ENDIAN +-#define B_O16(x) (x) +-#define B_O32(x) (x) +-#else + #define B_O16(x) ((((x) & 0xff) << 8) | (((x) & 0xff) >> 8)) + #define B_O32(x) ((((x) & 0xff) << 24) | (((x) & 0xff00) << 8) \ + | (((x) & 0xff0000) >> 8) | (((x) & 0xff000000) >> 24)) +-#endif + #define L_ADD(x) (B_O32(x) & 0xffff) + ((B_O32(x) >> 12) & 0xffff00) + + #define FARP(p) (((unsigned)(p & 0xffff0000) >> 12) | (p & 0xffff)) +diff -u -r -p xorg-server-1.4.99.905.orig//hw/xfree86/xaa/xaaPCache.c xorg-server-1.4.99.905/hw/xfree86/xaa/xaaPCache.c +--- xorg-server-1.4.99.905.orig//hw/xfree86/xaa/xaaPCache.c 2008-06-17 18:41:48.000000000 +0000 ++++ xorg-server-1.4.99.905/hw/xfree86/xaa/xaaPCache.c 2008-07-10 10:31:28.895433320 +0000 +@@ -1081,21 +1081,12 @@ XAAInitPixmapCache( + CACHEINIT(pScrn) = 1; + } + +-#if X_BYTE_ORDER == X_BIG_ENDIAN + static CARD32 StippleMasks[4] = { + 0x80808080, + 0xC0C0C0C0, + 0x00000000, + 0xF0F0F0F0 + }; +-#else +-static CARD32 StippleMasks[4] = { +- 0x01010101, +- 0x03030303, +- 0x00000000, +- 0x0F0F0F0F +-}; +-#endif + + Bool + XAACheckStippleReducibility(PixmapPtr pPixmap) +diff -u -r -p xorg-server-1.4.99.905.orig//hw/xfree86/xaa/xaacexp.h xorg-server-1.4.99.905/hw/xfree86/xaa/xaacexp.h +--- xorg-server-1.4.99.905.orig//hw/xfree86/xaa/xaacexp.h 2008-04-10 18:58:01.000000000 +0000 ++++ xorg-server-1.4.99.905/hw/xfree86/xaa/xaacexp.h 2008-07-10 10:31:28.895433320 +0000 +@@ -12,13 +12,8 @@ + #define CHECKRETURN(b) if(width <= ((b) * 32)) return(base) + #endif + +-#if X_BYTE_ORDER == X_BIG_ENDIAN + # define SHIFT_L(value, shift) ((value) >> (shift)) + # define SHIFT_R(value, shift) ((value) << (shift)) +-#else +-# define SHIFT_L(value, shift) ((value) << (shift)) +-# define SHIFT_R(value, shift) ((value) >> (shift)) +-#endif + + #ifndef MSBFIRST + # ifdef FIXEDBASE +diff -u -r -p xorg-server-1.4.99.905.orig//include/colormapst.h xorg-server-1.4.99.905/include/colormapst.h +--- xorg-server-1.4.99.905.orig//include/colormapst.h 2008-06-17 18:41:48.000000000 +0000 ++++ xorg-server-1.4.99.905/include/colormapst.h 2008-07-10 10:31:29.035434870 +0000 +@@ -108,9 +108,6 @@ typedef struct _ColormapRec + XID pad1; + #endif + XID mid; /* client's name for colormap */ +-#if defined(_XSERVER64) && (X_BYTE_ORDER == X_LITTLE_ENDIAN) +- XID pad2; +-#endif + ScreenPtr pScreen; /* screen map is associated with */ + short flags; /* 1 = IsDefault + * 2 = AllAllocated */ diff --git a/xorg-server-1.4-vnc-64bit.diff b/xorg-server-1.4-vnc-64bit.diff deleted file mode 100644 index b36f481..0000000 --- a/xorg-server-1.4-vnc-64bit.diff +++ /dev/null @@ -1,10 +0,0 @@ ---- hw/xfree86/vnc/Makefile.am.orig 2007-10-23 21:53:43.000000000 +0200 -+++ hw/xfree86/vnc/Makefile.am 2007-10-23 22:44:44.000000000 +0200 -@@ -12,6 +12,7 @@ - -DXFree86LOADER \ - -DXFREE86VNC=1 \ - -DCHROMIUM=1 \ -+ -DHAVE_DIX_CONFIG_H \ - @LIBDRM_CFLAGS@ \ - @GL_CFLAGS@ \ - @PIXMAN_CFLAGS@ diff --git a/xorg-server-1.4-vnc-disable_render.diff b/xorg-server-1.4-vnc-disable_render.diff deleted file mode 100644 index a16d3f2..0000000 --- a/xorg-server-1.4-vnc-disable_render.diff +++ /dev/null @@ -1,127 +0,0 @@ -diff -u -r -p ../xorg-server-1.4.0.90.orig//hw/dmx/vnc/vncInit.c ./hw/dmx/vnc/vncInit.c ---- ../xorg-server-1.4.0.90.orig//hw/dmx/vnc/vncInit.c 2008-05-05 12:35:43.000000000 +0000 -+++ ./hw/dmx/vnc/vncInit.c 2008-05-05 12:47:11.000000000 +0000 -@@ -45,6 +45,10 @@ - - #include - -+#ifdef RENDER -+#undef RENDER -+#endif -+ - int vncScreenPrivateIndex = -1; - int rfbGCIndex = -1; - int inetdSock = -1; -diff -u -r -p ../xorg-server-1.4.0.90.orig//hw/dmx/vnc/vncint.h ./hw/dmx/vnc/vncint.h ---- ../xorg-server-1.4.0.90.orig//hw/dmx/vnc/vncint.h 2008-05-05 12:35:43.000000000 +0000 -+++ ./hw/dmx/vnc/vncint.h 2008-05-05 12:47:22.000000000 +0000 -@@ -24,6 +24,10 @@ - - #include - -+#ifdef RENDER -+#undef RENDER -+#endif -+ - extern int vncScreenPrivateIndex; - - #define VNCPTR(pScreen)\ -diff -u -r -p ../xorg-server-1.4.0.90.orig//hw/vnc/draw.c ./hw/vnc/draw.c ---- ../xorg-server-1.4.0.90.orig//hw/vnc/draw.c 2008-05-05 12:35:43.000000000 +0000 -+++ ./hw/vnc/draw.c 2008-05-05 12:47:41.000000000 +0000 -@@ -59,6 +59,10 @@ in this Software without prior written a - - #include "rfb.h" - -+#ifdef RENDER -+#undef RENDER -+#endif -+ - int rfbDeferUpdateTime = 40; /* ms */ - - -diff -u -r -p ../xorg-server-1.4.0.90.orig//hw/vnc/init.c ./hw/vnc/init.c ---- ../xorg-server-1.4.0.90.orig//hw/vnc/init.c 2008-05-05 12:35:43.000000000 +0000 -+++ ./hw/vnc/init.c 2008-05-05 12:47:49.000000000 +0000 -@@ -95,6 +95,10 @@ from the X Consortium. - #include - #endif - -+#ifdef RENDER -+#undef RENDER -+#endif -+ - #define RFB_DEFAULT_WIDTH 640 - #define RFB_DEFAULT_HEIGHT 480 - #define RFB_DEFAULT_DEPTH 8 -diff -u -r -p ../xorg-server-1.4.0.90.orig//hw/vnc/rfb.h ./hw/vnc/rfb.h ---- ../xorg-server-1.4.0.90.orig//hw/vnc/rfb.h 2008-05-05 12:35:43.000000000 +0000 -+++ ./hw/vnc/rfb.h 2008-05-05 12:48:23.000000000 +0000 -@@ -92,6 +92,10 @@ - rfbScreenInfoPtr pVNC = &rfbScreen - #endif - -+#ifdef RENDER -+#undef RENDER -+#endif -+ - /* - * Per-screen (framebuffer) structure. There is only one of these, since we - * don't allow the X server to have multiple screens. -diff -u -r -p ../xorg-server-1.4.0.90.orig//hw/vnc/sprite.c ./hw/vnc/sprite.c ---- ../xorg-server-1.4.0.90.orig//hw/vnc/sprite.c 2008-05-05 12:35:43.000000000 +0000 -+++ ./hw/vnc/sprite.c 2008-05-05 12:49:12.000000000 +0000 -@@ -74,6 +74,11 @@ in this Software without prior written a - # include "mipointer.h" - # include "spritest.h" - # include "dixfontstr.h" -+ -+#ifdef RENDER -+#undef RENDER -+#endif -+ - #ifdef RENDER - # include "mipict.h" - #endif -diff -u -r -p ../xorg-server-1.4.0.90.orig//hw/vnc/spritest.h ./hw/vnc/spritest.h ---- ../xorg-server-1.4.0.90.orig//hw/vnc/spritest.h 2008-05-05 12:35:43.000000000 +0000 -+++ ./hw/vnc/spritest.h 2008-05-05 12:49:24.000000000 +0000 -@@ -54,6 +54,10 @@ in this Software without prior written a - # include "sprite.h" - - #ifdef RENDER -+#undef RENDER -+#endif -+ -+#ifdef RENDER - # include "picturestr.h" - #endif - -diff -u -r -p ../xorg-server-1.4.0.90.orig//hw/xfree86/vnc/vncInit.c ./hw/xfree86/vnc/vncInit.c ---- ../xorg-server-1.4.0.90.orig//hw/xfree86/vnc/vncInit.c 2008-05-05 12:35:43.000000000 +0000 -+++ ./hw/xfree86/vnc/vncInit.c 2008-05-05 12:49:53.000000000 +0000 -@@ -37,6 +37,10 @@ - #include "xf86Resources.h" - #include "xf86Version.h" - -+#ifdef RENDER -+#undef RENDER -+#endif -+ - int vncScreenPrivateIndex = -1; - int rfbGCIndex = -1; - int inetdSock = -1; -diff -u -r -p ../xorg-server-1.4.0.90.orig//hw/xfree86/vnc/vncint.h ./hw/xfree86/vnc/vncint.h ---- ../xorg-server-1.4.0.90.orig//hw/xfree86/vnc/vncint.h 2008-05-05 12:35:43.000000000 +0000 -+++ ./hw/xfree86/vnc/vncint.h 2008-05-05 12:50:09.000000000 +0000 -@@ -25,6 +25,10 @@ - #include <../ramdac/xf86Cursor.h> - /*#include */ - -+#ifdef RENDER -+#undef RENDER -+#endif -+ - extern int vncScreenPrivateIndex; - - #define VNCPTR(pScreen)\ diff --git a/xorg-server-1.4-vnc-fix.patch b/xorg-server-1.4-vnc-fix.patch deleted file mode 100644 index b5932ee..0000000 --- a/xorg-server-1.4-vnc-fix.patch +++ /dev/null @@ -1,22 +0,0 @@ -diff -u -r -x .deps xorg-server-1.4.old/hw/xfree86/vnc/vncint.h xorg-server-1.4/hw/xfree86/vnc/vncint.h ---- xorg-server-1.4.old/hw/xfree86/vnc/vncint.h 2007-10-19 01:11:08.000000000 +0000 -+++ xorg-server-1.4/hw/xfree86/vnc/vncint.h 2007-10-19 01:22:20.000000000 +0000 -@@ -22,7 +22,7 @@ - #ifndef _VNC_H_ - #define _VNC_H_ - --#include -+#include <../ramdac/xf86Cursor.h> - /*#include */ - - extern int vncScreenPrivateIndex; -diff -u -r -x .deps xorg-server-1.4.old/xcliplist/cliplistmod.c xorg-server-1.4/xcliplist/cliplistmod.c ---- xorg-server-1.4.old/xcliplist/cliplistmod.c 2007-10-19 01:11:10.000000000 +0000 -+++ xorg-server-1.4/xcliplist/cliplistmod.c 2007-10-19 01:13:04.000000000 +0000 -@@ -1,5 +1,5 @@ - --#include "xorg/xf86Module.h" -+#include "../hw/xfree86/common/xf86Module.h" - - extern Bool noTestExtensions; - diff --git a/xorg-server-1.4-vnc-memory.diff b/xorg-server-1.4-vnc-memory.diff deleted file mode 100644 index e7fd5ab..0000000 --- a/xorg-server-1.4-vnc-memory.diff +++ /dev/null @@ -1,19 +0,0 @@ -diff -u -w -r xorg-server-1.4.0.90.orig//hw/vnc/init.c xorg-server-1.4.0.90/hw/vnc/init.c ---- xorg-server-1.4.0.90.orig//hw/vnc/init.c 2008-03-20 14:49:06.620576750 +0100 -+++ xorg-server-1.4.0.90/hw/vnc/init.c 2008-03-20 14:49:27.769898500 +0100 -@@ -827,6 +827,7 @@ - KbdDeviceOff(); - break; - case DEVICE_CLOSE: -+ vncSetKeyboardDevice(NULL); - if (pDev->on) - KbdDeviceOff(); - break; -@@ -869,6 +870,7 @@ - break; - - case DEVICE_CLOSE: -+ vncSetPointerDevice(NULL); - if (pDev->on) - PtrDeviceOff(); - break; diff --git a/xorg-server-1.4-vnc-render_sig11.diff b/xorg-server-1.4-vnc-render_sig11.diff deleted file mode 100644 index ae5651a..0000000 --- a/xorg-server-1.4-vnc-render_sig11.diff +++ /dev/null @@ -1,12 +0,0 @@ -diff -u -r ../xorg-server-1.4.0.90.orig//hw/vnc/sprite.c ./hw/vnc/sprite.c ---- ../xorg-server-1.4.0.90.orig//hw/vnc/sprite.c 2008-05-16 08:53:40.000000000 +0000 -+++ ./hw/vnc/sprite.c 2008-05-16 10:10:38.000000000 +0000 -@@ -2017,7 +2017,7 @@ - { - VNCSCREENPTR(pPict->pDrawable->pScreen); - -- if (pPict->pDrawable->type == DRAWABLE_WINDOW) -+ if (pPict->pDrawable && pPict->pDrawable->type == DRAWABLE_WINDOW) - { - WindowPtr pWin = (WindowPtr) (pPict->pDrawable); - rfbSpriteScreenPtr pScreenPriv = (rfbSpriteScreenPtr) diff --git a/xorg-server-xf4vnc-TranslateNone.diff b/xorg-server-xf4vnc-TranslateNone.diff new file mode 100644 index 0000000..854ff0b --- /dev/null +++ b/xorg-server-xf4vnc-TranslateNone.diff @@ -0,0 +1,26 @@ +diff -u -r -p xorg-server-1.4.0.90.old//hw/vnc/translate.c xorg-server-1.4.0.90/hw/vnc/translate.c +--- xorg-server-1.4.0.90.old//hw/vnc/translate.c 2008-07-03 18:59:24.000000000 +0200 ++++ xorg-server-1.4.0.90/hw/vnc/translate.c 2008-07-03 18:59:44.000000000 +0200 +@@ -168,17 +168,17 @@ rfbTranslateNone(ScreenPtr pScreen, char + { + VNCSCREENPTR(pScreen); + DrawablePtr pDraw = (DrawablePtr)WindowTable[pScreen->myNum]; +- int truewidth = PixmapBytePad(width, in->bitsPerPixel) / 4; ++ int truewidth = PixmapBytePad(width, in->bitsPerPixel); + +- if ((x + truewidth > pVNC->width) || truewidth != width) { +- unsigned char *buffer = malloc(truewidth * height * in->bitsPerPixel / 8); ++ if ((x + width > pVNC->width) || truewidth != width * in->bitsPerPixel / 8) { ++ unsigned char *buffer = malloc(truewidth * height); + unsigned char *buf = buffer; + +- (*pScreen->GetImage)(pDraw, x, y, truewidth, height, ZPixmap, ~0, (char*)buf); ++ (*pScreen->GetImage)(pDraw, x, y, width, height, ZPixmap, ~0, (char*)buf); + while (height--) { + memcpy(optr, buf, width * in->bitsPerPixel / 8); + optr += width * in->bitsPerPixel / 8; +- buf += truewidth * in->bitsPerPixel / 8; ++ buf += truewidth; + } + free(buffer); + return; diff --git a/xorg-server-xf4vnc-disable-dmxvnc.diff b/xorg-server-xf4vnc-disable-dmxvnc.diff new file mode 100644 index 0000000..6a5fd67 --- /dev/null +++ b/xorg-server-xf4vnc-disable-dmxvnc.diff @@ -0,0 +1,47 @@ +diff -u -r ../xorg-server-1.4.99.905.old//hw/dmx/Makefile.am ./hw/dmx/Makefile.am +--- ../xorg-server-1.4.99.905.old//hw/dmx/Makefile.am 2008-07-10 07:15:50.000000000 +0000 ++++ ./hw/dmx/Makefile.am 2008-07-10 07:21:28.000000000 +0000 +@@ -1,6 +1,6 @@ + DIST_SUBDIRS = input vnc config glxProxy examples doc + +-SUBDIRS = input vnc config examples ++SUBDIRS = input config examples + bin_PROGRAMS = Xdmx + + if XINERAMA +diff -u -r ../xorg-server-1.4.99.905.old//hw/dmx/dmx-config.h ./hw/dmx/dmx-config.h +--- ../xorg-server-1.4.99.905.old//hw/dmx/dmx-config.h 2008-07-10 07:15:50.000000000 +0000 ++++ ./hw/dmx/dmx-config.h 2008-07-10 07:19:44.000000000 +0000 +@@ -72,8 +72,8 @@ + /* Enable the DMX extension */ + #define DMXEXT + +-/* Enable VNC ability */ +-#define DMXVNC 1 ++/* Disable VNC ability */ ++#undef DMXVNC + + /* Disable the extensions that are not currently supported */ + #undef BEZIER +diff -u -r ../xorg-server-1.4.99.905.old//hw/dmx/input/Makefile.am ./hw/dmx/input/Makefile.am +--- ../xorg-server-1.4.99.905.old//hw/dmx/input/Makefile.am 2008-07-10 07:15:50.000000000 +0000 ++++ ./hw/dmx/input/Makefile.am 2008-07-10 07:20:43.000000000 +0000 +@@ -65,7 +65,6 @@ + -I$(top_srcdir)/hw/xfree86/common \ + $(GLX_INCS) \ + -DHAVE_DMX_CONFIG_H \ +- -DDMXVNC=1 \ + $(GLX_DEFS) \ + @DMXMODULES_CFLAGS@ + +diff -u -r ../xorg-server-1.4.99.905.old//hw/dmx/vnc/Makefile.am ./hw/dmx/vnc/Makefile.am +--- ../xorg-server-1.4.99.905.old//hw/dmx/vnc/Makefile.am 2008-07-10 07:15:50.000000000 +0000 ++++ ./hw/dmx/vnc/Makefile.am 2008-07-10 07:18:02.000000000 +0000 +@@ -37,7 +37,6 @@ + -I$(top_srcdir)/hw/xfree86/common \ + -DHAVE_DMX_CONFIG_H \ + $(DIX_CFLAGS) \ +- -DDMXVNC=1 \ + @DMXMODULES_CFLAGS@ + + ###EXTRA_DIST = dmxdetach.c diff --git a/xorg-server-1.4-vnc.patch b/xorg-server-xf4vnc.patch similarity index 95% rename from xorg-server-1.4-vnc.patch rename to xorg-server-xf4vnc.patch index ca76d55..0b8256e 100644 --- a/xorg-server-1.4-vnc.patch +++ b/xorg-server-xf4vnc.patch @@ -1,23 +1,40 @@ -Diff from xf4vnc 2007-09-06 - xserver 265a633cf1fcbf497d6916d9e22403dffdde2e07 -plus a couple missing commits to clean up the diff. Provides Xvnc and vnc.so -extension. Requires vncproto, xcliplistproto and libXcliplist also from -xf4vnc. Requires autotools rebuild. - -diff -pNur xorg-server-1.4.orig/configure.ac xorg-server-1.4/configure.ac ---- xorg-server-1.4.orig/configure.ac 2007-09-05 22:59:00.000000000 -0700 -+++ xorg-server-1.4/configure.ac 2007-09-06 16:09:51.000000000 -0700 -@@ -518,6 +518,10 @@ AC_ARG_ENABLE(xfree86-utils, AS_HELP +diff --git a/Makefile.am b/Makefile.am +index e382d58..e655a2b 100644 +--- a/Makefile.am ++++ b/Makefile.am +@@ -30,6 +30,10 @@ if DBE + DBE_DIR=dbe + endif + ++if XCLIPLIST ++XCLIPLIST_DIR=xcliplist ++endif ++ + SUBDIRS = \ + doc \ + include \ +@@ -54,6 +58,7 @@ SUBDIRS = \ + $(XTRAP_DIR) \ + $(COMPOSITE_DIR) \ + $(GLX_DIR) \ ++ $(XCLIPLIST_DIR) \ + exa \ + config \ + hw +diff --git a/configure.ac b/configure.ac +index 5417bbb..5679cba 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -558,6 +558,8 @@ AC_ARG_ENABLE(xfree86-utils, AS_HELP_STRING([--enable-xfree86-utils], [Build + dnl DDXes. AC_ARG_ENABLE(xorg, AS_HELP_STRING([--enable-xorg], [Build Xorg server (default: auto)]), [XORG=$enableval], [XORG=auto]) - AC_ARG_ENABLE(dmx, AS_HELP_STRING([--enable-dmx], [Build DMX server (default: no)]), [DMX=$enableval], [DMX=no]) -+ +AC_ARG_ENABLE(xcliplist, AS_HELP_STRING([--enable-xcliplist], [Build XClipList extension (default: auto)]), [XCLIPLIST=$enableval], [XCLIPLIST=auto]) +AC_ARG_ENABLE(vnc, AS_HELP_STRING([--enable-vnc], [Build Xvnc server (default: yes)]), [VNC=$enableval], [VNC=auto]) -+ + AC_ARG_ENABLE(dmx, AS_HELP_STRING([--enable-dmx], [Build DMX server (default: no)]), [DMX=$enableval], [DMX=no]) AC_ARG_ENABLE(xvfb, AS_HELP_STRING([--enable-xvfb], [Build Xvfb server (default: yes)]), [XVFB=$enableval], [XVFB=yes]) AC_ARG_ENABLE(xnest, AS_HELP_STRING([--enable-xnest], [Build Xnest server (default: auto)]), [XNEST=$enableval], [XNEST=auto]) - AC_ARG_ENABLE(xwin, AS_HELP_STRING([--enable-xwin], [Build XWin server (default: auto)]), [XWIN=$enableval], [XWIN=auto]) -@@ -887,6 +891,20 @@ XI_INC='-I$(top_srcdir)/Xi' +@@ -998,6 +1000,20 @@ XI_INC='-I$(top_srcdir)/Xi' AM_CONDITIONAL(XF86UTILS, test "x$XF86UTILS" = xyes) @@ -38,20 +55,10 @@ diff -pNur xorg-server-1.4.orig/configure.ac xorg-server-1.4/configure.ac AC_DEFINE(SHAPE, 1, [Support SHAPE extension]) AC_DEFINE(XKB, 1, [Build XKB]) -@@ -1000,6 +1018,8 @@ MI_EXT_LIB='$(top_builddir)/mi/libmiext. - MI_INC='-I$(top_srcdir)/mi' - FB_LIB='$(top_builddir)/fb/libfb.la' - FB_INC='-I$(top_srcdir)/fb' -+MFB_LIB='$(top_builddir)/mfb/libmfb.la' -+MFB_INC='-I$(top_srcdir)/mfb' - MIEXT_SHADOW_INC='-I$(top_srcdir)/miext/shadow' - MIEXT_SHADOW_LIB='$(top_builddir)/miext/shadow/libshadow.la' - XPSTUBS_LIB='$(top_builddir)/dix/libxpstubs.la' -@@ -1162,6 +1182,40 @@ AM_CONDITIONAL([DMX_BUILD_LNX], [test "x - AM_CONDITIONAL([DMX_BUILD_USB], [test "x$DMX_BUILD_USB" = xyes]) +@@ -1193,6 +1209,40 @@ dnl --------------------------------------------------------------------------- + dnl DDX section. + dnl --------------------------------------------------------------------------- - -+ +dnl VNC DDX + +AC_MSG_CHECKING([whether to build Xvnc DDX]) @@ -67,10 +74,10 @@ diff -pNur xorg-server-1.4.orig/configure.ac xorg-server-1.4/configure.ac + AC_MSG_ERROR([Xvnc build explicitly requested, but required + modules not found.]) + fi -+ XVNC_CFLAGS="-DVNCSERVER -DHAVE_XVNC_CONFIG_H $PIXMAN_CFLAGS" ++ XVNC_CFLAGS="-DVNCSERVER -DHAVE_XVNC_CONFIG_H" + AC_SUBST([XVNC_CFLAGS]) + VNC_INCLUDES="$XEXT_INC $RENDER_INC $XTRAP_INC $RECORD_INC" -+ XVNC_LIBS="$GLX_LIBS $MFB_LIB $FB_LIB $MI_LIB $XEXT_LIB $RENDER_LIB $XTRAP_LIB $RECORD_LIB $XI_LIB $XKB_LIB $XKB_STUB_LIB $MIEXT_DAMAGE_LIB $MIEXT_SHADOW_LIB $OS_LIB $CWRAP_LIB" ++ XVNC_LIBS="$CONFIG_LIB $XSERVER_LIBS $FB_LIB $MI_LIB $FIXES_LIB $XEXT_LIB $DBE_LIB $XTRAP_LIB $RECORD_LIB $GLX_LIBS $RENDER_LIB $RANDR_LIB $DAMAGE_LIB $MIEXT_DAMAGE_LIB $MIEXT_SHADOW_LIB $XI_LIB $XKB_LIB $XKB_STUB_LIB $COMPOSITE_LIB $XPSTUBS_LIB $CWRAP_LIB $OS_LIB $LIBS" + AC_SUBST([XVNC_LIBS]) + + if test "x$GLX" = xyes; then @@ -79,16 +86,17 @@ diff -pNur xorg-server-1.4.orig/configure.ac xorg-server-1.4/configure.ac + PKG_CHECK_MODULES([XVNCCONFIG_DEP], [xaw7 xmu xt xpm x11]) + AC_SUBST(XVNCCONFIG_DEP_CFLAGS) + AC_SUBST(XVNCCONFIG_DEP_LIBS) -+ $srcdir/hw/vnc/symlink-vnc.sh $srcdir/hw/vnc $srcdir/hw/xfree86/vnc -+ $srcdir/hw/vnc/symlink-vnc.sh $srcdir/hw/vnc $srcdir/hw/dmx/vnc ++ ${CONFIG_SHELL-/bin/sh} $srcdir/hw/vnc/symlink-vnc.sh \ ++ $srcdir/hw/vnc $srcdir/hw/xfree86/vnc && \ ++ ${CONFIG_SHELL-/bin/sh} $srcdir/hw/vnc/symlink-vnc.sh \ ++ $srcdir/hw/vnc $srcdir/hw/dmx/vnc || \ ++ AC_MSG_ERROR([Failed symlinking VNC sources]) +fi -+ -+ + dnl Xvfb DDX AC_MSG_CHECKING([whether to build Xvfb DDX]) -@@ -2011,6 +2065,7 @@ Xext/Makefile +@@ -2123,6 +2173,7 @@ Xext/Makefile Xi/Makefile xfixes/Makefile exa/Makefile @@ -96,7 +104,7 @@ diff -pNur xorg-server-1.4.orig/configure.ac xorg-server-1.4/configure.ac hw/Makefile hw/xfree86/Makefile hw/xfree86/common/Makefile -@@ -2048,6 +2103,7 @@ hw/xfree86/scanpci/Makefile +@@ -2160,6 +2211,7 @@ hw/xfree86/ramdac/Makefile hw/xfree86/shadowfb/Makefile hw/xfree86/vbe/Makefile hw/xfree86/vgahw/Makefile @@ -104,7 +112,7 @@ diff -pNur xorg-server-1.4.orig/configure.ac xorg-server-1.4/configure.ac hw/xfree86/x86emu/Makefile hw/xfree86/xaa/Makefile hw/xfree86/xf1bpp/Makefile -@@ -2068,8 +2124,10 @@ hw/dmx/doc/Makefile +@@ -2178,8 +2230,10 @@ hw/dmx/doc/Makefile hw/dmx/examples/Makefile hw/dmx/input/Makefile hw/dmx/glxProxy/Makefile @@ -115,9 +123,55 @@ diff -pNur xorg-server-1.4.orig/configure.ac xorg-server-1.4/configure.ac hw/xgl/Makefile hw/xgl/egl/Makefile hw/xgl/egl/module/Makefile -diff -pNur xorg-server-1.4.orig/hw/dmx/dmx-config.h xorg-server-1.4/hw/dmx/dmx-config.h ---- xorg-server-1.4.orig/hw/dmx/dmx-config.h 2007-08-23 12:04:52.000000000 -0700 -+++ xorg-server-1.4/hw/dmx/dmx-config.h 2007-09-06 16:09:45.000000000 -0700 +diff --git a/hw/Makefile.am b/hw/Makefile.am +index c2b9571..7ad240e 100644 +--- a/hw/Makefile.am ++++ b/hw/Makefile.am +@@ -30,6 +30,10 @@ if XPRINT + XPRINT_SUBDIRS = xprint + endif + ++if VNC ++VNC_SUBDIRS = vnc ++endif ++ + if XQUARTZ + XQUARTZ_SUBDIRS = xquartz + endif +@@ -40,12 +44,13 @@ SUBDIRS = \ + $(XWIN_SUBDIRS) \ + $(XVFB_SUBDIRS) \ + $(XNEST_SUBDIRS) \ +- $(DMX_SUBDIRS) \ +- $(KDRIVE_SUBDIRS) \ ++ $(DMX_SUBDIRS) \ ++ $(VNC_SUBDIRS) \ ++ $(KDRIVE_SUBDIRS) \ + $(XQUARTZ_SUBDIRS) \ + $(XPRINT_SUBDIRS) + +-DIST_SUBDIRS = dmx xfree86 vfb xnest xwin xquartz kdrive xgl xprint ++DIST_SUBDIRS = dmx xfree86 vfb xnest xwin xquartz kdrive xgl xprint vnc + + relink: + for i in $(SUBDIRS) ; do $(MAKE) -C $$i relink ; done +diff --git a/hw/dmx/Makefile.am b/hw/dmx/Makefile.am +index 8457aea..e7cf89f 100644 +--- a/hw/dmx/Makefile.am ++++ b/hw/dmx/Makefile.am +@@ -1,6 +1,6 @@ +-DIST_SUBDIRS = input config glxProxy examples doc ++DIST_SUBDIRS = input vnc config glxProxy examples doc + +-SUBDIRS = input config examples ++SUBDIRS = input vnc config examples + bin_PROGRAMS = Xdmx + + if XINERAMA +diff --git a/hw/dmx/dmx-config.h b/hw/dmx/dmx-config.h +index 343fdab..9f7ca47 100644 +--- a/hw/dmx/dmx-config.h ++++ b/hw/dmx/dmx-config.h @@ -72,6 +72,9 @@ /* Enable the DMX extension */ #define DMXEXT @@ -128,9 +182,10 @@ diff -pNur xorg-server-1.4.orig/hw/dmx/dmx-config.h xorg-server-1.4/hw/dmx/dmx-c /* Disable the extensions that are not currently supported */ #undef BEZIER #undef PEXEXT -diff -pNur xorg-server-1.4.orig/hw/dmx/dmxinit.c xorg-server-1.4/hw/dmx/dmxinit.c ---- xorg-server-1.4.orig/hw/dmx/dmxinit.c 2007-08-23 12:04:52.000000000 -0700 -+++ xorg-server-1.4/hw/dmx/dmxinit.c 2007-09-06 16:09:45.000000000 -0700 +diff --git a/hw/dmx/dmxinit.c b/hw/dmx/dmxinit.c +index 29dc005..f313e7e 100644 +--- a/hw/dmx/dmxinit.c ++++ b/hw/dmx/dmxinit.c @@ -77,6 +77,10 @@ extern void GlxSetVisualConfigs( ); #endif /* GLXEXT */ @@ -142,7 +197,7 @@ diff -pNur xorg-server-1.4.orig/hw/dmx/dmxinit.c xorg-server-1.4/hw/dmx/dmxinit. /* Global variables available to all Xserver/hw/dmx routines. */ int dmxNumScreens; DMXScreenInfo *dmxScreens; -@@ -812,6 +816,9 @@ void InitOutput(ScreenInfo *pScreenInfo, +@@ -812,6 +816,9 @@ void InitOutput(ScreenInfo *pScreenInfo, int argc, char *argv[]) dmxLog(dmxInfo, "Shadow framebuffer support %s\n", dmxShadowFB ? "enabled" : "disabled"); @@ -167,10 +222,11 @@ diff -pNur xorg-server-1.4.orig/hw/dmx/dmxinit.c xorg-server-1.4/hw/dmx/dmxinit. + return tp.tv_sec * 1000 + tp.tv_usec / 1000; +} +#endif -diff -pNur xorg-server-1.4.orig/hw/dmx/dmxsync.c xorg-server-1.4/hw/dmx/dmxsync.c ---- xorg-server-1.4.orig/hw/dmx/dmxsync.c 2007-08-23 12:04:52.000000000 -0700 -+++ xorg-server-1.4/hw/dmx/dmxsync.c 2007-09-06 16:09:45.000000000 -0700 -@@ -99,9 +99,16 @@ static void dmxSyncBlockHandler(pointer +diff --git a/hw/dmx/dmxsync.c b/hw/dmx/dmxsync.c +index c1aa431..2498a38 100644 +--- a/hw/dmx/dmxsync.c ++++ b/hw/dmx/dmxsync.c +@@ -99,9 +99,16 @@ static void dmxSyncBlockHandler(pointer blockData, OSTimePtr pTimeout, TimerForce(dmxSyncTimer); } @@ -187,10 +243,23 @@ diff -pNur xorg-server-1.4.orig/hw/dmx/dmxsync.c xorg-server-1.4/hw/dmx/dmxsync. } /** Request the XSync() batching optimization with the specified \a -diff -pNur xorg-server-1.4.orig/hw/dmx/input/dmxcommon.c xorg-server-1.4/hw/dmx/input/dmxcommon.c ---- xorg-server-1.4.orig/hw/dmx/input/dmxcommon.c 2007-08-23 12:04:52.000000000 -0700 -+++ xorg-server-1.4/hw/dmx/input/dmxcommon.c 2007-09-06 16:09:45.000000000 -0700 -@@ -655,7 +655,6 @@ void dmxCommonRestoreState(pointer priva +diff --git a/hw/dmx/input/Makefile.am b/hw/dmx/input/Makefile.am +index da8de05..1969a0c 100644 +--- a/hw/dmx/input/Makefile.am ++++ b/hw/dmx/input/Makefile.am +@@ -65,6 +65,7 @@ AM_CFLAGS = $(DIX_CFLAGS) \ + -I$(top_srcdir)/hw/xfree86/common \ + $(GLX_INCS) \ + -DHAVE_DMX_CONFIG_H \ ++ -DDMXVNC=1 \ + $(GLX_DEFS) \ + @DMXMODULES_CFLAGS@ + +diff --git a/hw/dmx/input/dmxcommon.c b/hw/dmx/input/dmxcommon.c +index e77bb79..0866c84 100644 +--- a/hw/dmx/input/dmxcommon.c ++++ b/hw/dmx/input/dmxcommon.c +@@ -655,7 +655,6 @@ void dmxCommonRestoreState(pointer private) dmxLogInput(dmxInput, "Keyboard busy, waiting\n"); else dmxLogInput(dmxInput, "Keyboard error, waiting\n"); @@ -198,10 +267,11 @@ diff -pNur xorg-server-1.4.orig/hw/dmx/input/dmxcommon.c xorg-server-1.4/hw/dmx/ /* Don't generate X11 protocol for a bit */ for (tmp = GetTimeInMillis(); GetTimeInMillis() - tmp < 250;) { usleep(250); /* This ends up sleeping only until -diff -pNur xorg-server-1.4.orig/hw/dmx/input/dmxinputinit.c xorg-server-1.4/hw/dmx/input/dmxinputinit.c ---- xorg-server-1.4.orig/hw/dmx/input/dmxinputinit.c 2007-08-23 12:04:52.000000000 -0700 -+++ xorg-server-1.4/hw/dmx/input/dmxinputinit.c 2007-09-06 16:09:45.000000000 -0700 -@@ -393,6 +393,10 @@ static int dmxKeyboardOn(DeviceIntPtr pD +diff --git a/hw/dmx/input/dmxinputinit.c b/hw/dmx/input/dmxinputinit.c +index fd4eeaa..7de9546 100644 +--- a/hw/dmx/input/dmxinputinit.c ++++ b/hw/dmx/input/dmxinputinit.c +@@ -393,6 +393,10 @@ static int dmxKeyboardOn(DeviceIntPtr pDevice, DMXLocalInitInfo *info) DevicePtr pDev = &pDevice->public; #endif @@ -212,7 +282,7 @@ diff -pNur xorg-server-1.4.orig/hw/dmx/input/dmxinputinit.c xorg-server-1.4/hw/d #ifdef XKB if (noXkbExtension) { #endif -@@ -480,6 +484,10 @@ static int dmxDeviceOnOff(DeviceIntPtr p +@@ -480,6 +484,10 @@ static int dmxDeviceOnOff(DeviceIntPtr pDevice, int what) break; } if (info.keyClass) { @@ -223,7 +293,7 @@ diff -pNur xorg-server-1.4.orig/hw/dmx/input/dmxinputinit.c xorg-server-1.4/hw/d #if 00 /*BP*/ InitKeyClassDeviceStruct(pDevice, &info.keySyms, info.modMap); #else -@@ -534,6 +542,9 @@ static int dmxDeviceOnOff(DeviceIntPtr p +@@ -534,6 +542,9 @@ static int dmxDeviceOnOff(DeviceIntPtr pDevice, int what) info.maxres[i+1]); #endif } @@ -233,10 +303,11 @@ diff -pNur xorg-server-1.4.orig/hw/dmx/input/dmxinputinit.c xorg-server-1.4/hw/d } if (info.focusClass) InitFocusClassDeviceStruct(pDevice); #ifdef XINPUT -diff -pNur xorg-server-1.4.orig/hw/dmx/input/dmxinputinit.h xorg-server-1.4/hw/dmx/input/dmxinputinit.h ---- xorg-server-1.4.orig/hw/dmx/input/dmxinputinit.h 2007-08-23 12:04:52.000000000 -0700 -+++ xorg-server-1.4/hw/dmx/input/dmxinputinit.h 2007-09-06 16:09:45.000000000 -0700 -@@ -290,4 +290,9 @@ extern int dmxInputAttachConsol +diff --git a/hw/dmx/input/dmxinputinit.h b/hw/dmx/input/dmxinputinit.h +index 6f491ed..e6297f0 100644 +--- a/hw/dmx/input/dmxinputinit.h ++++ b/hw/dmx/input/dmxinputinit.h +@@ -290,4 +290,9 @@ extern int dmxInputAttachConsole(const char *name, int isCore, extern int dmxInputAttachBackend(int physicalScreen, int isCore, int *id); @@ -246,20 +317,53 @@ diff -pNur xorg-server-1.4.orig/hw/dmx/input/dmxinputinit.h xorg-server-1.4/hw/d +#endif + #endif -diff -pNur xorg-server-1.4.orig/hw/dmx/input/Makefile.am xorg-server-1.4/hw/dmx/input/Makefile.am ---- xorg-server-1.4.orig/hw/dmx/input/Makefile.am 2007-08-23 12:04:52.000000000 -0700 -+++ xorg-server-1.4/hw/dmx/input/Makefile.am 2007-09-06 16:09:45.000000000 -0700 -@@ -65,6 +65,7 @@ AM_CFLAGS = $(DIX_CFLAGS) \ - -I$(top_srcdir)/hw/xfree86/common \ - $(GLX_INCS) \ - -DHAVE_DMX_CONFIG_H \ -+ -DDMXVNC=1 \ - $(GLX_DEFS) \ - @DMXMODULES_CFLAGS@ - -diff -pNur xorg-server-1.4.orig/hw/dmx/vnc/Makefile.am xorg-server-1.4/hw/dmx/vnc/Makefile.am ---- xorg-server-1.4.orig/hw/dmx/vnc/Makefile.am 1969-12-31 16:00:00.000000000 -0800 -+++ xorg-server-1.4/hw/dmx/vnc/Makefile.am 2007-09-06 16:09:45.000000000 -0700 +diff --git a/hw/dmx/vnc/.gitignore b/hw/dmx/vnc/.gitignore +new file mode 100644 +index 0000000..d14621f +--- /dev/null ++++ b/hw/dmx/vnc/.gitignore +@@ -0,0 +1,36 @@ ++auth.c ++cmap.c ++corre.c ++cursor.c ++cutpaste.c ++d3des.c ++d3des.h ++dispcur.c ++draw.c ++hextile.c ++httpd.c ++kbdptr.c ++keyboard.h ++loginauth.c ++rdp.c ++rfb.h ++rfbkeyb.c ++rfbmouse.c ++rfbproto.h ++rfbserver.c ++rre.c ++sockets.c ++sprite.c ++sprite.h ++spritest.h ++stats.c ++tableinitcmtemplate.c ++tableinittctemplate.c ++tabletranstemplate.c ++tight.c ++translate.c ++vncauth.c ++vncauth.h ++vncext.c ++xistubs.c ++zlib.c +diff --git a/hw/dmx/vnc/Makefile.am b/hw/dmx/vnc/Makefile.am +new file mode 100644 +index 0000000..48c07bd +--- /dev/null ++++ b/hw/dmx/vnc/Makefile.am @@ -0,0 +1,43 @@ +noinst_LIBRARIES = libdmxvnc.a + @@ -304,9 +408,11 @@ diff -pNur xorg-server-1.4.orig/hw/dmx/vnc/Makefile.am xorg-server-1.4/hw/dmx/vn + @DMXMODULES_CFLAGS@ + +###EXTRA_DIST = dmxdetach.c -diff -pNur xorg-server-1.4.orig/hw/dmx/vnc/vncInit.c xorg-server-1.4/hw/dmx/vnc/vncInit.c ---- xorg-server-1.4.orig/hw/dmx/vnc/vncInit.c 1969-12-31 16:00:00.000000000 -0800 -+++ xorg-server-1.4/hw/dmx/vnc/vncInit.c 2007-09-06 16:09:45.000000000 -0700 +diff --git a/hw/dmx/vnc/vncInit.c b/hw/dmx/vnc/vncInit.c +new file mode 100644 +index 0000000..5fdf647 +--- /dev/null ++++ b/hw/dmx/vnc/vncInit.c @@ -0,0 +1,453 @@ +/* + * Copyright (C) 2002 Alan Hourihane. All Rights Reserved. @@ -761,9 +867,11 @@ diff -pNur xorg-server-1.4.orig/hw/dmx/vnc/vncInit.c xorg-server-1.4/hw/dmx/vnc/ + rfbCheckFds(pScreen); + httpCheckFds(pScreen); +} -diff -pNur xorg-server-1.4.orig/hw/dmx/vnc/vncint.h xorg-server-1.4/hw/dmx/vnc/vncint.h ---- xorg-server-1.4.orig/hw/dmx/vnc/vncint.h 1969-12-31 16:00:00.000000000 -0800 -+++ xorg-server-1.4/hw/dmx/vnc/vncint.h 2007-09-06 16:09:45.000000000 -0700 +diff --git a/hw/dmx/vnc/vncint.h b/hw/dmx/vnc/vncint.h +new file mode 100644 +index 0000000..afa84f8 +--- /dev/null ++++ b/hw/dmx/vnc/vncint.h @@ -0,0 +1,153 @@ +/* + * Copyright (C) 2002 Alan Hourihane. All Rights Reserved. @@ -918,9 +1026,437 @@ diff -pNur xorg-server-1.4.orig/hw/dmx/vnc/vncint.h xorg-server-1.4/hw/dmx/vnc/v + +#endif /* _VNCINT_H_ */ + -diff -pNur xorg-server-1.4.orig/hw/vnc/auth.c xorg-server-1.4/hw/vnc/auth.c ---- xorg-server-1.4.orig/hw/vnc/auth.c 1969-12-31 16:00:00.000000000 -0800 -+++ xorg-server-1.4/hw/vnc/auth.c 2007-09-06 16:09:45.000000000 -0700 +diff --git a/hw/vnc/LICENCE.TXT b/hw/vnc/LICENCE.TXT +new file mode 100644 +index 0000000..ae3b531 +--- /dev/null ++++ b/hw/vnc/LICENCE.TXT +@@ -0,0 +1,340 @@ ++ GNU GENERAL PUBLIC LICENSE ++ Version 2, June 1991 ++ ++ Copyright (C) 1989, 1991 Free Software Foundation, Inc. ++ 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA ++ Everyone is permitted to copy and distribute verbatim copies ++ of this license document, but changing it is not allowed. ++ ++ Preamble ++ ++ The licenses for most software are designed to take away your ++freedom to share and change it. By contrast, the GNU General Public ++License is intended to guarantee your freedom to share and change free ++software--to make sure the software is free for all its users. This ++General Public License applies to most of the Free Software ++Foundation's software and to any other program whose authors commit to ++using it. (Some other Free Software Foundation software is covered by ++the GNU Library General Public License instead.) You can apply it to ++your programs, too. ++ ++ When we speak of free software, we are referring to freedom, not ++price. Our General Public Licenses are designed to make sure that you ++have the freedom to distribute copies of free software (and charge for ++this service if you wish), that you receive source code or can get it ++if you want it, that you can change the software or use pieces of it ++in new free programs; and that you know you can do these things. ++ ++ To protect your rights, we need to make restrictions that forbid ++anyone to deny you these rights or to ask you to surrender the rights. ++These restrictions translate to certain responsibilities for you if you ++distribute copies of the software, or if you modify it. ++ ++ For example, if you distribute copies of such a program, whether ++gratis or for a fee, you must give the recipients all the rights that ++you have. You must make sure that they, too, receive or can get the ++source code. And you must show them these terms so they know their ++rights. ++ ++ We protect your rights with two steps: (1) copyright the software, and ++(2) offer you this license which gives you legal permission to copy, ++distribute and/or modify the software. ++ ++ Also, for each author's protection and ours, we want to make certain ++that everyone understands that there is no warranty for this free ++software. If the software is modified by someone else and passed on, we ++want its recipients to know that what they have is not the original, so ++that any problems introduced by others will not reflect on the original ++authors' reputations. ++ ++ Finally, any free program is threatened constantly by software ++patents. We wish to avoid the danger that redistributors of a free ++program will individually obtain patent licenses, in effect making the ++program proprietary. To prevent this, we have made it clear that any ++patent must be licensed for everyone's free use or not licensed at all. ++ ++ The precise terms and conditions for copying, distribution and ++modification follow. ++ ++ GNU GENERAL PUBLIC LICENSE ++ TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION ++ ++ 0. This License applies to any program or other work which contains ++a notice placed by the copyright holder saying it may be distributed ++under the terms of this General Public License. The "Program", below, ++refers to any such program or work, and a "work based on the Program" ++means either the Program or any derivative work under copyright law: ++that is to say, a work containing the Program or a portion of it, ++either verbatim or with modifications and/or translated into another ++language. (Hereinafter, translation is included without limitation in ++the term "modification".) Each licensee is addressed as "you". ++ ++Activities other than copying, distribution and modification are not ++covered by this License; they are outside its scope. The act of ++running the Program is not restricted, and the output from the Program ++is covered only if its contents constitute a work based on the ++Program (independent of having been made by running the Program). ++Whether that is true depends on what the Program does. ++ ++ 1. You may copy and distribute verbatim copies of the Program's ++source code as you receive it, in any medium, provided that you ++conspicuously and appropriately publish on each copy an appropriate ++copyright notice and disclaimer of warranty; keep intact all the ++notices that refer to this License and to the absence of any warranty; ++and give any other recipients of the Program a copy of this License ++along with the Program. ++ ++You may charge a fee for the physical act of transferring a copy, and ++you may at your option offer warranty protection in exchange for a fee. ++ ++ 2. You may modify your copy or copies of the Program or any portion ++of it, thus forming a work based on the Program, and copy and ++distribute such modifications or work under the terms of Section 1 ++above, provided that you also meet all of these conditions: ++ ++ a) You must cause the modified files to carry prominent notices ++ stating that you changed the files and the date of any change. ++ ++ b) You must cause any work that you distribute or publish, that in ++ whole or in part contains or is derived from the Program or any ++ part thereof, to be licensed as a whole at no charge to all third ++ parties under the terms of this License. ++ ++ c) If the modified program normally reads commands interactively ++ when run, you must cause it, when started running for such ++ interactive use in the most ordinary way, to print or display an ++ announcement including an appropriate copyright notice and a ++ notice that there is no warranty (or else, saying that you provide ++ a warranty) and that users may redistribute the program under ++ these conditions, and telling the user how to view a copy of this ++ License. (Exception: if the Program itself is interactive but ++ does not normally print such an announcement, your work based on ++ the Program is not required to print an announcement.) ++ ++These requirements apply to the modified work as a whole. If ++identifiable sections of that work are not derived from the Program, ++and can be reasonably considered independent and separate works in ++themselves, then this License, and its terms, do not apply to those ++sections when you distribute them as separate works. But when you ++distribute the same sections as part of a whole which is a work based ++on the Program, the distribution of the whole must be on the terms of ++this License, whose permissions for other licensees extend to the ++entire whole, and thus to each and every part regardless of who wrote it. ++ ++Thus, it is not the intent of this section to claim rights or contest ++your rights to work written entirely by you; rather, the intent is to ++exercise the right to control the distribution of derivative or ++collective works based on the Program. ++ ++In addition, mere aggregation of another work not based on the Program ++with the Program (or with a work based on the Program) on a volume of ++a storage or distribution medium does not bring the other work under ++the scope of this License. ++ ++ 3. You may copy and distribute the Program (or a work based on it, ++under Section 2) in object code or executable form under the terms of ++Sections 1 and 2 above provided that you also do one of the following: ++ ++ a) Accompany it with the complete corresponding machine-readable ++ source code, which must be distributed under the terms of Sections ++ 1 and 2 above on a medium customarily used for software interchange; or, ++ ++ b) Accompany it with a written offer, valid for at least three ++ years, to give any third party, for a charge no more than your ++ cost of physically performing source distribution, a complete ++ machine-readable copy of the corresponding source code, to be ++ distributed under the terms of Sections 1 and 2 above on a medium ++ customarily used for software interchange; or, ++ ++ c) Accompany it with the information you received as to the offer ++ to distribute corresponding source code. (This alternative is ++ allowed only for noncommercial distribution and only if you ++ received the program in object code or executable form with such ++ an offer, in accord with Subsection b above.) ++ ++The source code for a work means the preferred form of the work for ++making modifications to it. For an executable work, complete source ++code means all the source code for all modules it contains, plus any ++associated interface definition files, plus the scripts used to ++control compilation and installation of the executable. However, as a ++special exception, the source code distributed need not include ++anything that is normally distributed (in either source or binary ++form) with the major components (compiler, kernel, and so on) of the ++operating system on which the executable runs, unless that component ++itself accompanies the executable. ++ ++If distribution of executable or object code is made by offering ++access to copy from a designated place, then offering equivalent ++access to copy the source code from the same place counts as ++distribution of the source code, even though third parties are not ++compelled to copy the source along with the object code. ++ ++ 4. You may not copy, modify, sublicense, or distribute the Program ++except as expressly provided under this License. Any attempt ++otherwise to copy, modify, sublicense or distribute the Program is ++void, and will automatically terminate your rights under this License. ++However, parties who have received copies, or rights, from you under ++this License will not have their licenses terminated so long as such ++parties remain in full compliance. ++ ++ 5. You are not required to accept this License, since you have not ++signed it. However, nothing else grants you permission to modify or ++distribute the Program or its derivative works. These actions are ++prohibited by law if you do not accept this License. Therefore, by ++modifying or distributing the Program (or any work based on the ++Program), you indicate your acceptance of this License to do so, and ++all its terms and conditions for copying, distributing or modifying ++the Program or works based on it. ++ ++ 6. Each time you redistribute the Program (or any work based on the ++Program), the recipient automatically receives a license from the ++original licensor to copy, distribute or modify the Program subject to ++these terms and conditions. You may not impose any further ++restrictions on the recipients' exercise of the rights granted herein. ++You are not responsible for enforcing compliance by third parties to ++this License. ++ ++ 7. If, as a consequence of a court judgment or allegation of patent ++infringement or for any other reason (not limited to patent issues), ++conditions are imposed on you (whether by court order, agreement or ++otherwise) that contradict the conditions of this License, they do not ++excuse you from the conditions of this License. If you cannot ++distribute so as to satisfy simultaneously your obligations under this ++License and any other pertinent obligations, then as a consequence you ++may not distribute the Program at all. For example, if a patent ++license would not permit royalty-free redistribution of the Program by ++all those who receive copies directly or indirectly through you, then ++the only way you could satisfy both it and this License would be to ++refrain entirely from distribution of the Program. ++ ++If any portion of this section is held invalid or unenforceable under ++any particular circumstance, the balance of the section is intended to ++apply and the section as a whole is intended to apply in other ++circumstances. ++ ++It is not the purpose of this section to induce you to infringe any ++patents or other property right claims or to contest validity of any ++such claims; this section has the sole purpose of protecting the ++integrity of the free software distribution system, which is ++implemented by public license practices. Many people have made ++generous contributions to the wide range of software distributed ++through that system in reliance on consistent application of that ++system; it is up to the author/donor to decide if he or she is willing ++to distribute software through any other system and a licensee cannot ++impose that choice. ++ ++This section is intended to make thoroughly clear what is believed to ++be a consequence of the rest of this License. ++ ++ 8. If the distribution and/or use of the Program is restricted in ++certain countries either by patents or by copyrighted interfaces, the ++original copyright holder who places the Program under this License ++may add an explicit geographical distribution limitation excluding ++those countries, so that distribution is permitted only in or among ++countries not thus excluded. In such case, this License incorporates ++the limitation as if written in the body of this License. ++ ++ 9. The Free Software Foundation may publish revised and/or new versions ++of the General Public License from time to time. Such new versions will ++be similar in spirit to the present version, but may differ in detail to ++address new problems or concerns. ++ ++Each version is given a distinguishing version number. If the Program ++specifies a version number of this License which applies to it and "any ++later version", you have the option of following the terms and conditions ++either of that version or of any later version published by the Free ++Software Foundation. If the Program does not specify a version number of ++this License, you may choose any version ever published by the Free Software ++Foundation. ++ ++ 10. If you wish to incorporate parts of the Program into other free ++programs whose distribution conditions are different, write to the author ++to ask for permission. For software which is copyrighted by the Free ++Software Foundation, write to the Free Software Foundation; we sometimes ++make exceptions for this. Our decision will be guided by the two goals ++of preserving the free status of all derivatives of our free software and ++of promoting the sharing and reuse of software generally. ++ ++ NO WARRANTY ++ ++ 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY ++FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN ++OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES ++PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED ++OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF ++MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS ++TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE ++PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, ++REPAIR OR CORRECTION. ++ ++ 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING ++WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR ++REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, ++INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING ++OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED ++TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY ++YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER ++PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE ++POSSIBILITY OF SUCH DAMAGES. ++ ++ END OF TERMS AND CONDITIONS ++ ++ Appendix: How to Apply These Terms to Your New Programs ++ ++ If you develop a new program, and you want it to be of the greatest ++possible use to the public, the best way to achieve this is to make it ++free software which everyone can redistribute and change under these terms. ++ ++ To do so, attach the following notices to the program. It is safest ++to attach them to the start of each source file to most effectively ++convey the exclusion of warranty; and each file should have at least ++the "copyright" line and a pointer to where the full notice is found. ++ ++ ++ Copyright (C) 19yy ++ ++ This program is free software; you can redistribute it and/or modify ++ it under the terms of the GNU General Public License as published by ++ the Free Software Foundation; either version 2 of the License, or ++ (at your option) any later version. ++ ++ This program is distributed in the hope that it will be useful, ++ but WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++ GNU General Public License for more details. ++ ++ You should have received a copy of the GNU General Public License ++ along with this program; if not, write to the Free Software ++ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, ++ USA. ++ ++Also add information on how to contact you by electronic and paper mail. ++ ++If the program is interactive, make it output a short notice like this ++when it starts in an interactive mode: ++ ++ Gnomovision version 69, Copyright (C) 19yy name of author ++ Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. ++ This is free software, and you are welcome to redistribute it ++ under certain conditions; type `show c' for details. ++ ++The hypothetical commands `show w' and `show c' should show the appropriate ++parts of the General Public License. Of course, the commands you use may ++be called something other than `show w' and `show c'; they could even be ++mouse-clicks or menu items--whatever suits your program. ++ ++You should also get your employer (if you work as a programmer) or your ++school, if any, to sign a "copyright disclaimer" for the program, if ++necessary. Here is a sample; alter the names: ++ ++ Yoyodyne, Inc., hereby disclaims all copyright interest in the program ++ `Gnomovision' (which makes passes at compilers) written by James Hacker. ++ ++ , 1 April 1989 ++ Ty Coon, President of Vice ++ ++This General Public License does not permit incorporating your program into ++proprietary programs. If your program is a subroutine library, you may ++consider it more useful to permit linking proprietary applications with the ++library. If this is what you want to do, use the GNU Library General ++Public License instead of this License. +diff --git a/hw/vnc/Makefile.am b/hw/vnc/Makefile.am +new file mode 100644 +index 0000000..9bf90ec +--- /dev/null ++++ b/hw/vnc/Makefile.am +@@ -0,0 +1,54 @@ ++# XXX This Makefile.am probably needs some work. ++ ++bin_PROGRAMS = Xvnc ++ ++Xvnc_SOURCES = \ ++ $(top_srcdir)/fb/fbcmap_mi.c \ ++ $(top_srcdir)/mi/miinitext.c \ ++ auth.c \ ++ cmap.c \ ++ corre.c \ ++ cursor.c \ ++ cutpaste.c \ ++ d3des.c \ ++ dispcur.c \ ++ dpmsstubs.c \ ++ draw.c \ ++ hextile.c \ ++ httpd.c \ ++ init.c \ ++ kbdptr.c \ ++ loginauth.c \ ++ rfbkeyb.c \ ++ rfbmouse.c \ ++ rfbserver.c \ ++ rre.c \ ++ sprite.c \ ++ sockets.c \ ++ stats.c \ ++ tight.c \ ++ translate.c \ ++ vncauth.c \ ++ vncext.c \ ++ xistubs.c \ ++ zlib.c ++ ++ ++JPEG_LIBS = -ljpeg ++CRYPT_LIBS = -lcrypt ++FB_LIBS = ../../fb/.libs/libfb.a ++ ++AM_CFLAGS = $(DIX_CFLAGS) $(XVNC_CFLAGS) -I$(top_srcdir)/hw/dmx/vnc -DCHROMIUM=1 ++ ++Xvnc_LDFLAGS = $(LD_EXPORT_SYMBOLS_FLAG) ++Xvnc_LDADD = \ ++ $(XORG_CORE_LIBS) \ ++ $(XVNC_LIBS) \ ++ $(JPEG_LIBS) \ ++ $(CRYPT_LIBS) \ ++ $(XSERVER_SYS_LIBS) \ ++ $(VNCMODULES_LIBS) ++ ++ ++relink: ++ rm -f Xvnc && $(MAKE) Xvnc +diff --git a/hw/vnc/README b/hw/vnc/README +new file mode 100644 +index 0000000..d65d560 +--- /dev/null ++++ b/hw/vnc/README +@@ -0,0 +1,14 @@ ++ ++This is the directory containing the code specific to the TightVNC X server (Xvnc). ++Note that within this directory the name RFB is still used instead of VNC. ++ ++NOTE: ++ ++The is the new XFree86 v4 architecture VNC server code. ++ ++Modified entirely by Alan Hourihane ++ ++For information please visit http://xf4vnc.sourceforge.net ++ ++Moved to X.org modular tree by Brian Paul. ++ +diff --git a/hw/vnc/auth.c b/hw/vnc/auth.c +new file mode 100644 +index 0000000..f91a1ed +--- /dev/null ++++ b/hw/vnc/auth.c @@ -0,0 +1,566 @@ +/* + * auth.c - deal with authentication. @@ -1488,9 +2024,11 @@ diff -pNur xorg-server-1.4.orig/hw/vnc/auth.c xorg-server-1.4/hw/vnc/auth.c + return pVNC->rfbAuthTooManyTries; +} + -diff -pNur xorg-server-1.4.orig/hw/vnc/cmap.c xorg-server-1.4/hw/vnc/cmap.c ---- xorg-server-1.4.orig/hw/vnc/cmap.c 1969-12-31 16:00:00.000000000 -0800 -+++ xorg-server-1.4/hw/vnc/cmap.c 2007-09-06 16:09:45.000000000 -0700 +diff --git a/hw/vnc/cmap.c b/hw/vnc/cmap.c +new file mode 100644 +index 0000000..2e4514a +--- /dev/null ++++ b/hw/vnc/cmap.c @@ -0,0 +1,166 @@ +/* + * cmap.c @@ -1658,9 +2196,11 @@ diff -pNur xorg-server-1.4.orig/hw/vnc/cmap.c xorg-server-1.4/hw/vnc/cmap.c + pmap->pScreen->StoreColors = rfbStoreColors; +#endif +} -diff -pNur xorg-server-1.4.orig/hw/vnc/corre.c xorg-server-1.4/hw/vnc/corre.c ---- xorg-server-1.4.orig/hw/vnc/corre.c 1969-12-31 16:00:00.000000000 -0800 -+++ xorg-server-1.4/hw/vnc/corre.c 2007-09-06 16:09:45.000000000 -0700 +diff --git a/hw/vnc/corre.c b/hw/vnc/corre.c +new file mode 100644 +index 0000000..1a9b4d5 +--- /dev/null ++++ b/hw/vnc/corre.c @@ -0,0 +1,353 @@ +/* + * corre.c @@ -2015,9 +2555,11 @@ diff -pNur xorg-server-1.4.orig/hw/vnc/corre.c xorg-server-1.4/hw/vnc/corre.c + + return maxclr; +} -diff -pNur xorg-server-1.4.orig/hw/vnc/cursor.c xorg-server-1.4/hw/vnc/cursor.c ---- xorg-server-1.4.orig/hw/vnc/cursor.c 1969-12-31 16:00:00.000000000 -0800 -+++ xorg-server-1.4/hw/vnc/cursor.c 2007-09-06 16:09:45.000000000 -0700 +diff --git a/hw/vnc/cursor.c b/hw/vnc/cursor.c +new file mode 100644 +index 0000000..d355e03 +--- /dev/null ++++ b/hw/vnc/cursor.c @@ -0,0 +1,407 @@ +/* + * cursor.c - support for cursor shape updates. @@ -2426,10 +2968,12 @@ diff -pNur xorg-server-1.4.orig/hw/vnc/cursor.c xorg-server-1.4/hw/vnc/cursor.c +DEFINE_RICH_ENCODE(16) +DEFINE_RICH_ENCODE(32) + -diff -pNur xorg-server-1.4.orig/hw/vnc/cutpaste.c xorg-server-1.4/hw/vnc/cutpaste.c ---- xorg-server-1.4.orig/hw/vnc/cutpaste.c 1969-12-31 16:00:00.000000000 -0800 -+++ xorg-server-1.4/hw/vnc/cutpaste.c 2007-09-06 16:09:45.000000000 -0700 -@@ -0,0 +1,90 @@ +diff --git a/hw/vnc/cutpaste.c b/hw/vnc/cutpaste.c +new file mode 100644 +index 0000000..6f57aca +--- /dev/null ++++ b/hw/vnc/cutpaste.c +@@ -0,0 +1,87 @@ +/* + * cutpaste.c - routines to deal with cut & paste buffers / selection. + * @@ -2483,32 +3027,29 @@ diff -pNur xorg-server-1.4.orig/hw/vnc/cutpaste.c xorg-server-1.4/hw/vnc/cutpast +rfbSetXCutText(char *str, int len) +{ + int i = 0; ++ Selection *pSel; + + inSetXCutText = TRUE; + ChangeWindowProperty(WindowTable[0], XA_CUT_BUFFER0, XA_STRING, + 8, PropModeReplace, len, + (pointer)str, TRUE); + -+ while ((i < NumCurrentSelections) && -+ CurrentSelections[i].selection != XA_PRIMARY) -+ i++; -+ -+ if (i < NumCurrentSelections) { ++ if (dixLookupSelection(&pSel, XA_PRIMARY, serverClient, DixSetAttrAccess)) { + xEvent event; + -+ if (CurrentSelections[i].client) { ++ if (pSel->client) { + event.u.u.type = SelectionClear; + event.u.selectionClear.time = GetTimeInMillis(); -+ event.u.selectionClear.window = CurrentSelections[i].window; -+ event.u.selectionClear.atom = CurrentSelections[i].selection; -+ (void) TryClientEvents (CurrentSelections[i].client, &event, 1, ++ event.u.selectionClear.window = pSel->window; ++ event.u.selectionClear.atom = pSel->selection; ++ (void) TryClientEvents (pSel->client, &event, 1, + NoEventMask, NoEventMask /* CantBeFiltered */, + NullGrab); + } + -+ CurrentSelections[i].window = None; -+ CurrentSelections[i].pWin = NULL; -+ CurrentSelections[i].client = NullClient; ++ pSel->window = None; ++ pSel->pWin = NULL; ++ pSel->client = NullClient; + } + + inSetXCutText = FALSE; @@ -2520,9 +3061,11 @@ diff -pNur xorg-server-1.4.orig/hw/vnc/cutpaste.c xorg-server-1.4/hw/vnc/cutpast + if (!inSetXCutText) + rfbSendServerCutText(str, len); +} -diff -pNur xorg-server-1.4.orig/hw/vnc/d3des.c xorg-server-1.4/hw/vnc/d3des.c ---- xorg-server-1.4.orig/hw/vnc/d3des.c 1969-12-31 16:00:00.000000000 -0800 -+++ xorg-server-1.4/hw/vnc/d3des.c 2007-09-06 16:09:45.000000000 -0700 +diff --git a/hw/vnc/d3des.c b/hw/vnc/d3des.c +new file mode 100644 +index 0000000..a4e145f +--- /dev/null ++++ b/hw/vnc/d3des.c @@ -0,0 +1,437 @@ +/* + * This is D3DES (V5.09) by Richard Outerbridge with the double and @@ -2961,9 +3504,11 @@ diff -pNur xorg-server-1.4.orig/hw/vnc/d3des.c xorg-server-1.4/hw/vnc/d3des.c + * + * d3des V5.0a rwo 9208.07 18:44 Graven Imagery + **********************************************************************/ -diff -pNur xorg-server-1.4.orig/hw/vnc/d3des.h xorg-server-1.4/hw/vnc/d3des.h ---- xorg-server-1.4.orig/hw/vnc/d3des.h 1969-12-31 16:00:00.000000000 -0800 -+++ xorg-server-1.4/hw/vnc/d3des.h 2007-09-06 16:09:45.000000000 -0700 +diff --git a/hw/vnc/d3des.h b/hw/vnc/d3des.h +new file mode 100644 +index 0000000..ea3da44 +--- /dev/null ++++ b/hw/vnc/d3des.h @@ -0,0 +1,51 @@ +/* + * This is D3DES (V5.09) by Richard Outerbridge with the double and @@ -3016,10 +3561,12 @@ diff -pNur xorg-server-1.4.orig/hw/vnc/d3des.h xorg-server-1.4/hw/vnc/d3des.h + +/* d3des.h V5.09 rwo 9208.04 15:06 Graven Imagery + ********************************************************************/ -diff -pNur xorg-server-1.4.orig/hw/vnc/dispcur.c xorg-server-1.4/hw/vnc/dispcur.c ---- xorg-server-1.4.orig/hw/vnc/dispcur.c 1969-12-31 16:00:00.000000000 -0800 -+++ xorg-server-1.4/hw/vnc/dispcur.c 2007-09-06 16:09:45.000000000 -0700 -@@ -0,0 +1,791 @@ +diff --git a/hw/vnc/dispcur.c b/hw/vnc/dispcur.c +new file mode 100644 +index 0000000..0ccf0a7 +--- /dev/null ++++ b/hw/vnc/dispcur.c +@@ -0,0 +1,792 @@ +/* + * dispcur.c + * @@ -3096,8 +3643,7 @@ diff -pNur xorg-server-1.4.orig/hw/vnc/dispcur.c xorg-server-1.4/hw/vnc/dispcur. + +/* per-screen private data */ + -+static int rfbDCScreenIndex; -+static unsigned long rfbDCGeneration = 0; ++static DevPrivateKey rfbDCScreenKey = &rfbDCScreenKey; + +static Bool rfbDCCloseScreen(int index, ScreenPtr pScreen); + @@ -3157,13 +3703,6 @@ diff -pNur xorg-server-1.4.orig/hw/vnc/dispcur.c xorg-server-1.4/hw/vnc/dispcur. +{ + rfbDCScreenPtr pScreenPriv; + -+ if (rfbDCGeneration != serverGeneration) -+ { -+ rfbDCScreenIndex = AllocateScreenPrivateIndex (); -+ if (rfbDCScreenIndex < 0) -+ return FALSE; -+ rfbDCGeneration = serverGeneration; -+ } + pScreenPriv = (rfbDCScreenPtr) xalloc (sizeof (rfbDCScreenRec)); + if (!pScreenPriv) + return FALSE; @@ -3189,7 +3728,7 @@ diff -pNur xorg-server-1.4.orig/hw/vnc/dispcur.c xorg-server-1.4/hw/vnc/dispcur. + pScreenPriv->CloseScreen = pScreen->CloseScreen; + pScreen->CloseScreen = rfbDCCloseScreen; + -+ pScreen->devPrivates[rfbDCScreenIndex].ptr = (pointer) pScreenPriv; ++ dixSetPrivate(&pScreen->devPrivates, rfbDCScreenKey, pScreenPriv); + + if (!rfbSpriteInitialize (pScreen, &rfbDCFuncs, screenFuncs)) + { @@ -3209,7 +3748,8 @@ diff -pNur xorg-server-1.4.orig/hw/vnc/dispcur.c xorg-server-1.4/hw/vnc/dispcur. +{ + rfbDCScreenPtr pScreenPriv; + -+ pScreenPriv = (rfbDCScreenPtr) pScreen->devPrivates[rfbDCScreenIndex].ptr; ++ pScreenPriv = (rfbDCScreenPtr)dixLookupPrivate(&pScreen->devPrivates, ++ rfbDCScreenKey); + pScreen->CloseScreen = pScreenPriv->CloseScreen; + tossGC (pScreenPriv->pSourceGC); + tossGC (pScreenPriv->pMaskGC); @@ -3234,7 +3774,7 @@ diff -pNur xorg-server-1.4.orig/hw/vnc/dispcur.c xorg-server-1.4/hw/vnc/dispcur. + CursorPtr pCursor; +{ + if (pCursor->bits->refcnt <= 1) -+ pCursor->bits->devPriv[pScreen->myNum] = (pointer)NULL; ++ dixSetPrivate(&pCursor->bits->devPrivates, pScreen, NULL); + return TRUE; +} + @@ -3305,7 +3845,7 @@ diff -pNur xorg-server-1.4.orig/hw/vnc/dispcur.c xorg-server-1.4/hw/vnc/dispcur. + pPriv->sourceBits = 0; + pPriv->maskBits = 0; + pPixmap = (*pScreen->CreatePixmap) (pScreen, pCursor->bits->width, -+ pCursor->bits->height, 32); ++ pCursor->bits->height, 32, 0); + if (!pPixmap) + { + xfree ((pointer) pPriv); @@ -3332,25 +3872,25 @@ diff -pNur xorg-server-1.4.orig/hw/vnc/dispcur.c xorg-server-1.4/hw/vnc/dispcur. + xfree ((pointer) pPriv); + return (rfbDCCursorPtr)NULL; + } -+ pCursor->bits->devPriv[pScreen->myNum] = (pointer) pPriv; ++ dixSetPrivate(&pCursor->bits->devPrivates, pScreen, pPriv); + return pPriv; + } + pPriv->pPicture = 0; +#endif -+ pPriv->sourceBits = (*pScreen->CreatePixmap) (pScreen, pCursor->bits->width, pCursor->bits->height, 1); ++ pPriv->sourceBits = (*pScreen->CreatePixmap) (pScreen, pCursor->bits->width, pCursor->bits->height, 1, 0); + if (!pPriv->sourceBits) + { + xfree ((pointer) pPriv); + return (rfbDCCursorPtr)NULL; + } -+ pPriv->maskBits = (*pScreen->CreatePixmap) (pScreen, pCursor->bits->width, pCursor->bits->height, 1); ++ pPriv->maskBits = (*pScreen->CreatePixmap) (pScreen, pCursor->bits->width, pCursor->bits->height, 1, 0); + if (!pPriv->maskBits) + { + (*pScreen->DestroyPixmap) (pPriv->sourceBits); + xfree ((pointer) pPriv); + return (rfbDCCursorPtr)NULL; + } -+ pCursor->bits->devPriv[pScreen->myNum] = (pointer) pPriv; ++ dixSetPrivate(&pCursor->bits->devPrivates, pScreen, pPriv); + + /* create the two sets of bits, clipping as appropriate */ + @@ -3396,7 +3936,8 @@ diff -pNur xorg-server-1.4.orig/hw/vnc/dispcur.c xorg-server-1.4/hw/vnc/dispcur. +{ + rfbDCCursorPtr pPriv; + -+ pPriv = (rfbDCCursorPtr) pCursor->bits->devPriv[pScreen->myNum]; ++ pPriv = (rfbDCCursorPtr)dixLookupPrivate(&pCursor->bits->devPrivates, ++ pScreen); + if (pPriv && (pCursor->bits->refcnt <= 1)) + { + if (pPriv->sourceBits) @@ -3408,7 +3949,7 @@ diff -pNur xorg-server-1.4.orig/hw/vnc/dispcur.c xorg-server-1.4/hw/vnc/dispcur. + FreePicture (pPriv->pPicture, 0); +#endif + xfree ((pointer) pPriv); -+ pCursor->bits->devPriv[pScreen->myNum] = (pointer)NULL; ++ dixSetPrivate(&pCursor->bits->devPrivates, pScreen, NULL); + } + return TRUE; +} @@ -3448,7 +3989,7 @@ diff -pNur xorg-server-1.4.orig/hw/vnc/dispcur.c xorg-server-1.4/hw/vnc/dispcur. + gcvals[0] = IncludeInferiors; + gcvals[1] = FALSE; + pGC = CreateGC((DrawablePtr)pWin, -+ GCSubwindowMode|GCGraphicsExposures, gcvals, &status); ++ GCSubwindowMode|GCGraphicsExposures, gcvals, &status, (XID)0, serverClient); + if (pGC && pWin->drawable.pScreen->DrawGuarantee) + (*pWin->drawable.pScreen->DrawGuarantee) (pWin, pGC, GuaranteeVisBack); + *ppGC = pGC; @@ -3466,14 +4007,16 @@ diff -pNur xorg-server-1.4.orig/hw/vnc/dispcur.c xorg-server-1.4/hw/vnc/dispcur. + rfbDCCursorPtr pPriv; + WindowPtr pWin; + -+ pPriv = (rfbDCCursorPtr) pCursor->bits->devPriv[pScreen->myNum]; ++ pPriv = (rfbDCCursorPtr)dixLookupPrivate(&pCursor->bits->devPrivates, ++ pScreen); + if (!pPriv) + { + pPriv = rfbDCRealize(pScreen, pCursor); + if (!pPriv) + return FALSE; + } -+ pScreenPriv = (rfbDCScreenPtr) pScreen->devPrivates[rfbDCScreenIndex].ptr; ++ pScreenPriv = (rfbDCScreenPtr)dixLookupPrivate(&pScreen->devPrivates, ++ rfbDCScreenKey); + pWin = WindowTable[pScreen->myNum]; +#ifdef ARGB_CURSOR + if (pPriv->pPicture) @@ -3518,7 +4061,8 @@ diff -pNur xorg-server-1.4.orig/hw/vnc/dispcur.c xorg-server-1.4/hw/vnc/dispcur. + WindowPtr pWin; + GCPtr pGC; + -+ pScreenPriv = (rfbDCScreenPtr) pScreen->devPrivates[rfbDCScreenIndex].ptr; ++ pScreenPriv = (rfbDCScreenPtr)dixLookupPrivate(&pScreen->devPrivates, ++ rfbDCScreenKey); + pSave = pScreenPriv->pSave; + pWin = WindowTable[pScreen->myNum]; + if (!pSave || pSave->drawable.width < w || pSave->drawable.height < h) @@ -3526,7 +4070,7 @@ diff -pNur xorg-server-1.4.orig/hw/vnc/dispcur.c xorg-server-1.4/hw/vnc/dispcur. + if (pSave) + (*pScreen->DestroyPixmap) (pSave); + pScreenPriv->pSave = pSave = -+ (*pScreen->CreatePixmap) (pScreen, w, h, pScreen->rootDepth); ++ (*pScreen->CreatePixmap) (pScreen, w, h, pScreen->rootDepth, 0); + if (!pSave) + return FALSE; + } @@ -3550,7 +4094,8 @@ diff -pNur xorg-server-1.4.orig/hw/vnc/dispcur.c xorg-server-1.4/hw/vnc/dispcur. + WindowPtr pWin; + GCPtr pGC; + -+ pScreenPriv = (rfbDCScreenPtr) pScreen->devPrivates[rfbDCScreenIndex].ptr; ++ pScreenPriv = (rfbDCScreenPtr)dixLookupPrivate(&pScreen->devPrivates, ++ rfbDCScreenKey); + pSave = pScreenPriv->pSave; + pWin = WindowTable[pScreen->myNum]; + if (!pSave) @@ -3576,7 +4121,8 @@ diff -pNur xorg-server-1.4.orig/hw/vnc/dispcur.c xorg-server-1.4/hw/vnc/dispcur. + GCPtr pGC; + int sourcex, sourcey, destx, desty, copyw, copyh; + -+ pScreenPriv = (rfbDCScreenPtr) pScreen->devPrivates[rfbDCScreenIndex].ptr; ++ pScreenPriv = (rfbDCScreenPtr)dixLookupPrivate(&pScreen->devPrivates, ++ rfbDCScreenKey); + pSave = pScreenPriv->pSave; + pWin = WindowTable[pScreen->myNum]; + /* @@ -3712,14 +4258,16 @@ diff -pNur xorg-server-1.4.orig/hw/vnc/dispcur.c xorg-server-1.4/hw/vnc/dispcur. + XID gcval = FALSE; + PixmapPtr pTemp; + -+ pPriv = (rfbDCCursorPtr) pCursor->bits->devPriv[pScreen->myNum]; ++ pPriv = (rfbDCCursorPtr)dixLookupPrivate(&pCursor->bits->devPrivates, ++ pScreen); + if (!pPriv) + { + pPriv = rfbDCRealize(pScreen, pCursor); + if (!pPriv) + return FALSE; + } -+ pScreenPriv = (rfbDCScreenPtr) pScreen->devPrivates[rfbDCScreenIndex].ptr; ++ pScreenPriv = (rfbDCScreenPtr)dixLookupPrivate(&pScreen->devPrivates, ++ rfbDCScreenKey); + pWin = WindowTable[pScreen->myNum]; + pTemp = pScreenPriv->pTemp; + if (!pTemp || @@ -3736,14 +4284,14 @@ diff -pNur xorg-server-1.4.orig/hw/vnc/dispcur.c xorg-server-1.4/hw/vnc/dispcur. + } +#endif + pScreenPriv->pTemp = pTemp = (*pScreen->CreatePixmap) -+ (pScreen, w, h, pScreenPriv->pSave->drawable.depth); ++ (pScreen, w, h, pScreenPriv->pSave->drawable.depth, 0); + if (!pTemp) + return FALSE; + } + if (!pScreenPriv->pMoveGC) + { + pScreenPriv->pMoveGC = CreateGC ((DrawablePtr)pTemp, -+ GCGraphicsExposures, &gcval, &status); ++ GCGraphicsExposures, &gcval, &status, (XID)0, serverClient); + if (!pScreenPriv->pMoveGC) + return FALSE; + } @@ -3779,14 +4327,14 @@ diff -pNur xorg-server-1.4.orig/hw/vnc/dispcur.c xorg-server-1.4/hw/vnc/dispcur. + if (!pScreenPriv->pPixSourceGC) + { + pScreenPriv->pPixSourceGC = CreateGC ((DrawablePtr)pTemp, -+ GCGraphicsExposures, &gcval, &status); ++ GCGraphicsExposures, &gcval, &status, (XID)0, serverClient); + if (!pScreenPriv->pPixSourceGC) + return FALSE; + } + if (!pScreenPriv->pPixMaskGC) + { + pScreenPriv->pPixMaskGC = CreateGC ((DrawablePtr)pTemp, -+ GCGraphicsExposures, &gcval, &status); ++ GCGraphicsExposures, &gcval, &status, (XID)0, serverClient); + if (!pScreenPriv->pPixMaskGC) + return FALSE; + } @@ -3811,9 +4359,11 @@ diff -pNur xorg-server-1.4.orig/hw/vnc/dispcur.c xorg-server-1.4/hw/vnc/dispcur. + 0, 0, w, h, x, y); + return TRUE; +} -diff -pNur xorg-server-1.4.orig/hw/vnc/dpmsstubs.c xorg-server-1.4/hw/vnc/dpmsstubs.c ---- xorg-server-1.4.orig/hw/vnc/dpmsstubs.c 1969-12-31 16:00:00.000000000 -0800 -+++ xorg-server-1.4/hw/vnc/dpmsstubs.c 2007-09-06 16:09:45.000000000 -0700 +diff --git a/hw/vnc/dpmsstubs.c b/hw/vnc/dpmsstubs.c +new file mode 100644 +index 0000000..48ee545 +--- /dev/null ++++ b/hw/vnc/dpmsstubs.c @@ -0,0 +1,52 @@ +/* $Xorg: dpmsstubs.c,v 1.3 2000/08/17 19:47:56 cpqbld Exp $ */ +/***************************************************************** @@ -3867,10 +4417,12 @@ diff -pNur xorg-server-1.4.orig/hw/vnc/dpmsstubs.c xorg-server-1.4/hw/vnc/dpmsst +{ + +} -diff -pNur xorg-server-1.4.orig/hw/vnc/draw.c xorg-server-1.4/hw/vnc/draw.c ---- xorg-server-1.4.orig/hw/vnc/draw.c 1969-12-31 16:00:00.000000000 -0800 -+++ xorg-server-1.4/hw/vnc/draw.c 2007-09-06 16:09:45.000000000 -0700 -@@ -0,0 +1,2020 @@ +diff --git a/hw/vnc/draw.c b/hw/vnc/draw.c +new file mode 100644 +index 0000000..631aa20 +--- /dev/null ++++ b/hw/vnc/draw.c +@@ -0,0 +1,2021 @@ +/* + * draw.c - drawing routines for the RFB X server. This is a set of + * wrappers around the standard MI/MFB/CFB drawing routines which work out @@ -4174,7 +4726,8 @@ diff -pNur xorg-server-1.4.orig/hw/vnc/draw.c xorg-server-1.4/hw/vnc/draw.c + + SCREEN_PROLOGUE(pGC->pScreen,CreateGC); + -+ pGCPriv = (rfbGCPtr)pGC->devPrivates[rfbGCIndex].ptr; ++ pGCPriv = (rfbGCPtr) ++ dixLookupPrivate(&(pGC)->devPrivates, rfbGCKey); + + ret = (*pScreen->CreateGC) (pGC); + @@ -4496,7 +5049,7 @@ diff -pNur xorg-server-1.4.orig/hw/vnc/draw.c xorg-server-1.4/hw/vnc/draw.c +/****************************************************************************/ + +#define GC_FUNC_PROLOGUE(pGC) \ -+ rfbGCPtr pGCPriv = (rfbGCPtr) (pGC)->devPrivates[rfbGCIndex].ptr; \ ++ rfbGCPtr pGCPriv = (rfbGCPtr)dixLookupPrivate(&(pGC)->devPrivates, rfbGCKey); \ + (pGC)->funcs = pGCPriv->wrapFuncs; \ + if (pGCPriv->wrapOps) \ + (pGC)->ops = pGCPriv->wrapOps; @@ -4619,7 +5172,7 @@ diff -pNur xorg-server-1.4.orig/hw/vnc/draw.c xorg-server-1.4/hw/vnc/draw.c +#define GC_OP_PROLOGUE(pDrawable,pGC) \ + ScreenPtr pScreen = pGC->pScreen; \ + VNCSCREENPTR(pScreen); \ -+ rfbGCPtr pGCPrivate = (rfbGCPtr) (pGC)->devPrivates[rfbGCIndex].ptr; \ ++ rfbGCPtr pGCPrivate = (rfbGCPtr)dixLookupPrivate(&(pGC)->devPrivates, rfbGCKey); \ + GCFuncs *oldFuncs = pGC->funcs; \ + (void) pScreen; /* silence compiler */ \ + (pGC)->funcs = pGCPrivate->wrapFuncs; \ @@ -5891,9 +6444,11 @@ diff -pNur xorg-server-1.4.orig/hw/vnc/draw.c xorg-server-1.4/hw/vnc/draw.c + VNCSCREENPTR(pScreen); + SCHEDULE_FB_UPDATE(pScreen, pVNC); +} -diff -pNur xorg-server-1.4.orig/hw/vnc/hextile.c xorg-server-1.4/hw/vnc/hextile.c ---- xorg-server-1.4.orig/hw/vnc/hextile.c 1969-12-31 16:00:00.000000000 -0800 -+++ xorg-server-1.4/hw/vnc/hextile.c 2007-09-06 16:09:45.000000000 -0700 +diff --git a/hw/vnc/hextile.c b/hw/vnc/hextile.c +new file mode 100644 +index 0000000..eb5e281 +--- /dev/null ++++ b/hw/vnc/hextile.c @@ -0,0 +1,350 @@ +/* + * hextile.c @@ -6245,9 +6800,11 @@ diff -pNur xorg-server-1.4.orig/hw/vnc/hextile.c xorg-server-1.4/hw/vnc/hextile. +DEFINE_SEND_HEXTILES(8) +DEFINE_SEND_HEXTILES(16) +DEFINE_SEND_HEXTILES(32) -diff -pNur xorg-server-1.4.orig/hw/vnc/httpd.c xorg-server-1.4/hw/vnc/httpd.c ---- xorg-server-1.4.orig/hw/vnc/httpd.c 1969-12-31 16:00:00.000000000 -0800 -+++ xorg-server-1.4/hw/vnc/httpd.c 2007-09-06 16:09:45.000000000 -0700 +diff --git a/hw/vnc/httpd.c b/hw/vnc/httpd.c +new file mode 100644 +index 0000000..5f56ad6 +--- /dev/null ++++ b/hw/vnc/httpd.c @@ -0,0 +1,519 @@ +/* + * httpd.c - a simple HTTP server @@ -6768,10 +7325,12 @@ diff -pNur xorg-server-1.4.orig/hw/vnc/httpd.c xorg-server-1.4/hw/vnc/httpd.c + return TRUE; +} + -diff -pNur xorg-server-1.4.orig/hw/vnc/init.c xorg-server-1.4/hw/vnc/init.c ---- xorg-server-1.4.orig/hw/vnc/init.c 1969-12-31 16:00:00.000000000 -0800 -+++ xorg-server-1.4/hw/vnc/init.c 2007-09-06 16:09:45.000000000 -0700 -@@ -0,0 +1,1075 @@ +diff --git a/hw/vnc/init.c b/hw/vnc/init.c +new file mode 100644 +index 0000000..a166358 +--- /dev/null ++++ b/hw/vnc/init.c +@@ -0,0 +1,1078 @@ +/* + * init.c + * @@ -6877,7 +7436,6 @@ diff -pNur xorg-server-1.4.orig/hw/vnc/init.c xorg-server-1.4/hw/vnc/init.c + +static unsigned long VNCGeneration = 0; +rfbScreenInfo rfbScreen; -+int rfbGCIndex; +extern char dispatchExceptionAtReset; + +extern void VncExtensionInit(void); @@ -7265,11 +7823,6 @@ diff -pNur xorg-server-1.4.orig/hw/vnc/init.c xorg-server-1.4/hw/vnc/init.c + for (i = 0; i < numFormats; i++) + screenInfo->formats[i] = formats[i]; + -+ rfbGCIndex = AllocateGCPrivateIndex(); -+ if (rfbGCIndex < 0) { -+ FatalError("InitOutput: AllocateGCPrivateIndex failed\n"); -+ } -+ + /* initialize screen */ + + if (AddScreen(rfbScreenInit, argc, argv) == -1) { @@ -7443,10 +7996,6 @@ diff -pNur xorg-server-1.4.orig/hw/vnc/init.c xorg-server-1.4/hw/vnc/init.c + if (prfb->bitsPerPixel > 4) + fbPictureInit(pScreen, 0, 0); + -+ if (!AllocateGCPrivate(pScreen, rfbGCIndex, sizeof(rfbGCRec))) { -+ FatalError("rfbScreenInit: AllocateGCPrivate failed\n"); -+ } -+ + prfb->cursorIsDrawn = FALSE; + prfb->dontSendFramebufferUpdate = FALSE; + @@ -7601,6 +8150,7 @@ diff -pNur xorg-server-1.4.orig/hw/vnc/init.c xorg-server-1.4/hw/vnc/init.c + KbdDeviceOff(); + break; + case DEVICE_CLOSE: ++ vncSetKeyboardDevice(NULL); + if (pDev->on) + KbdDeviceOff(); + break; @@ -7643,6 +8193,7 @@ diff -pNur xorg-server-1.4.orig/hw/vnc/init.c xorg-server-1.4/hw/vnc/init.c + break; + + case DEVICE_CLOSE: ++ vncSetPointerDevice(NULL); + if (pDev->on) + PtrDeviceOff(); + break; @@ -7819,6 +8370,17 @@ diff -pNur xorg-server-1.4.orig/hw/vnc/init.c xorg-server-1.4/hw/vnc/init.c + /* dummy function called by InitGlobals in os/utils.c */ +} + ++int ++NewInputDeviceRequest(InputOption *options, DeviceIntPtr *pdev) ++{ ++ return BadValue; ++} ++ ++void ++DeleteInputDeviceRequest(DeviceIntPtr dev) ++{ ++} ++ + +/* + * rfbLog prints a time-stamped message to the log file (stderr). @@ -7847,9 +8409,11 @@ diff -pNur xorg-server-1.4.orig/hw/vnc/init.c xorg-server-1.4/hw/vnc/init.c + rfbLog(""); + perror(str); +} -diff -pNur xorg-server-1.4.orig/hw/vnc/kbdptr.c xorg-server-1.4/hw/vnc/kbdptr.c ---- xorg-server-1.4.orig/hw/vnc/kbdptr.c 1969-12-31 16:00:00.000000000 -0800 -+++ xorg-server-1.4/hw/vnc/kbdptr.c 2007-09-06 16:09:45.000000000 -0700 +diff --git a/hw/vnc/kbdptr.c b/hw/vnc/kbdptr.c +new file mode 100644 +index 0000000..de31920 +--- /dev/null ++++ b/hw/vnc/kbdptr.c @@ -0,0 +1,458 @@ +/* + * kbdptr.c - deal with keyboard and pointer device over TCP & UDP. @@ -8309,9 +8873,11 @@ diff -pNur xorg-server-1.4.orig/hw/vnc/kbdptr.c xorg-server-1.4/hw/vnc/kbdptr.c + break; + } +} -diff -pNur xorg-server-1.4.orig/hw/vnc/keyboard.h xorg-server-1.4/hw/vnc/keyboard.h ---- xorg-server-1.4.orig/hw/vnc/keyboard.h 1969-12-31 16:00:00.000000000 -0800 -+++ xorg-server-1.4/hw/vnc/keyboard.h 2007-09-06 16:09:45.000000000 -0700 +diff --git a/hw/vnc/keyboard.h b/hw/vnc/keyboard.h +new file mode 100644 +index 0000000..ab5b1b3 +--- /dev/null ++++ b/hw/vnc/keyboard.h @@ -0,0 +1,167 @@ +/* + * Copyright (C) 2002 Alan Hourihane. All Rights Reserved. @@ -8480,353 +9046,11 @@ diff -pNur xorg-server-1.4.orig/hw/vnc/keyboard.h xorg-server-1.4/hw/vnc/keyboar +}; + +#define N_PREDEFINED_KEYS (sizeof(map) / (sizeof(KeySym) * GLYPHS_PER_KEY)) -diff -pNur xorg-server-1.4.orig/hw/vnc/LICENCE.TXT xorg-server-1.4/hw/vnc/LICENCE.TXT ---- xorg-server-1.4.orig/hw/vnc/LICENCE.TXT 1969-12-31 16:00:00.000000000 -0800 -+++ xorg-server-1.4/hw/vnc/LICENCE.TXT 2007-09-06 16:09:45.000000000 -0700 -@@ -0,0 +1,340 @@ -+ GNU GENERAL PUBLIC LICENSE -+ Version 2, June 1991 -+ -+ Copyright (C) 1989, 1991 Free Software Foundation, Inc. -+ 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA -+ Everyone is permitted to copy and distribute verbatim copies -+ of this license document, but changing it is not allowed. -+ -+ Preamble -+ -+ The licenses for most software are designed to take away your -+freedom to share and change it. By contrast, the GNU General Public -+License is intended to guarantee your freedom to share and change free -+software--to make sure the software is free for all its users. This -+General Public License applies to most of the Free Software -+Foundation's software and to any other program whose authors commit to -+using it. (Some other Free Software Foundation software is covered by -+the GNU Library General Public License instead.) You can apply it to -+your programs, too. -+ -+ When we speak of free software, we are referring to freedom, not -+price. Our General Public Licenses are designed to make sure that you -+have the freedom to distribute copies of free software (and charge for -+this service if you wish), that you receive source code or can get it -+if you want it, that you can change the software or use pieces of it -+in new free programs; and that you know you can do these things. -+ -+ To protect your rights, we need to make restrictions that forbid -+anyone to deny you these rights or to ask you to surrender the rights. -+These restrictions translate to certain responsibilities for you if you -+distribute copies of the software, or if you modify it. -+ -+ For example, if you distribute copies of such a program, whether -+gratis or for a fee, you must give the recipients all the rights that -+you have. You must make sure that they, too, receive or can get the -+source code. And you must show them these terms so they know their -+rights. -+ -+ We protect your rights with two steps: (1) copyright the software, and -+(2) offer you this license which gives you legal permission to copy, -+distribute and/or modify the software. -+ -+ Also, for each author's protection and ours, we want to make certain -+that everyone understands that there is no warranty for this free -+software. If the software is modified by someone else and passed on, we -+want its recipients to know that what they have is not the original, so -+that any problems introduced by others will not reflect on the original -+authors' reputations. -+ -+ Finally, any free program is threatened constantly by software -+patents. We wish to avoid the danger that redistributors of a free -+program will individually obtain patent licenses, in effect making the -+program proprietary. To prevent this, we have made it clear that any -+patent must be licensed for everyone's free use or not licensed at all. -+ -+ The precise terms and conditions for copying, distribution and -+modification follow. -+ -+ GNU GENERAL PUBLIC LICENSE -+ TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION -+ -+ 0. This License applies to any program or other work which contains -+a notice placed by the copyright holder saying it may be distributed -+under the terms of this General Public License. The "Program", below, -+refers to any such program or work, and a "work based on the Program" -+means either the Program or any derivative work under copyright law: -+that is to say, a work containing the Program or a portion of it, -+either verbatim or with modifications and/or translated into another -+language. (Hereinafter, translation is included without limitation in -+the term "modification".) Each licensee is addressed as "you". -+ -+Activities other than copying, distribution and modification are not -+covered by this License; they are outside its scope. The act of -+running the Program is not restricted, and the output from the Program -+is covered only if its contents constitute a work based on the -+Program (independent of having been made by running the Program). -+Whether that is true depends on what the Program does. -+ -+ 1. You may copy and distribute verbatim copies of the Program's -+source code as you receive it, in any medium, provided that you -+conspicuously and appropriately publish on each copy an appropriate -+copyright notice and disclaimer of warranty; keep intact all the -+notices that refer to this License and to the absence of any warranty; -+and give any other recipients of the Program a copy of this License -+along with the Program. -+ -+You may charge a fee for the physical act of transferring a copy, and -+you may at your option offer warranty protection in exchange for a fee. -+ -+ 2. You may modify your copy or copies of the Program or any portion -+of it, thus forming a work based on the Program, and copy and -+distribute such modifications or work under the terms of Section 1 -+above, provided that you also meet all of these conditions: -+ -+ a) You must cause the modified files to carry prominent notices -+ stating that you changed the files and the date of any change. -+ -+ b) You must cause any work that you distribute or publish, that in -+ whole or in part contains or is derived from the Program or any -+ part thereof, to be licensed as a whole at no charge to all third -+ parties under the terms of this License. -+ -+ c) If the modified program normally reads commands interactively -+ when run, you must cause it, when started running for such -+ interactive use in the most ordinary way, to print or display an -+ announcement including an appropriate copyright notice and a -+ notice that there is no warranty (or else, saying that you provide -+ a warranty) and that users may redistribute the program under -+ these conditions, and telling the user how to view a copy of this -+ License. (Exception: if the Program itself is interactive but -+ does not normally print such an announcement, your work based on -+ the Program is not required to print an announcement.) -+ -+These requirements apply to the modified work as a whole. If -+identifiable sections of that work are not derived from the Program, -+and can be reasonably considered independent and separate works in -+themselves, then this License, and its terms, do not apply to those -+sections when you distribute them as separate works. But when you -+distribute the same sections as part of a whole which is a work based -+on the Program, the distribution of the whole must be on the terms of -+this License, whose permissions for other licensees extend to the -+entire whole, and thus to each and every part regardless of who wrote it. -+ -+Thus, it is not the intent of this section to claim rights or contest -+your rights to work written entirely by you; rather, the intent is to -+exercise the right to control the distribution of derivative or -+collective works based on the Program. -+ -+In addition, mere aggregation of another work not based on the Program -+with the Program (or with a work based on the Program) on a volume of -+a storage or distribution medium does not bring the other work under -+the scope of this License. -+ -+ 3. You may copy and distribute the Program (or a work based on it, -+under Section 2) in object code or executable form under the terms of -+Sections 1 and 2 above provided that you also do one of the following: -+ -+ a) Accompany it with the complete corresponding machine-readable -+ source code, which must be distributed under the terms of Sections -+ 1 and 2 above on a medium customarily used for software interchange; or, -+ -+ b) Accompany it with a written offer, valid for at least three -+ years, to give any third party, for a charge no more than your -+ cost of physically performing source distribution, a complete -+ machine-readable copy of the corresponding source code, to be -+ distributed under the terms of Sections 1 and 2 above on a medium -+ customarily used for software interchange; or, -+ -+ c) Accompany it with the information you received as to the offer -+ to distribute corresponding source code. (This alternative is -+ allowed only for noncommercial distribution and only if you -+ received the program in object code or executable form with such -+ an offer, in accord with Subsection b above.) -+ -+The source code for a work means the preferred form of the work for -+making modifications to it. For an executable work, complete source -+code means all the source code for all modules it contains, plus any -+associated interface definition files, plus the scripts used to -+control compilation and installation of the executable. However, as a -+special exception, the source code distributed need not include -+anything that is normally distributed (in either source or binary -+form) with the major components (compiler, kernel, and so on) of the -+operating system on which the executable runs, unless that component -+itself accompanies the executable. -+ -+If distribution of executable or object code is made by offering -+access to copy from a designated place, then offering equivalent -+access to copy the source code from the same place counts as -+distribution of the source code, even though third parties are not -+compelled to copy the source along with the object code. -+ -+ 4. You may not copy, modify, sublicense, or distribute the Program -+except as expressly provided under this License. Any attempt -+otherwise to copy, modify, sublicense or distribute the Program is -+void, and will automatically terminate your rights under this License. -+However, parties who have received copies, or rights, from you under -+this License will not have their licenses terminated so long as such -+parties remain in full compliance. -+ -+ 5. You are not required to accept this License, since you have not -+signed it. However, nothing else grants you permission to modify or -+distribute the Program or its derivative works. These actions are -+prohibited by law if you do not accept this License. Therefore, by -+modifying or distributing the Program (or any work based on the -+Program), you indicate your acceptance of this License to do so, and -+all its terms and conditions for copying, distributing or modifying -+the Program or works based on it. -+ -+ 6. Each time you redistribute the Program (or any work based on the -+Program), the recipient automatically receives a license from the -+original licensor to copy, distribute or modify the Program subject to -+these terms and conditions. You may not impose any further -+restrictions on the recipients' exercise of the rights granted herein. -+You are not responsible for enforcing compliance by third parties to -+this License. -+ -+ 7. If, as a consequence of a court judgment or allegation of patent -+infringement or for any other reason (not limited to patent issues), -+conditions are imposed on you (whether by court order, agreement or -+otherwise) that contradict the conditions of this License, they do not -+excuse you from the conditions of this License. If you cannot -+distribute so as to satisfy simultaneously your obligations under this -+License and any other pertinent obligations, then as a consequence you -+may not distribute the Program at all. For example, if a patent -+license would not permit royalty-free redistribution of the Program by -+all those who receive copies directly or indirectly through you, then -+the only way you could satisfy both it and this License would be to -+refrain entirely from distribution of the Program. -+ -+If any portion of this section is held invalid or unenforceable under -+any particular circumstance, the balance of the section is intended to -+apply and the section as a whole is intended to apply in other -+circumstances. -+ -+It is not the purpose of this section to induce you to infringe any -+patents or other property right claims or to contest validity of any -+such claims; this section has the sole purpose of protecting the -+integrity of the free software distribution system, which is -+implemented by public license practices. Many people have made -+generous contributions to the wide range of software distributed -+through that system in reliance on consistent application of that -+system; it is up to the author/donor to decide if he or she is willing -+to distribute software through any other system and a licensee cannot -+impose that choice. -+ -+This section is intended to make thoroughly clear what is believed to -+be a consequence of the rest of this License. -+ -+ 8. If the distribution and/or use of the Program is restricted in -+certain countries either by patents or by copyrighted interfaces, the -+original copyright holder who places the Program under this License -+may add an explicit geographical distribution limitation excluding -+those countries, so that distribution is permitted only in or among -+countries not thus excluded. In such case, this License incorporates -+the limitation as if written in the body of this License. -+ -+ 9. The Free Software Foundation may publish revised and/or new versions -+of the General Public License from time to time. Such new versions will -+be similar in spirit to the present version, but may differ in detail to -+address new problems or concerns. -+ -+Each version is given a distinguishing version number. If the Program -+specifies a version number of this License which applies to it and "any -+later version", you have the option of following the terms and conditions -+either of that version or of any later version published by the Free -+Software Foundation. If the Program does not specify a version number of -+this License, you may choose any version ever published by the Free Software -+Foundation. -+ -+ 10. If you wish to incorporate parts of the Program into other free -+programs whose distribution conditions are different, write to the author -+to ask for permission. For software which is copyrighted by the Free -+Software Foundation, write to the Free Software Foundation; we sometimes -+make exceptions for this. Our decision will be guided by the two goals -+of preserving the free status of all derivatives of our free software and -+of promoting the sharing and reuse of software generally. -+ -+ NO WARRANTY -+ -+ 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY -+FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN -+OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES -+PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED -+OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -+MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS -+TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE -+PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, -+REPAIR OR CORRECTION. -+ -+ 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING -+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR -+REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, -+INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING -+OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED -+TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY -+YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER -+PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE -+POSSIBILITY OF SUCH DAMAGES. -+ -+ END OF TERMS AND CONDITIONS -+ -+ Appendix: How to Apply These Terms to Your New Programs -+ -+ If you develop a new program, and you want it to be of the greatest -+possible use to the public, the best way to achieve this is to make it -+free software which everyone can redistribute and change under these terms. -+ -+ To do so, attach the following notices to the program. It is safest -+to attach them to the start of each source file to most effectively -+convey the exclusion of warranty; and each file should have at least -+the "copyright" line and a pointer to where the full notice is found. -+ -+ -+ Copyright (C) 19yy -+ -+ This program is free software; you can redistribute it and/or modify -+ it under the terms of the GNU General Public License as published by -+ the Free Software Foundation; either version 2 of the License, or -+ (at your option) any later version. -+ -+ This program is distributed in the hope that it will be useful, -+ but WITHOUT ANY WARRANTY; without even the implied warranty of -+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ GNU General Public License for more details. -+ -+ You should have received a copy of the GNU General Public License -+ along with this program; if not, write to the Free Software -+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, -+ USA. -+ -+Also add information on how to contact you by electronic and paper mail. -+ -+If the program is interactive, make it output a short notice like this -+when it starts in an interactive mode: -+ -+ Gnomovision version 69, Copyright (C) 19yy name of author -+ Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. -+ This is free software, and you are welcome to redistribute it -+ under certain conditions; type `show c' for details. -+ -+The hypothetical commands `show w' and `show c' should show the appropriate -+parts of the General Public License. Of course, the commands you use may -+be called something other than `show w' and `show c'; they could even be -+mouse-clicks or menu items--whatever suits your program. -+ -+You should also get your employer (if you work as a programmer) or your -+school, if any, to sign a "copyright disclaimer" for the program, if -+necessary. Here is a sample; alter the names: -+ -+ Yoyodyne, Inc., hereby disclaims all copyright interest in the program -+ `Gnomovision' (which makes passes at compilers) written by James Hacker. -+ -+ , 1 April 1989 -+ Ty Coon, President of Vice -+ -+This General Public License does not permit incorporating your program into -+proprietary programs. If your program is a subroutine library, you may -+consider it more useful to permit linking proprietary applications with the -+library. If this is what you want to do, use the GNU Library General -+Public License instead of this License. -diff -pNur xorg-server-1.4.orig/hw/vnc/loginauth.c xorg-server-1.4/hw/vnc/loginauth.c ---- xorg-server-1.4.orig/hw/vnc/loginauth.c 1969-12-31 16:00:00.000000000 -0800 -+++ xorg-server-1.4/hw/vnc/loginauth.c 2007-09-06 16:09:45.000000000 -0700 +diff --git a/hw/vnc/loginauth.c b/hw/vnc/loginauth.c +new file mode 100644 +index 0000000..7fd5304 +--- /dev/null ++++ b/hw/vnc/loginauth.c @@ -0,0 +1,143 @@ +/* + * loginauth.c - deal with login-style Unix authentication. @@ -8971,67 +9195,11 @@ diff -pNur xorg-server-1.4.orig/hw/vnc/loginauth.c xorg-server-1.4/hw/vnc/logina + cl->state = RFB_INITIALISATION; +} + -diff -pNur xorg-server-1.4.orig/hw/vnc/Makefile.am xorg-server-1.4/hw/vnc/Makefile.am ---- xorg-server-1.4.orig/hw/vnc/Makefile.am 1969-12-31 16:00:00.000000000 -0800 -+++ xorg-server-1.4/hw/vnc/Makefile.am 2007-09-06 16:09:51.000000000 -0700 -@@ -0,0 +1,54 @@ -+# XXX This Makefile.am probably needs some work. -+ -+bin_PROGRAMS = Xvnc -+ -+Xvnc_SOURCES = \ -+ $(top_srcdir)/fb/fbcmap_mi.c \ -+ $(top_srcdir)/Xi/stubs.c \ -+ $(top_srcdir)/mi/miinitext.c \ -+ auth.c \ -+ cmap.c \ -+ corre.c \ -+ cursor.c \ -+ cutpaste.c \ -+ d3des.c \ -+ dispcur.c \ -+ dpmsstubs.c \ -+ draw.c \ -+ hextile.c \ -+ httpd.c \ -+ init.c \ -+ kbdptr.c \ -+ loginauth.c \ -+ rfbkeyb.c \ -+ rfbmouse.c \ -+ rfbserver.c \ -+ rre.c \ -+ sprite.c \ -+ sockets.c \ -+ stats.c \ -+ tight.c \ -+ translate.c \ -+ vncauth.c \ -+ vncext.c \ -+ zlib.c -+ -+ -+JPEG_LIBS = -ljpeg -+CRYPT_LIBS = -lcrypt -+FB_LIBS = ../../fb/.libs/libfb.a -+ -+AM_CFLAGS = $(DIX_CFLAGS) $(XVNC_CFLAGS) -I$(top_srcdir)/hw/dmx/vnc -DCHROMIUM=1 -+ -+Xvnc_LDFLAGS = $(LD_EXPORT_SYMBOLS_FLAG) -+Xvnc_LDADD = \ -+ $(XORG_CORE_LIBS) \ -+ $(XVNC_LIBS) \ -+ $(JPEG_LIBS) \ -+ $(CRYPT_LIBS) \ -+ $(VNCMODULES_LIBS) \ -+ $(XSERVER_LIBS) -+ -+ -+relink: -+ rm -f Xvnc && $(MAKE) Xvnc -diff -pNur xorg-server-1.4.orig/hw/vnc/rdp.c xorg-server-1.4/hw/vnc/rdp.c ---- xorg-server-1.4.orig/hw/vnc/rdp.c 1969-12-31 16:00:00.000000000 -0800 -+++ xorg-server-1.4/hw/vnc/rdp.c 2007-09-06 16:09:45.000000000 -0700 +diff --git a/hw/vnc/rdp.c b/hw/vnc/rdp.c +new file mode 100644 +index 0000000..867e527 +--- /dev/null ++++ b/hw/vnc/rdp.c @@ -0,0 +1,147 @@ +/* + * Copyright (C) 2004 Alan Hourihane. All Rights Reserved. @@ -9180,28 +9348,12 @@ diff -pNur xorg-server-1.4.orig/hw/vnc/rdp.c xorg-server-1.4/hw/vnc/rdp.c + rdpNewClient(pScreen, sock); + } +} -diff -pNur xorg-server-1.4.orig/hw/vnc/README xorg-server-1.4/hw/vnc/README ---- xorg-server-1.4.orig/hw/vnc/README 1969-12-31 16:00:00.000000000 -0800 -+++ xorg-server-1.4/hw/vnc/README 2007-09-06 16:09:45.000000000 -0700 -@@ -0,0 +1,14 @@ -+ -+This is the directory containing the code specific to the TightVNC X server (Xvnc). -+Note that within this directory the name RFB is still used instead of VNC. -+ -+NOTE: -+ -+The is the new XFree86 v4 architecture VNC server code. -+ -+Modified entirely by Alan Hourihane -+ -+For information please visit http://xf4vnc.sourceforge.net -+ -+Moved to X.org modular tree by Brian Paul. -+ -diff -pNur xorg-server-1.4.orig/hw/vnc/rfb.h xorg-server-1.4/hw/vnc/rfb.h ---- xorg-server-1.4.orig/hw/vnc/rfb.h 1969-12-31 16:00:00.000000000 -0800 -+++ xorg-server-1.4/hw/vnc/rfb.h 2007-09-06 16:09:45.000000000 -0700 -@@ -0,0 +1,749 @@ +diff --git a/hw/vnc/rfb.h b/hw/vnc/rfb.h +new file mode 100644 +index 0000000..8a6d1ec +--- /dev/null ++++ b/hw/vnc/rfb.h +@@ -0,0 +1,751 @@ +/* + * rfb.h - header file for RFB DDX implementation. + * @@ -9284,6 +9436,9 @@ diff -pNur xorg-server-1.4.orig/hw/vnc/rfb.h xorg-server-1.4/hw/vnc/rfb.h + */ +#define UPDATE_BUF_SIZE 30000 + ++extern DevPrivateKey VNCScreenKey; ++extern DevPrivateKey rfbGCKey; ++ +#if XFREE86VNC || defined(DMXVNC) +#include "vncint.h" +#define VNCSCREENPTR(ptr) \ @@ -9684,7 +9839,6 @@ diff -pNur xorg-server-1.4.orig/hw/vnc/rfb.h xorg-server-1.4/hw/vnc/rfb.h +extern Atom VNC_LAST_CLIENT_ID; + +extern rfbScreenInfo rfbScreen; -+extern int rfbGCIndex; + +extern int inetdSock; + @@ -9951,9 +10105,11 @@ diff -pNur xorg-server-1.4.orig/hw/vnc/rfb.h xorg-server-1.4/hw/vnc/rfb.h + + +#endif /* RFB_H_INCLUDED */ -diff -pNur xorg-server-1.4.orig/hw/vnc/rfbkeyb.c xorg-server-1.4/hw/vnc/rfbkeyb.c ---- xorg-server-1.4.orig/hw/vnc/rfbkeyb.c 1969-12-31 16:00:00.000000000 -0800 -+++ xorg-server-1.4/hw/vnc/rfbkeyb.c 2007-09-06 16:09:45.000000000 -0700 +diff --git a/hw/vnc/rfbkeyb.c b/hw/vnc/rfbkeyb.c +new file mode 100644 +index 0000000..2405e66 +--- /dev/null ++++ b/hw/vnc/rfbkeyb.c @@ -0,0 +1,405 @@ +/* + * Copyright (C) 2002 Alan Hourihane. All Rights Reserved. @@ -10360,9 +10516,11 @@ diff -pNur xorg-server-1.4.orig/hw/vnc/rfbkeyb.c xorg-server-1.4/hw/vnc/rfbkeyb. + +#endif /* XFree86LOADER */ +#endif -diff -pNur xorg-server-1.4.orig/hw/vnc/rfbmouse.c xorg-server-1.4/hw/vnc/rfbmouse.c ---- xorg-server-1.4.orig/hw/vnc/rfbmouse.c 1969-12-31 16:00:00.000000000 -0800 -+++ xorg-server-1.4/hw/vnc/rfbmouse.c 2007-09-06 16:09:45.000000000 -0700 +diff --git a/hw/vnc/rfbmouse.c b/hw/vnc/rfbmouse.c +new file mode 100644 +index 0000000..40e6ec6 +--- /dev/null ++++ b/hw/vnc/rfbmouse.c @@ -0,0 +1,260 @@ +/* + * Copyright (C) 2002 Alan Hourihane. All Rights Reserved. @@ -10624,9 +10782,11 @@ diff -pNur xorg-server-1.4.orig/hw/vnc/rfbmouse.c xorg-server-1.4/hw/vnc/rfbmous + +#endif /* XFree86LOADER */ +#endif -diff -pNur xorg-server-1.4.orig/hw/vnc/rfbproto.h xorg-server-1.4/hw/vnc/rfbproto.h ---- xorg-server-1.4.orig/hw/vnc/rfbproto.h 1969-12-31 16:00:00.000000000 -0800 -+++ xorg-server-1.4/hw/vnc/rfbproto.h 2007-09-06 16:09:45.000000000 -0700 +diff --git a/hw/vnc/rfbproto.h b/hw/vnc/rfbproto.h +new file mode 100644 +index 0000000..5ed86c5 +--- /dev/null ++++ b/hw/vnc/rfbproto.h @@ -0,0 +1,1362 @@ +/* + * Copyright (C) 2000-2004 Constantin Kaplinsky. All Rights Reserved. @@ -11990,9 +12150,11 @@ diff -pNur xorg-server-1.4.orig/hw/vnc/rfbproto.h xorg-server-1.4/hw/vnc/rfbprot + rfbChromiumStopMsg csd; + rfbChromiumExposeMsg cse; +} rfbClientToServerMsg; -diff -pNur xorg-server-1.4.orig/hw/vnc/rfbserver.c xorg-server-1.4/hw/vnc/rfbserver.c ---- xorg-server-1.4.orig/hw/vnc/rfbserver.c 1969-12-31 16:00:00.000000000 -0800 -+++ xorg-server-1.4/hw/vnc/rfbserver.c 2007-09-06 16:09:45.000000000 -0700 +diff --git a/hw/vnc/rfbserver.c b/hw/vnc/rfbserver.c +new file mode 100644 +index 0000000..b93087f +--- /dev/null ++++ b/hw/vnc/rfbserver.c @@ -0,0 +1,2308 @@ +/* + * rfbserver.c - deal with server-side of the RFB protocol. @@ -14302,9 +14464,11 @@ diff -pNur xorg-server-1.4.orig/hw/vnc/rfbserver.c xorg-server-1.4/hw/vnc/rfbser + rfbDisconnectUDPSock(pScreen); + } +} -diff -pNur xorg-server-1.4.orig/hw/vnc/rre.c xorg-server-1.4/hw/vnc/rre.c ---- xorg-server-1.4.orig/hw/vnc/rre.c 1969-12-31 16:00:00.000000000 -0800 -+++ xorg-server-1.4/hw/vnc/rre.c 2007-09-06 16:09:45.000000000 -0700 +diff --git a/hw/vnc/rre.c b/hw/vnc/rre.c +new file mode 100644 +index 0000000..09043c8 +--- /dev/null ++++ b/hw/vnc/rre.c @@ -0,0 +1,324 @@ +/* + * rre.c @@ -14630,9 +14794,11 @@ diff -pNur xorg-server-1.4.orig/hw/vnc/rre.c xorg-server-1.4/hw/vnc/rre.c + + return maxclr; +} -diff -pNur xorg-server-1.4.orig/hw/vnc/sockets.c xorg-server-1.4/hw/vnc/sockets.c ---- xorg-server-1.4.orig/hw/vnc/sockets.c 1969-12-31 16:00:00.000000000 -0800 -+++ xorg-server-1.4/hw/vnc/sockets.c 2007-09-06 16:09:45.000000000 -0700 +diff --git a/hw/vnc/sockets.c b/hw/vnc/sockets.c +new file mode 100644 +index 0000000..7eff68c +--- /dev/null ++++ b/hw/vnc/sockets.c @@ -0,0 +1,656 @@ +/* + * sockets.c - deal with TCP & UDP sockets. @@ -15290,10 +15456,12 @@ diff -pNur xorg-server-1.4.orig/hw/vnc/sockets.c xorg-server-1.4/hw/vnc/sockets. + return TRUE; +} +#endif -diff -pNur xorg-server-1.4.orig/hw/vnc/sprite.c xorg-server-1.4/hw/vnc/sprite.c ---- xorg-server-1.4.orig/hw/vnc/sprite.c 1969-12-31 16:00:00.000000000 -0800 -+++ xorg-server-1.4/hw/vnc/sprite.c 2007-09-06 16:09:45.000000000 -0700 -@@ -0,0 +1,2452 @@ +diff --git a/hw/vnc/sprite.c b/hw/vnc/sprite.c +new file mode 100644 +index 0000000..c1e8685 +--- /dev/null ++++ b/hw/vnc/sprite.c +@@ -0,0 +1,2279 @@ +/* + * sprite.c + * @@ -15370,17 +15538,11 @@ diff -pNur xorg-server-1.4.orig/hw/vnc/sprite.c xorg-server-1.4/hw/vnc/sprite.c +# include "mipointer.h" +# include "spritest.h" +# include "dixfontstr.h" -+#ifdef RENDER -+# include "mipict.h" -+#endif + +/* + * screen wrappers + */ + -+static int rfbSpriteScreenIndex; -+static unsigned long rfbSpriteGeneration = 0; -+ +static Bool rfbSpriteCloseScreen(int i, ScreenPtr pScreen); +static void rfbSpriteGetImage(DrawablePtr pDrawable, int sx, int sy, + int w, int h, unsigned int format, @@ -15408,40 +15570,17 @@ diff -pNur xorg-server-1.4.orig/hw/vnc/sprite.c xorg-server-1.4/hw/vnc/sprite.c + int w, int h, + Bool generateExposures); + -+#ifdef RENDER -+static void rfbSpriteComposite(CARD8 op, -+ PicturePtr pSrc, -+ PicturePtr pMask, -+ PicturePtr pDst, -+ INT16 xSrc, -+ INT16 ySrc, -+ INT16 xMask, -+ INT16 yMask, -+ INT16 xDst, -+ INT16 yDst, -+ CARD16 width, -+ CARD16 height); -+ -+static void rfbSpriteGlyphs(CARD8 op, -+ PicturePtr pSrc, -+ PicturePtr pDst, -+ PictFormatPtr maskFormat, -+ INT16 xSrc, -+ INT16 ySrc, -+ int nlist, -+ GlyphListPtr list, -+ GlyphPtr *glyphs); -+#endif -+ +static void rfbSpriteSaveDoomedAreas(WindowPtr pWin, + RegionPtr pObscured, int dx, + int dy); +static RegionPtr rfbSpriteRestoreAreas(WindowPtr pWin, RegionPtr pRgnExposed); +static void rfbSpriteComputeSaved(ScreenPtr pScreen); + -+#define SCREEN_PROLOGUE(pScreen, field)\ -+ ((pScreen)->field = \ -+ ((rfbSpriteScreenPtr) (pScreen)->devPrivates[rfbSpriteScreenIndex].ptr)->field) ++static DevPrivateKey rfbSpriteScreenKey = &rfbSpriteScreenKey; ++ ++#define SCREEN_PROLOGUE(pScreen, field) ((pScreen)->field = \ ++ ((rfbSpriteScreenPtr)dixLookupPrivate(&(pScreen)->devPrivates, \ ++ rfbSpriteScreenKey))->field) + +#define SCREEN_EPILOGUE(pScreen, field, wrapper)\ + ((pScreen)->field = wrapper) @@ -15450,8 +15589,6 @@ diff -pNur xorg-server-1.4.orig/hw/vnc/sprite.c xorg-server-1.4/hw/vnc/sprite.c + * GC func wrappers + */ + -+static int rfbSpriteGCIndex; -+ +static void rfbSpriteValidateGC(GCPtr pGC, unsigned long stateChanges, + DrawablePtr pDrawable); +static void rfbSpriteCopyGC(GCPtr pGCSrc, unsigned long mask, GCPtr pGCDst); @@ -15471,9 +15608,11 @@ diff -pNur xorg-server-1.4.orig/hw/vnc/sprite.c xorg-server-1.4/hw/vnc/sprite.c + rfbSpriteCopyClip, +}; + ++static DevPrivateKey rfbSpriteGCKey = &rfbSpriteGCKey; ++ +#define GC_FUNC_PROLOGUE(pGC) \ + rfbSpriteGCPtr pGCPriv = \ -+ (rfbSpriteGCPtr) (pGC)->devPrivates[rfbSpriteGCIndex].ptr;\ ++ (rfbSpriteGCPtr)dixLookupPrivate(&(pGC)->devPrivates, rfbSpriteGCKey); \ + (pGC)->funcs = pGCPriv->wrapFuncs; \ + if (pGCPriv->wrapOps) \ + (pGC)->ops = pGCPriv->wrapOps; @@ -15569,13 +15708,14 @@ diff -pNur xorg-server-1.4.orig/hw/vnc/sprite.c xorg-server-1.4/hw/vnc/sprite.c + */ + +#define GC_SETUP_CHEAP(pDrawable) \ -+ rfbSpriteScreenPtr pScreenPriv = (rfbSpriteScreenPtr) \ -+ (pDrawable)->pScreen->devPrivates[rfbSpriteScreenIndex].ptr; \ ++ rfbSpriteScreenPtr pScreenPriv = (rfbSpriteScreenPtr) \ ++ dixLookupPrivate(&pDrawable->pScreen->devPrivates, \ ++ rfbSpriteScreenKey); + +#define GC_SETUP(pDrawable, pGC) \ + GC_SETUP_CHEAP(pDrawable) \ -+ rfbSpriteGCPtr pGCPrivate = (rfbSpriteGCPtr) \ -+ (pGC)->devPrivates[rfbSpriteGCIndex].ptr; \ ++ rfbSpriteGCPtr pGCPrivate = \ ++ (rfbSpriteGCPtr)dixLookupPrivate(&(pGC)->devPrivates, rfbSpriteGCKey); \ + GCFuncs *oldFuncs = pGC->funcs; + +#define GC_SETUP_AND_CHECK(pDrawable, pGC) \ @@ -15646,20 +15786,10 @@ diff -pNur xorg-server-1.4.orig/hw/vnc/sprite.c xorg-server-1.4/hw/vnc/sprite.c +{ + rfbSpriteScreenPtr pPriv; + VisualPtr pVisual; -+#ifdef RENDER -+ PictureScreenPtr ps = GetPictureScreenIfSet(pScreen); -+#endif + -+ if (rfbSpriteGeneration != serverGeneration) -+ { -+ rfbSpriteScreenIndex = AllocateScreenPrivateIndex (); -+ if (rfbSpriteScreenIndex < 0) -+ return FALSE; -+ rfbSpriteGeneration = serverGeneration; -+ rfbSpriteGCIndex = AllocateGCPrivateIndex (); -+ } -+ if (!AllocateGCPrivate(pScreen, rfbSpriteGCIndex, sizeof(rfbSpriteGCRec))) ++ if (!dixRequestPrivate(rfbSpriteGCKey, sizeof(rfbSpriteGCRec))) + return FALSE; ++ + pPriv = (rfbSpriteScreenPtr) xalloc (sizeof (rfbSpriteScreenRec)); + if (!pPriv) + return FALSE; @@ -15692,13 +15822,6 @@ diff -pNur xorg-server-1.4.orig/hw/vnc/sprite.c xorg-server-1.4/hw/vnc/sprite.c + + pPriv->SaveDoomedAreas = pScreen->SaveDoomedAreas; + pPriv->RestoreAreas = pScreen->RestoreAreas; -+#ifdef RENDER -+ if (ps) -+ { -+ pPriv->Composite = ps->Composite; -+ pPriv->Glyphs = ps->Glyphs; -+ } -+#endif + + pPriv->pCursor = NULL; + pPriv->x = 0; @@ -15716,7 +15839,7 @@ diff -pNur xorg-server-1.4.orig/hw/vnc/sprite.c xorg-server-1.4/hw/vnc/sprite.c + pPriv->colors[MASK_COLOR].red = 0; + pPriv->colors[MASK_COLOR].green = 0; + pPriv->colors[MASK_COLOR].blue = 0; -+ pScreen->devPrivates[rfbSpriteScreenIndex].ptr = (pointer) pPriv; ++ dixSetPrivate(&pScreen->devPrivates, rfbSpriteScreenKey, pPriv); + pScreen->CloseScreen = rfbSpriteCloseScreen; + pScreen->GetImage = rfbSpriteGetImage; + pScreen->GetSpans = rfbSpriteGetSpans; @@ -15737,13 +15860,6 @@ diff -pNur xorg-server-1.4.orig/hw/vnc/sprite.c xorg-server-1.4/hw/vnc/sprite.c + pScreen->RestoreAreas = rfbSpriteRestoreAreas; + + pScreen->DisplayCursor = rfbDisplayCursor; -+#ifdef RENDER -+ if (ps) -+ { -+ ps->Composite = rfbSpriteComposite; -+ ps->Glyphs = rfbSpriteGlyphs; -+ } -+#endif + + return TRUE; +} @@ -15762,11 +15878,9 @@ diff -pNur xorg-server-1.4.orig/hw/vnc/sprite.c xorg-server-1.4/hw/vnc/sprite.c + ScreenPtr pScreen; +{ + rfbSpriteScreenPtr pScreenPriv; -+#ifdef RENDER -+ PictureScreenPtr ps = GetPictureScreenIfSet(pScreen); -+#endif + -+ pScreenPriv = (rfbSpriteScreenPtr) pScreen->devPrivates[rfbSpriteScreenIndex].ptr; ++ pScreenPriv = (rfbSpriteScreenPtr)dixLookupPrivate(&pScreen->devPrivates, ++ rfbSpriteScreenKey); + + pScreen->CloseScreen = pScreenPriv->CloseScreen; + pScreen->GetImage = pScreenPriv->GetImage; @@ -15786,13 +15900,6 @@ diff -pNur xorg-server-1.4.orig/hw/vnc/sprite.c xorg-server-1.4/hw/vnc/sprite.c + + pScreen->SaveDoomedAreas = pScreenPriv->SaveDoomedAreas; + pScreen->RestoreAreas = pScreenPriv->RestoreAreas; -+#ifdef RENDER -+ if (ps) -+ { -+ ps->Composite = pScreenPriv->Composite; -+ ps->Glyphs = pScreenPriv->Glyphs; -+ } -+#endif + + xfree ((pointer) pScreenPriv); + @@ -15813,7 +15920,8 @@ diff -pNur xorg-server-1.4.orig/hw/vnc/sprite.c xorg-server-1.4/hw/vnc/sprite.c + + SCREEN_PROLOGUE (pScreen, GetImage); + -+ pScreenPriv = (rfbSpriteScreenPtr) pScreen->devPrivates[rfbSpriteScreenIndex].ptr; ++ pScreenPriv = (rfbSpriteScreenPtr)dixLookupPrivate(&pScreen->devPrivates, ++ rfbSpriteScreenKey); + + if (pDrawable->type == DRAWABLE_WINDOW && + pVNC->cursorIsDrawn && @@ -15843,7 +15951,8 @@ diff -pNur xorg-server-1.4.orig/hw/vnc/sprite.c xorg-server-1.4/hw/vnc/sprite.c + + SCREEN_PROLOGUE (pScreen, GetSpans); + -+ pScreenPriv = (rfbSpriteScreenPtr) pScreen->devPrivates[rfbSpriteScreenIndex].ptr; ++ pScreenPriv = (rfbSpriteScreenPtr)dixLookupPrivate(&pScreen->devPrivates, ++ rfbSpriteScreenKey); + + if (pDrawable->type == DRAWABLE_WINDOW && pVNC->cursorIsDrawn) + { @@ -15885,7 +15994,8 @@ diff -pNur xorg-server-1.4.orig/hw/vnc/sprite.c xorg-server-1.4/hw/vnc/sprite.c + + SCREEN_PROLOGUE (pScreen, SourceValidate); + -+ pScreenPriv = (rfbSpriteScreenPtr) pScreen->devPrivates[rfbSpriteScreenIndex].ptr; ++ pScreenPriv = (rfbSpriteScreenPtr)dixLookupPrivate(&pScreen->devPrivates, ++ rfbSpriteScreenKey); + + if (pDrawable->type == DRAWABLE_WINDOW && pVNC->cursorIsDrawn && + ORG_OVERLAP(&pScreenPriv->saved, pDrawable->x, pDrawable->y, @@ -15910,7 +16020,7 @@ diff -pNur xorg-server-1.4.orig/hw/vnc/sprite.c xorg-server-1.4/hw/vnc/sprite.c + + SCREEN_PROLOGUE (pScreen, CreateGC); + -+ pPriv = (rfbSpriteGCPtr)pGC->devPrivates[rfbSpriteGCIndex].ptr; ++ pPriv = (rfbSpriteGCPtr)dixLookupPrivate(&(pGC)->devPrivates, rfbSpriteGCKey); + + ret = (*pScreen->CreateGC) (pGC); + @@ -15934,7 +16044,8 @@ diff -pNur xorg-server-1.4.orig/hw/vnc/sprite.c xorg-server-1.4/hw/vnc/sprite.c + rfbSpriteScreenPtr pPriv; + VNCSCREENPTR(pScreen); + -+ pPriv = (rfbSpriteScreenPtr) pScreen->devPrivates[rfbSpriteScreenIndex].ptr; ++ pPriv = (rfbSpriteScreenPtr)dixLookupPrivate(&pScreen->devPrivates, ++ rfbSpriteScreenKey); + + SCREEN_PROLOGUE(pScreen, BlockHandler); + @@ -15954,7 +16065,8 @@ diff -pNur xorg-server-1.4.orig/hw/vnc/sprite.c xorg-server-1.4/hw/vnc/sprite.c + rfbSpriteScreenPtr pPriv; + VNCSCREENPTR(pScreen); + -+ pPriv = (rfbSpriteScreenPtr) pScreen->devPrivates[rfbSpriteScreenIndex].ptr; ++ pPriv = (rfbSpriteScreenPtr)dixLookupPrivate(&pScreen->devPrivates, ++ rfbSpriteScreenKey); + + SCREEN_PROLOGUE(pScreen, InstallColormap); + @@ -15984,7 +16096,8 @@ diff -pNur xorg-server-1.4.orig/hw/vnc/sprite.c xorg-server-1.4/hw/vnc/sprite.c + VisualPtr pVisual; + VNCSCREENPTR(pScreen); + -+ pPriv = (rfbSpriteScreenPtr) pScreen->devPrivates[rfbSpriteScreenIndex].ptr; ++ pPriv = (rfbSpriteScreenPtr)dixLookupPrivate(&pScreen->devPrivates, ++ rfbSpriteScreenKey); + + SCREEN_PROLOGUE(pScreen, StoreColors); + @@ -16051,8 +16164,9 @@ diff -pNur xorg-server-1.4.orig/hw/vnc/sprite.c xorg-server-1.4/hw/vnc/sprite.c +static void +rfbSpriteFindColors (ScreenPtr pScreen) +{ -+ rfbSpriteScreenPtr pScreenPriv = (rfbSpriteScreenPtr) -+ pScreen->devPrivates[rfbSpriteScreenIndex].ptr; ++ rfbSpriteScreenPtr pScreenPriv = (rfbSpriteScreenPtr) ++ dixLookupPrivate(&pScreen->devPrivates, ++ rfbSpriteScreenKey); + CursorPtr pCursor; + xColorItem *sourceColor, *maskColor; + @@ -16100,7 +16214,8 @@ diff -pNur xorg-server-1.4.orig/hw/vnc/sprite.c xorg-server-1.4/hw/vnc/sprite.c + + SCREEN_PROLOGUE (pScreen, SaveDoomedAreas); + -+ pScreenPriv = (rfbSpriteScreenPtr) pScreen->devPrivates[rfbSpriteScreenIndex].ptr; ++ pScreenPriv = (rfbSpriteScreenPtr)dixLookupPrivate(&pScreen->devPrivates, ++ rfbSpriteScreenKey); + if (pVNC->cursorIsDrawn) + { + cursorBox = pScreenPriv->saved; @@ -16133,7 +16248,8 @@ diff -pNur xorg-server-1.4.orig/hw/vnc/sprite.c xorg-server-1.4/hw/vnc/sprite.c + + SCREEN_PROLOGUE (pScreen, RestoreAreas); + -+ pScreenPriv = (rfbSpriteScreenPtr) pScreen->devPrivates[rfbSpriteScreenIndex].ptr; ++ pScreenPriv = (rfbSpriteScreenPtr)dixLookupPrivate(&pScreen->devPrivates, ++ rfbSpriteScreenKey); + if (pVNC->cursorIsDrawn) + { + if (RECT_IN_REGION( pScreen, prgnExposed, &pScreenPriv->saved) != rgnOUT) @@ -16163,7 +16279,8 @@ diff -pNur xorg-server-1.4.orig/hw/vnc/sprite.c xorg-server-1.4/hw/vnc/sprite.c + + SCREEN_PROLOGUE (pScreen, PaintWindowBackground); + -+ pScreenPriv = (rfbSpriteScreenPtr) pScreen->devPrivates[rfbSpriteScreenIndex].ptr; ++ pScreenPriv = (rfbSpriteScreenPtr)dixLookupPrivate(&pScreen->devPrivates, ++ rfbSpriteScreenKey); + if (pVNC->cursorIsDrawn) + { + /* @@ -16191,7 +16308,8 @@ diff -pNur xorg-server-1.4.orig/hw/vnc/sprite.c xorg-server-1.4/hw/vnc/sprite.c + + SCREEN_PROLOGUE (pScreen, PaintWindowBorder); + -+ pScreenPriv = (rfbSpriteScreenPtr) pScreen->devPrivates[rfbSpriteScreenIndex].ptr; ++ pScreenPriv = (rfbSpriteScreenPtr)dixLookupPrivate(&pScreen->devPrivates, ++ rfbSpriteScreenKey); + if (pVNC->cursorIsDrawn) + { + /* @@ -16221,7 +16339,8 @@ diff -pNur xorg-server-1.4.orig/hw/vnc/sprite.c xorg-server-1.4/hw/vnc/sprite.c + + SCREEN_PROLOGUE (pScreen, CopyWindow); + -+ pScreenPriv = (rfbSpriteScreenPtr) pScreen->devPrivates[rfbSpriteScreenIndex].ptr; ++ pScreenPriv = (rfbSpriteScreenPtr)dixLookupPrivate(&pScreen->devPrivates, ++ rfbSpriteScreenKey); + if (pVNC->cursorIsDrawn) + { + /* @@ -16260,7 +16379,8 @@ diff -pNur xorg-server-1.4.orig/hw/vnc/sprite.c xorg-server-1.4/hw/vnc/sprite.c + + SCREEN_PROLOGUE (pScreen, ClearToBackground); + -+ pScreenPriv = (rfbSpriteScreenPtr) pScreen->devPrivates[rfbSpriteScreenIndex].ptr; ++ pScreenPriv = (rfbSpriteScreenPtr)dixLookupPrivate(&pScreen->devPrivates, ++ rfbSpriteScreenKey); + if (GC_CHECK(pWin)) + { + if (!(realw = w)) @@ -17072,7 +17192,7 @@ diff -pNur xorg-server-1.4.orig/hw/vnc/sprite.c xorg-server-1.4/hw/vnc/sprite.c + + imageblt = (textType == TT_IMAGE8) || (textType == TT_IMAGE16); + -+ charinfo = (CharInfoPtr *) ALLOCATE_LOCAL(count * sizeof(CharInfoPtr)); ++ charinfo = (CharInfoPtr *) xalloc(count * sizeof(CharInfoPtr)); + if (!charinfo) + return x; + @@ -17120,7 +17240,7 @@ diff -pNur xorg-server-1.4.orig/hw/vnc/sprite.c xorg-server-1.4/hw/vnc/sprite.c + (*drawFunc) (pDraw, pGC, x, y, n, charinfo, FONTGLYPHS(pGC->font)); +#endif /* AVOID_GLYPHBLT */ + } -+ DEALLOCATE_LOCAL(charinfo); ++ xfree(charinfo); + return x + w; +} + @@ -17300,136 +17420,6 @@ diff -pNur xorg-server-1.4.orig/hw/vnc/sprite.c xorg-server-1.4/hw/vnc/sprite.c +} +#endif + -+#ifdef RENDER -+ -+# define mod(a,b) ((b) == 1 ? 0 : (a) >= 0 ? (a) % (b) : (b) - (-a) % (b)) -+ -+static void -+rfbSpritePictureOverlap (PicturePtr pPict, -+ INT16 x, -+ INT16 y, -+ CARD16 w, -+ CARD16 h) -+{ -+ VNCSCREENPTR(pPict->pDrawable->pScreen); -+ -+ if (pPict->pDrawable->type == DRAWABLE_WINDOW) -+ { -+ WindowPtr pWin = (WindowPtr) (pPict->pDrawable); -+ rfbSpriteScreenPtr pScreenPriv = (rfbSpriteScreenPtr) -+ pPict->pDrawable->pScreen->devPrivates[rfbSpriteScreenIndex].ptr; -+ if (GC_CHECK(pWin)) -+ { -+ if (pPict->repeat) -+ { -+ x = mod(x,pWin->drawable.width); -+ y = mod(y,pWin->drawable.height); -+ } -+ if (ORG_OVERLAP (&pScreenPriv->saved, pWin->drawable.x, pWin->drawable.y, -+ x, y, w, h)) -+ rfbSpriteRemoveCursor (pWin->drawable.pScreen); -+ } -+ } -+} -+ -+#define PICTURE_PROLOGUE(ps, pScreenPriv, field) \ -+ ps->field = pScreenPriv->field -+ -+#define PICTURE_EPILOGUE(ps, field, wrap) \ -+ ps->field = wrap -+ -+static void -+rfbSpriteComposite(CARD8 op, -+ PicturePtr pSrc, -+ PicturePtr pMask, -+ PicturePtr pDst, -+ INT16 xSrc, -+ INT16 ySrc, -+ INT16 xMask, -+ INT16 yMask, -+ INT16 xDst, -+ INT16 yDst, -+ CARD16 width, -+ CARD16 height) -+{ -+ ScreenPtr pScreen = pDst->pDrawable->pScreen; -+ PictureScreenPtr ps = GetPictureScreen(pScreen); -+ rfbSpriteScreenPtr pScreenPriv; -+ -+ pScreenPriv = (rfbSpriteScreenPtr) pScreen->devPrivates[rfbSpriteScreenIndex].ptr; -+ PICTURE_PROLOGUE(ps, pScreenPriv, Composite); -+ rfbSpritePictureOverlap (pSrc, xSrc, ySrc, width, height); -+ if (pMask) -+ rfbSpritePictureOverlap (pMask, xMask, yMask, width, height); -+ rfbSpritePictureOverlap (pDst, xDst, yDst, width, height); -+ -+ (*ps->Composite) (op, -+ pSrc, -+ pMask, -+ pDst, -+ xSrc, -+ ySrc, -+ xMask, -+ yMask, -+ xDst, -+ yDst, -+ width, -+ height); -+ -+ PICTURE_EPILOGUE(ps, Composite, rfbSpriteComposite); -+} -+ -+static void -+rfbSpriteGlyphs(CARD8 op, -+ PicturePtr pSrc, -+ PicturePtr pDst, -+ PictFormatPtr maskFormat, -+ INT16 xSrc, -+ INT16 ySrc, -+ int nlist, -+ GlyphListPtr list, -+ GlyphPtr *glyphs) -+{ -+ ScreenPtr pScreen = pDst->pDrawable->pScreen; -+ VNCSCREENPTR(pScreen); -+ PictureScreenPtr ps = GetPictureScreen(pScreen); -+ rfbSpriteScreenPtr pScreenPriv; -+ -+ pScreenPriv = (rfbSpriteScreenPtr) pScreen->devPrivates[rfbSpriteScreenIndex].ptr; -+ PICTURE_PROLOGUE(ps, pScreenPriv, Glyphs); -+ if (pSrc->pDrawable->type == DRAWABLE_WINDOW) -+ { -+ WindowPtr pSrcWin = (WindowPtr) (pSrc->pDrawable); -+ -+ if (GC_CHECK(pSrcWin)) -+ rfbSpriteRemoveCursor (pScreen); -+ } -+ if (pDst->pDrawable->type == DRAWABLE_WINDOW) -+ { -+ WindowPtr pDstWin = (WindowPtr) (pDst->pDrawable); -+ -+ if (GC_CHECK(pDstWin)) -+ { -+ BoxRec extents; -+ -+ miGlyphExtents (nlist, list, glyphs, &extents); -+ if (BOX_OVERLAP(&pScreenPriv->saved, -+ extents.x1 + pDstWin->drawable.x, -+ extents.y1 + pDstWin->drawable.y, -+ extents.x2 + pDstWin->drawable.x, -+ extents.y2 + pDstWin->drawable.y)) -+ { -+ rfbSpriteRemoveCursor (pScreen); -+ } -+ } -+ } -+ -+ (*ps->Glyphs) (op, pSrc, pDst, maskFormat, xSrc, ySrc, nlist, list, glyphs); -+ -+ PICTURE_EPILOGUE (ps, Glyphs, rfbSpriteGlyphs); -+} -+#endif -+ +/* + * miPointer interface routines + */ @@ -17441,7 +17431,8 @@ diff -pNur xorg-server-1.4.orig/hw/vnc/sprite.c xorg-server-1.4/hw/vnc/sprite.c +{ + rfbSpriteScreenPtr pScreenPriv; + -+ pScreenPriv = (rfbSpriteScreenPtr) pScreen->devPrivates[rfbSpriteScreenIndex].ptr; ++ pScreenPriv = (rfbSpriteScreenPtr)dixLookupPrivate(&pScreen->devPrivates, ++ rfbSpriteScreenKey); + if (pCursor == pScreenPriv->pCursor) + pScreenPriv->checkPixels = TRUE; + return (*pScreenPriv->funcs->RealizeCursor) (pScreen, pCursor); @@ -17452,7 +17443,8 @@ diff -pNur xorg-server-1.4.orig/hw/vnc/sprite.c xorg-server-1.4/hw/vnc/sprite.c +{ + rfbSpriteScreenPtr pScreenPriv; + -+ pScreenPriv = (rfbSpriteScreenPtr) pScreen->devPrivates[rfbSpriteScreenIndex].ptr; ++ pScreenPriv = (rfbSpriteScreenPtr)dixLookupPrivate(&pScreen->devPrivates, ++ rfbSpriteScreenKey); + return (*pScreenPriv->funcs->UnrealizeCursor) (pScreen, pCursor); +} + @@ -17463,8 +17455,8 @@ diff -pNur xorg-server-1.4.orig/hw/vnc/sprite.c xorg-server-1.4/hw/vnc/sprite.c + rfbClientPtr cl, nextCl; + VNCSCREENPTR(pScreen); + -+ pScreenPriv -+ = (rfbSpriteScreenPtr) pScreen->devPrivates[rfbSpriteScreenIndex].ptr; ++ pScreenPriv = (rfbSpriteScreenPtr)dixLookupPrivate(&pScreen->devPrivates, ++ rfbSpriteScreenKey); + if (!pCursor) + { + pScreenPriv->shouldBeUp = FALSE; @@ -17577,7 +17569,8 @@ diff -pNur xorg-server-1.4.orig/hw/vnc/sprite.c xorg-server-1.4/hw/vnc/sprite.c +{ + rfbSpriteScreenPtr pScreenPriv; + -+ pScreenPriv = (rfbSpriteScreenPtr) pScreen->devPrivates[rfbSpriteScreenIndex].ptr; ++ pScreenPriv = (rfbSpriteScreenPtr)dixLookupPrivate(&pScreen->devPrivates, ++ rfbSpriteScreenKey); + rfbSpriteSetCursor (pScreen, pScreenPriv->pCursor, x, y); +} + @@ -17595,8 +17588,8 @@ diff -pNur xorg-server-1.4.orig/hw/vnc/sprite.c xorg-server-1.4/hw/vnc/sprite.c + if (!pVNC->cursorIsDrawn) + return; + -+ pScreenPriv -+ = (rfbSpriteScreenPtr) pScreen->devPrivates[rfbSpriteScreenIndex].ptr; ++ pScreenPriv = (rfbSpriteScreenPtr)dixLookupPrivate(&pScreen->devPrivates, ++ rfbSpriteScreenKey); + + pVNC->dontSendFramebufferUpdate = TRUE; + pVNC->cursorIsDrawn = FALSE; @@ -17622,8 +17615,8 @@ diff -pNur xorg-server-1.4.orig/hw/vnc/sprite.c xorg-server-1.4/hw/vnc/sprite.c + CursorPtr pCursor; + VNCSCREENPTR(pScreen); + -+ pScreenPriv -+ = (rfbSpriteScreenPtr) pScreen->devPrivates[rfbSpriteScreenIndex].ptr; ++ pScreenPriv = (rfbSpriteScreenPtr)dixLookupPrivate(&pScreen->devPrivates, ++ rfbSpriteScreenKey); + pCursor = pScreenPriv->pCursor; + + if (pVNC->cursorIsDrawn || !pCursor) @@ -17665,7 +17658,8 @@ diff -pNur xorg-server-1.4.orig/hw/vnc/sprite.c xorg-server-1.4/hw/vnc/sprite.c + int wpad, hpad; + CursorPtr pCursor; + -+ pScreenPriv = (rfbSpriteScreenPtr) pScreen->devPrivates[rfbSpriteScreenIndex].ptr; ++ pScreenPriv = (rfbSpriteScreenPtr)dixLookupPrivate(&pScreen->devPrivates, ++ rfbSpriteScreenKey); + pCursor = pScreenPriv->pCursor; + x = pScreenPriv->x - (int)pCursor->bits->xhot; + y = pScreenPriv->y - (int)pCursor->bits->yhot; @@ -17698,7 +17692,8 @@ diff -pNur xorg-server-1.4.orig/hw/vnc/sprite.c xorg-server-1.4/hw/vnc/sprite.c + cl->cursorWasChanged = TRUE; + } + -+ pPriv = (rfbSpriteScreenPtr)pScreen->devPrivates[rfbSpriteScreenIndex].ptr; ++ pPriv = (rfbSpriteScreenPtr)dixLookupPrivate(&pScreen->devPrivates, ++ rfbSpriteScreenKey); + status = (*pPriv->DisplayCursor)(pScreen, pCursor); + + /* send new cursor shape to interested viewers */ @@ -17722,8 +17717,8 @@ diff -pNur xorg-server-1.4.orig/hw/vnc/sprite.c xorg-server-1.4/hw/vnc/sprite.c +{ + rfbSpriteScreenPtr pScreenPriv; + -+ pScreenPriv = (rfbSpriteScreenPtr) -+ pScreen->devPrivates[rfbSpriteScreenIndex].ptr; ++ pScreenPriv = (rfbSpriteScreenPtr)dixLookupPrivate(&pScreen->devPrivates, ++ rfbSpriteScreenKey); + + return pScreenPriv->pCursor; +} @@ -17739,16 +17734,18 @@ diff -pNur xorg-server-1.4.orig/hw/vnc/sprite.c xorg-server-1.4/hw/vnc/sprite.c +{ + rfbSpriteScreenPtr pScreenPriv; + -+ pScreenPriv = (rfbSpriteScreenPtr) -+ pScreen->devPrivates[rfbSpriteScreenIndex].ptr; ++ pScreenPriv = (rfbSpriteScreenPtr)dixLookupPrivate(&pScreen->devPrivates, ++ rfbSpriteScreenKey); + + *px = pScreenPriv->x; + *py = pScreenPriv->y; +} + -diff -pNur xorg-server-1.4.orig/hw/vnc/sprite.h xorg-server-1.4/hw/vnc/sprite.h ---- xorg-server-1.4.orig/hw/vnc/sprite.h 1969-12-31 16:00:00.000000000 -0800 -+++ xorg-server-1.4/hw/vnc/sprite.h 2007-09-06 16:09:45.000000000 -0700 +diff --git a/hw/vnc/sprite.h b/hw/vnc/sprite.h +new file mode 100644 +index 0000000..ed34726 +--- /dev/null ++++ b/hw/vnc/sprite.h @@ -0,0 +1,141 @@ +/* + * sprite.h @@ -17891,9 +17888,11 @@ diff -pNur xorg-server-1.4.orig/hw/vnc/sprite.h xorg-server-1.4/hw/vnc/sprite.h + int * /*py*/ +#endif +); -diff -pNur xorg-server-1.4.orig/hw/vnc/spritest.h xorg-server-1.4/hw/vnc/spritest.h ---- xorg-server-1.4.orig/hw/vnc/spritest.h 1969-12-31 16:00:00.000000000 -0800 -+++ xorg-server-1.4/hw/vnc/spritest.h 2007-09-06 16:09:45.000000000 -0700 +diff --git a/hw/vnc/spritest.h b/hw/vnc/spritest.h +new file mode 100644 +index 0000000..8593ee0 +--- /dev/null ++++ b/hw/vnc/spritest.h @@ -0,0 +1,138 @@ +/* + * spritest.h @@ -18033,9 +18032,11 @@ diff -pNur xorg-server-1.4.orig/hw/vnc/spritest.h xorg-server-1.4/hw/vnc/sprites + +#define LINE_OVERLAP(pCbox,x1,y1,x2,y2,lw2) \ + BOX_OVERLAP((pCbox), (x1)-(lw2), (y1)-(lw2), (x2)+(lw2), (y2)+(lw2)) -diff -pNur xorg-server-1.4.orig/hw/vnc/stats.c xorg-server-1.4/hw/vnc/stats.c ---- xorg-server-1.4.orig/hw/vnc/stats.c 1969-12-31 16:00:00.000000000 -0800 -+++ xorg-server-1.4/hw/vnc/stats.c 2007-09-06 16:09:45.000000000 -0700 +diff --git a/hw/vnc/stats.c b/hw/vnc/stats.c +new file mode 100644 +index 0000000..83366ec +--- /dev/null ++++ b/hw/vnc/stats.c @@ -0,0 +1,117 @@ +/* + * stats.c @@ -18154,9 +18155,11 @@ diff -pNur xorg-server-1.4.orig/hw/vnc/stats.c xorg-server-1.4/hw/vnc/stats.c + cl->rfbLastRectBytesSent)); + } +} -diff -pNur xorg-server-1.4.orig/hw/vnc/symlink-vnc.sh xorg-server-1.4/hw/vnc/symlink-vnc.sh ---- xorg-server-1.4.orig/hw/vnc/symlink-vnc.sh 1969-12-31 16:00:00.000000000 -0800 -+++ xorg-server-1.4/hw/vnc/symlink-vnc.sh 2007-09-06 16:09:45.000000000 -0700 +diff --git a/hw/vnc/symlink-vnc.sh b/hw/vnc/symlink-vnc.sh +new file mode 100755 +index 0000000..b4347a1 +--- /dev/null ++++ b/hw/vnc/symlink-vnc.sh @@ -0,0 +1,198 @@ +#!/bin/sh + @@ -18356,9 +18359,11 @@ diff -pNur xorg-server-1.4.orig/hw/vnc/symlink-vnc.sh xorg-server-1.4/hw/vnc/sym +} + +main $1 $2 -diff -pNur xorg-server-1.4.orig/hw/vnc/tableinitcmtemplate.c xorg-server-1.4/hw/vnc/tableinitcmtemplate.c ---- xorg-server-1.4.orig/hw/vnc/tableinitcmtemplate.c 1969-12-31 16:00:00.000000000 -0800 -+++ xorg-server-1.4/hw/vnc/tableinitcmtemplate.c 2007-09-06 16:09:45.000000000 -0700 +diff --git a/hw/vnc/tableinitcmtemplate.c b/hw/vnc/tableinitcmtemplate.c +new file mode 100644 +index 0000000..c65c3d2 +--- /dev/null ++++ b/hw/vnc/tableinitcmtemplate.c @@ -0,0 +1,93 @@ +/* + * tableinitcmtemplate.c - template for initialising lookup tables for @@ -18453,9 +18458,11 @@ diff -pNur xorg-server-1.4.orig/hw/vnc/tableinitcmtemplate.c xorg-server-1.4/hw/ +#undef OUT_T +#undef SwapOUT +#undef rfbInitColourMapSingleTableOUT -diff -pNur xorg-server-1.4.orig/hw/vnc/tableinittctemplate.c xorg-server-1.4/hw/vnc/tableinittctemplate.c ---- xorg-server-1.4.orig/hw/vnc/tableinittctemplate.c 1969-12-31 16:00:00.000000000 -0800 -+++ xorg-server-1.4/hw/vnc/tableinittctemplate.c 2007-09-06 16:09:45.000000000 -0700 +diff --git a/hw/vnc/tableinittctemplate.c b/hw/vnc/tableinittctemplate.c +new file mode 100644 +index 0000000..1af8a06 +--- /dev/null ++++ b/hw/vnc/tableinittctemplate.c @@ -0,0 +1,146 @@ +/* + * tableinittctemplate.c - template for initialising lookup tables for @@ -18603,9 +18610,11 @@ diff -pNur xorg-server-1.4.orig/hw/vnc/tableinittctemplate.c xorg-server-1.4/hw/ +#undef rfbInitTrueColourSingleTableOUT +#undef rfbInitTrueColourRGBTablesOUT +#undef rfbInitOneRGBTableOUT -diff -pNur xorg-server-1.4.orig/hw/vnc/tabletranstemplate.c xorg-server-1.4/hw/vnc/tabletranstemplate.c ---- xorg-server-1.4.orig/hw/vnc/tabletranstemplate.c 1969-12-31 16:00:00.000000000 -0800 -+++ xorg-server-1.4/hw/vnc/tabletranstemplate.c 2007-09-06 16:09:45.000000000 -0700 +diff --git a/hw/vnc/tabletranstemplate.c b/hw/vnc/tabletranstemplate.c +new file mode 100644 +index 0000000..d8baa44 +--- /dev/null ++++ b/hw/vnc/tabletranstemplate.c @@ -0,0 +1,135 @@ +/* + * tabletranstemplate.c - template for translation using lookup tables. @@ -18742,9 +18751,11 @@ diff -pNur xorg-server-1.4.orig/hw/vnc/tabletranstemplate.c xorg-server-1.4/hw/v +#undef OUT_T +#undef rfbTranslateWithSingleTableINtoOUT +#undef rfbTranslateWithRGBTablesINtoOUT -diff -pNur xorg-server-1.4.orig/hw/vnc/tight.c xorg-server-1.4/hw/vnc/tight.c ---- xorg-server-1.4.orig/hw/vnc/tight.c 1969-12-31 16:00:00.000000000 -0800 -+++ xorg-server-1.4/hw/vnc/tight.c 2007-09-06 16:09:45.000000000 -0700 +diff --git a/hw/vnc/tight.c b/hw/vnc/tight.c +new file mode 100644 +index 0000000..bbe1744 +--- /dev/null ++++ b/hw/vnc/tight.c @@ -0,0 +1,1827 @@ +/* + * tight.c @@ -20573,9 +20584,11 @@ diff -pNur xorg-server-1.4.orig/hw/vnc/tight.c xorg-server-1.4/hw/vnc/tight.c + cinfo->dest = &jpegDstManager; +} + -diff -pNur xorg-server-1.4.orig/hw/vnc/translate.c xorg-server-1.4/hw/vnc/translate.c ---- xorg-server-1.4.orig/hw/vnc/translate.c 1969-12-31 16:00:00.000000000 -0800 -+++ xorg-server-1.4/hw/vnc/translate.c 2007-09-06 16:09:45.000000000 -0700 +diff --git a/hw/vnc/translate.c b/hw/vnc/translate.c +new file mode 100644 +index 0000000..b9ab53e +--- /dev/null ++++ b/hw/vnc/translate.c @@ -0,0 +1,502 @@ +/* + * translate.c - translate between different pixel formats @@ -21079,9 +21092,11 @@ diff -pNur xorg-server-1.4.orig/hw/vnc/translate.c xorg-server-1.4/hw/vnc/transl + } + } +} -diff -pNur xorg-server-1.4.orig/hw/vnc/vncauth.c xorg-server-1.4/hw/vnc/vncauth.c ---- xorg-server-1.4.orig/hw/vnc/vncauth.c 1969-12-31 16:00:00.000000000 -0800 -+++ xorg-server-1.4/hw/vnc/vncauth.c 2007-09-06 16:09:45.000000000 -0700 +diff --git a/hw/vnc/vncauth.c b/hw/vnc/vncauth.c +new file mode 100644 +index 0000000..a70cfa5 +--- /dev/null ++++ b/hw/vnc/vncauth.c @@ -0,0 +1,252 @@ +/* + * Copyright (C) 1999 AT&T Laboratories Cambridge. All Rights Reserved. @@ -21335,9 +21350,11 @@ diff -pNur xorg-server-1.4.orig/hw/vnc/vncauth.c xorg-server-1.4/hw/vnc/vncauth. + des(bytes+i, bytes+i); + } +} -diff -pNur xorg-server-1.4.orig/hw/vnc/vncauth.h xorg-server-1.4/hw/vnc/vncauth.h ---- xorg-server-1.4.orig/hw/vnc/vncauth.h 1969-12-31 16:00:00.000000000 -0800 -+++ xorg-server-1.4/hw/vnc/vncauth.h 2007-09-06 16:09:45.000000000 -0700 +diff --git a/hw/vnc/vncauth.h b/hw/vnc/vncauth.h +new file mode 100644 +index 0000000..adc280b +--- /dev/null ++++ b/hw/vnc/vncauth.h @@ -0,0 +1,33 @@ +/* + * Copyright (C) 1999 AT&T Laboratories Cambridge. All Rights Reserved. @@ -21372,10 +21389,12 @@ diff -pNur xorg-server-1.4.orig/hw/vnc/vncauth.h xorg-server-1.4/hw/vnc/vncauth. +extern int vncEncryptAndStorePasswd2(char *passwd, char *passwdViewOnly, char *fname); +extern int vncDecryptPasswdFromFile2(char *fname, char *passwdFullControl, char *passwdViewOnly); + -diff -pNur xorg-server-1.4.orig/hw/vnc/vncext.c xorg-server-1.4/hw/vnc/vncext.c ---- xorg-server-1.4.orig/hw/vnc/vncext.c 1969-12-31 16:00:00.000000000 -0800 -+++ xorg-server-1.4/hw/vnc/vncext.c 2007-09-06 16:09:45.000000000 -0700 -@@ -0,0 +1,798 @@ +diff --git a/hw/vnc/vncext.c b/hw/vnc/vncext.c +new file mode 100644 +index 0000000..80a3433 +--- /dev/null ++++ b/hw/vnc/vncext.c +@@ -0,0 +1,800 @@ +/* + * Copyright (C) 2002 Alan Hourihane. All Rights Reserved. + * @@ -21414,6 +21433,9 @@ diff -pNur xorg-server-1.4.orig/hw/vnc/vncext.c xorg-server-1.4/hw/vnc/vncext.c +#include +#include + ++DevPrivateKey vncCreateScreenResourcesKey = &vncCreateScreenResourcesKey; ++DevPrivateKey rfbGCKey = &rfbGCKey; ++ +int VncSelectNotify(ClientPtr client, BOOL onoff); +void VncExtensionInit(void); + @@ -22073,9 +22095,8 @@ diff -pNur xorg-server-1.4.orig/hw/vnc/vncext.c xorg-server-1.4/hw/vnc/vncext.c + + + -+#if XFREE86VNC -+static unsigned long vncCreateScreenResourcesIndex; +static unsigned long vncExtGeneration = 0; ++#if XFREE86VNC +extern Bool VNCInit(ScreenPtr pScreen, unsigned char *FBStart); + +/* copied from miscrinit.c */ @@ -22092,7 +22113,7 @@ diff -pNur xorg-server-1.4.orig/hw/vnc/vncext.c xorg-server-1.4/hw/vnc/vncext.c + int ret = TRUE; + CreateScreenResourcesProcPtr CreateScreenResources = + (CreateScreenResourcesProcPtr) -+ pScreen->devPrivates[vncCreateScreenResourcesIndex].ptr; ++ dixLookupPrivate(&pScreen->devPrivates, vncCreateScreenResourcesKey); + miScreenInitParmsPtr pScrInitParms; + + pScrInitParms = (miScreenInitParmsPtr)pScreen->devPrivate; @@ -22111,7 +22132,7 @@ diff -pNur xorg-server-1.4.orig/hw/vnc/vncext.c xorg-server-1.4/hw/vnc/vncext.c + + /* Unhook this function ... */ + pScreen->CreateScreenResources = CreateScreenResources; -+ pScreen->devPrivates[vncCreateScreenResourcesIndex].ptr = NULL; ++ dixSetPrivate(&pScreen->devPrivates, vncCreateScreenResourcesKey, NULL); + + /* ... and call the previous CreateScreenResources fuction, if any */ + if (pScreen->CreateScreenResources) { @@ -22132,27 +22153,27 @@ diff -pNur xorg-server-1.4.orig/hw/vnc/vncext.c xorg-server-1.4/hw/vnc/vncext.c +{ + ExtensionEntry *extEntry; + -+#if XFREE86VNC + if (vncExtGeneration != serverGeneration) { + unsigned int i; + + vncExtGeneration = serverGeneration; + -+ if ( ((vncCreateScreenResourcesIndex = AllocateScreenPrivateIndex()) < 0) || -+ ((vncScreenPrivateIndex = AllocateScreenPrivateIndex()) < 0) || -+ ((rfbGCIndex = AllocateGCPrivateIndex()) < 0) ) -+ return; ++ // no allocation needed for screen privates ++ if (!dixRequestPrivate(rfbGCKey, sizeof(rfbGCRec))) ++ return; + ++#if XFREE86VNC + for (i = 0 ; i < screenInfo.numScreens; i++) + { -+ screenInfo.screens[i]->devPrivates[vncCreateScreenResourcesIndex].ptr -+ = (void*)(xf86Screens[i]->pScreen->CreateScreenResources); -+ xf86Screens[i]->pScreen->CreateScreenResources = vncCreateScreenResources; ++ dixSetPrivate(&screenInfo.screens[i]->devPrivates, ++ vncCreateScreenResourcesKey, ++ xf86Screens[i]->pScreen->CreateScreenResources); ++ xf86Screens[i]->pScreen->CreateScreenResources = vncCreateScreenResources; + } ++#endif + + gethostname(rfbThisHost, 255); + } -+#endif + + if (!CreateResourceTypes()) + return; @@ -22174,9 +22195,11 @@ diff -pNur xorg-server-1.4.orig/hw/vnc/vncext.c xorg-server-1.4/hw/vnc/vncext.c + (EventSwapPtr)SwapVncChromiumConnectedEvent; +#endif +} /* VncExtensionInit */ -diff -pNur xorg-server-1.4.orig/hw/vnc/xistubs.c xorg-server-1.4/hw/vnc/xistubs.c ---- xorg-server-1.4.orig/hw/vnc/xistubs.c 1969-12-31 16:00:00.000000000 -0800 -+++ xorg-server-1.4/hw/vnc/xistubs.c 2007-09-06 16:09:45.000000000 -0700 +diff --git a/hw/vnc/xistubs.c b/hw/vnc/xistubs.c +new file mode 100644 +index 0000000..011ac9e +--- /dev/null ++++ b/hw/vnc/xistubs.c @@ -0,0 +1,323 @@ +/* $Xorg: stubs.c,v 1.4 2001/02/09 02:04:35 xorgcvs Exp $ */ + @@ -22501,9 +22524,11 @@ diff -pNur xorg-server-1.4.orig/hw/vnc/xistubs.c xorg-server-1.4/hw/vnc/xistubs. + return (BadMatch); + } + } -diff -pNur xorg-server-1.4.orig/hw/vnc/zlib.c xorg-server-1.4/hw/vnc/zlib.c ---- xorg-server-1.4.orig/hw/vnc/zlib.c 1969-12-31 16:00:00.000000000 -0800 -+++ xorg-server-1.4/hw/vnc/zlib.c 2007-09-06 16:09:45.000000000 -0700 +diff --git a/hw/vnc/zlib.c b/hw/vnc/zlib.c +new file mode 100644 +index 0000000..4863fb4 +--- /dev/null ++++ b/hw/vnc/zlib.c @@ -0,0 +1,310 @@ +/* + * zlib.c @@ -22815,9 +22840,41 @@ diff -pNur xorg-server-1.4.orig/hw/vnc/zlib.c xorg-server-1.4/hw/vnc/zlib.c +} + + -diff -pNur xorg-server-1.4.orig/hw/xfree86/dixmods/Makefile.am xorg-server-1.4/hw/xfree86/dixmods/Makefile.am ---- xorg-server-1.4.orig/hw/xfree86/dixmods/Makefile.am 2007-08-23 12:05:48.000000000 -0700 -+++ xorg-server-1.4/hw/xfree86/dixmods/Makefile.am 2007-09-06 16:09:46.000000000 -0700 +diff --git a/hw/xfree86/Makefile.am b/hw/xfree86/Makefile.am +index 03c2c3a..06329a8 100644 +--- a/hw/xfree86/Makefile.am ++++ b/hw/xfree86/Makefile.am +@@ -4,6 +4,10 @@ if DRI + DRI_SUBDIR = dri + endif + ++if VNC ++VNC_SUBDIR = vnc ++endif ++ + if DRI2 + DRI2_SUBDIR = dri2 + endif +@@ -24,13 +28,13 @@ DOC_SUBDIR = doc + + SUBDIRS = common ddc dummylib i2c x86emu int10 fbdevhw os-support parser rac \ + ramdac shadowfb vbe vgahw xaa $(MFB_SUBDIR) $(CFB_SUBDIR) \ +- xf8_16bpp loader dixmods exa modes \ ++ xf8_16bpp loader dixmods exa modes $(VNC_SUBDIR) \ + $(DRI_SUBDIR) $(DRI2_SUBDIR) $(XF86UTILS_SUBDIR) $(DOC_SUBDIR) + + DIST_SUBDIRS = common ddc dummylib i2c x86emu int10 fbdevhw os-support \ + parser rac ramdac shadowfb vbe vgahw xaa xf1bpp xf4bpp \ + xf8_16bpp xf8_32bpp loader dixmods dri dri2 exa modes \ +- utils doc ++ utils doc vnc + + bin_PROGRAMS = Xorg + +diff --git a/hw/xfree86/dixmods/Makefile.am b/hw/xfree86/dixmods/Makefile.am +index efc5f4a..98d7302 100644 +--- a/hw/xfree86/dixmods/Makefile.am ++++ b/hw/xfree86/dixmods/Makefile.am @@ -14,6 +14,10 @@ if DBE DBEMOD = libdbe.la endif @@ -22837,7 +22894,7 @@ diff -pNur xorg-server-1.4.orig/hw/xfree86/dixmods/Makefile.am xorg-server-1.4/h $(GLXMODS) \ $(XTRAPMOD) -@@ -46,6 +51,7 @@ fontsmodule_LTLIBRARIES = libfreetype.la +@@ -45,6 +50,7 @@ fontsmodule_LTLIBRARIES = libfreetype.la AM_CFLAGS = @XORG_CFLAGS@ @DIX_CFLAGS@ INCLUDES = @XORG_INCS@ \ -I$(top_srcdir)/dbe \ @@ -22845,7 +22902,7 @@ diff -pNur xorg-server-1.4.orig/hw/xfree86/dixmods/Makefile.am xorg-server-1.4/h -I$(top_srcdir)/hw/xfree86/loader \ -I$(top_srcdir)/miext/shadow \ -I$(top_srcdir)/GL/glx -@@ -70,6 +76,10 @@ libdbe_la_LDFLAGS = -avoid-version +@@ -69,6 +75,10 @@ libdbe_la_LDFLAGS = -avoid-version libdbe_la_LIBADD = $(top_builddir)/dbe/libdbe.la libdbe_la_SOURCES = dbemodule.c @@ -22856,10 +22913,56 @@ diff -pNur xorg-server-1.4.orig/hw/xfree86/dixmods/Makefile.am xorg-server-1.4/h libfb_la_LDFLAGS = -avoid-version libfb_la_LIBADD = $(top_builddir)/fb/libfb.la libfb_la_SOURCES = $(top_builddir)/fb/fbcmap_mi.c fbmodule.c -diff -pNur xorg-server-1.4.orig/hw/xfree86/vnc/Makefile.am xorg-server-1.4/hw/xfree86/vnc/Makefile.am ---- xorg-server-1.4.orig/hw/xfree86/vnc/Makefile.am 1969-12-31 16:00:00.000000000 -0800 -+++ xorg-server-1.4/hw/xfree86/vnc/Makefile.am 2007-09-06 16:09:51.000000000 -0700 -@@ -0,0 +1,53 @@ +diff --git a/hw/xfree86/vnc/.gitignore b/hw/xfree86/vnc/.gitignore +new file mode 100644 +index 0000000..d14621f +--- /dev/null ++++ b/hw/xfree86/vnc/.gitignore +@@ -0,0 +1,36 @@ ++auth.c ++cmap.c ++corre.c ++cursor.c ++cutpaste.c ++d3des.c ++d3des.h ++dispcur.c ++draw.c ++hextile.c ++httpd.c ++kbdptr.c ++keyboard.h ++loginauth.c ++rdp.c ++rfb.h ++rfbkeyb.c ++rfbmouse.c ++rfbproto.h ++rfbserver.c ++rre.c ++sockets.c ++sprite.c ++sprite.h ++spritest.h ++stats.c ++tableinitcmtemplate.c ++tableinittctemplate.c ++tabletranstemplate.c ++tight.c ++translate.c ++vncauth.c ++vncauth.h ++vncext.c ++xistubs.c ++zlib.c +diff --git a/hw/xfree86/vnc/Makefile.am b/hw/xfree86/vnc/Makefile.am +new file mode 100644 +index 0000000..6f5cd76 +--- /dev/null ++++ b/hw/xfree86/vnc/Makefile.am +@@ -0,0 +1,51 @@ ++AM_CFLAGS = $(DIX_CFLAGS) ++ +libvnc_la_LTLIBRARIES = libvnc.la +libvnc_la_CFLAGS = -I$(top_srcdir)/hw/xfree86/common \ + -I$(top_srcdir)/hw/xfree86/os-support \ @@ -22871,15 +22974,11 @@ diff -pNur xorg-server-1.4.orig/hw/xfree86/vnc/Makefile.am xorg-server-1.4/hw/xf + -I$(top_builddir)/GL/include \ + -I@MESA_SOURCE@/include \ + -DHAVE_XORG_CONFIG_H \ ++ -DHAVE_DIX_CONFIG_H \ + -DXFree86LOADER \ + -DXFREE86VNC=1 \ + -DCHROMIUM=1 \ -+ @LIBDRM_CFLAGS@ \ -+ @GL_CFLAGS@ \ -+ @PIXMAN_CFLAGS@ -+ -+# @MODULE_DEFINES@ -+# @LOADER_DEFINES@ ++ $(AM_CFLAGS) + +libvnc_la_LIBADD = -ljpeg -lcrypt +libvnc_la_LDFLAGS = -module -avoid-version @@ -22913,15 +23012,19 @@ diff -pNur xorg-server-1.4.orig/hw/xfree86/vnc/Makefile.am xorg-server-1.4/hw/xf + zlib.c + +#sdk_HEADERS = vncint.h -diff -pNur xorg-server-1.4.orig/hw/xfree86/vnc/README xorg-server-1.4/hw/xfree86/vnc/README ---- xorg-server-1.4.orig/hw/xfree86/vnc/README 1969-12-31 16:00:00.000000000 -0800 -+++ xorg-server-1.4/hw/xfree86/vnc/README 2007-09-06 16:09:46.000000000 -0700 +diff --git a/hw/xfree86/vnc/README b/hw/xfree86/vnc/README +new file mode 100644 +index 0000000..64aa888 +--- /dev/null ++++ b/hw/xfree86/vnc/README @@ -0,0 +1 @@ +This directory contains the sources for building the vnc.so server extension module. -diff -pNur xorg-server-1.4.orig/hw/xfree86/vnc/vncInit.c xorg-server-1.4/hw/xfree86/vnc/vncInit.c ---- xorg-server-1.4.orig/hw/xfree86/vnc/vncInit.c 1969-12-31 16:00:00.000000000 -0800 -+++ xorg-server-1.4/hw/xfree86/vnc/vncInit.c 2007-09-06 16:09:46.000000000 -0700 -@@ -0,0 +1,638 @@ +diff --git a/hw/xfree86/vnc/vncInit.c b/hw/xfree86/vnc/vncInit.c +new file mode 100644 +index 0000000..e07ac8f +--- /dev/null ++++ b/hw/xfree86/vnc/vncInit.c +@@ -0,0 +1,618 @@ +/* + * Copyright (C) 2002 Alan Hourihane. All Rights Reserved. + * @@ -22962,13 +23065,14 @@ diff -pNur xorg-server-1.4.orig/hw/xfree86/vnc/vncInit.c xorg-server-1.4/hw/xfre +#include "xf86Version.h" + +int vncScreenPrivateIndex = -1; -+int rfbGCIndex = -1; +int inetdSock = -1; +Atom VNC_LAST_CLIENT_ID = 0; +Atom VNC_CONNECT = 0; +char *desktopName = "x11"; +char rfbThisHost[256]; + ++DevPrivateKey VNCScreenKey = &VNCScreenKey; ++ +extern void VncExtensionInit(void); + +Bool VNCInit(ScreenPtr pScreen, unsigned char *FBStart); @@ -23088,13 +23192,10 @@ diff -pNur xorg-server-1.4.orig/hw/xfree86/vnc/vncInit.c xorg-server-1.4/hw/xfre + } +#endif + -+ if (!AllocateGCPrivate(pScreen, rfbGCIndex, sizeof(rfbGCRec))) -+ return FALSE; -+ + if (!(pScreenPriv = xalloc(sizeof(vncScreenRec)))) + return FALSE; + -+ pScreen->devPrivates[vncScreenPrivateIndex].ptr = (pointer)pScreenPriv; ++ dixSetPrivate(&pScreen->devPrivates, VNCScreenKey, pScreenPriv); + + options = xnfalloc(sizeof(VNCOptions)); + (void)memcpy(options, VNCOptions, sizeof(VNCOptions)); @@ -23292,29 +23393,21 @@ diff -pNur xorg-server-1.4.orig/hw/xfree86/vnc/vncInit.c xorg-server-1.4/hw/xfre + = pScreenPriv->rfbServerFormat.blueShift = 0; + } + -+ PointPriv = pScreen->devPrivates[miPointerScreenIndex].ptr; ++ PointPriv = dixLookupPrivate(&(pScreen)->devPrivates, miPointerScreenKey); + + pScreenPriv->spriteFuncs = PointPriv->spriteFuncs; + PointPriv->spriteFuncs = &vncCursorSpriteFuncs; + -+ if (xf86LoaderCheckSymbol("xf86CursorScreenIndex")) { -+ int *si; ++ xf86CursorPriv = dixLookupPrivate(&(pScreen)->devPrivates, xf86CursorScreenKey); + -+ si = LoaderSymbol("xf86CursorScreenIndex"); -+ -+ if (*si != -1) { -+ xf86CursorPriv = pScreen->devPrivates[*si].ptr; -+ -+ if (xf86CursorPriv) { -+ pScreenPriv->UseHWCursor = xf86CursorPriv->CursorInfoPtr->UseHWCursor; -+ xf86CursorPriv->CursorInfoPtr->UseHWCursor = vncUseHWCursor; ++ if (xf86CursorPriv) { ++ pScreenPriv->UseHWCursor = xf86CursorPriv->CursorInfoPtr->UseHWCursor; ++ xf86CursorPriv->CursorInfoPtr->UseHWCursor = vncUseHWCursor; +#ifdef ARGB_CURSOR -+ pScreenPriv->UseHWCursorARGB = xf86CursorPriv->CursorInfoPtr->UseHWCursorARGB; -+ xf86CursorPriv->CursorInfoPtr->UseHWCursorARGB = vncUseHWCursorARGB; ++ pScreenPriv->UseHWCursorARGB = xf86CursorPriv->CursorInfoPtr->UseHWCursorARGB; ++ xf86CursorPriv->CursorInfoPtr->UseHWCursorARGB = vncUseHWCursorARGB; +#endif -+ pScreenPriv->SWCursor = &xf86CursorPriv->SWCursor; -+ } -+ } ++ pScreenPriv->SWCursor = &xf86CursorPriv->SWCursor; + } + + return TRUE; @@ -23541,16 +23634,6 @@ diff -pNur xorg-server-1.4.orig/hw/xfree86/vnc/vncInit.c xorg-server-1.4/hw/xfre +static pointer +vncSetup(pointer Module, pointer Options, int *ErrorMajor, int *ErrorMinor) +{ -+ static Bool Initialised = FALSE; -+ -+ if (!Initialised) { -+ Initialised = TRUE; -+#ifndef REMOVE_LOADER_CHECK_MODULE_INFO -+ if (xf86LoaderCheckSymbol("xf86AddModuleInfo")) -+#endif -+ xf86AddModuleInfo(&VNC, Module); -+ } -+ + LoadExtension(&vncExtensionModule, FALSE); + /* add mouse/kbd input drivers */ + vncInitMouse(); @@ -23560,10 +23643,12 @@ diff -pNur xorg-server-1.4.orig/hw/xfree86/vnc/vncInit.c xorg-server-1.4/hw/xfre + return (pointer)TRUE; +} +#endif -diff -pNur xorg-server-1.4.orig/hw/xfree86/vnc/vncint.h xorg-server-1.4/hw/xfree86/vnc/vncint.h ---- xorg-server-1.4.orig/hw/xfree86/vnc/vncint.h 1969-12-31 16:00:00.000000000 -0800 -+++ xorg-server-1.4/hw/xfree86/vnc/vncint.h 2007-09-06 16:09:46.000000000 -0700 -@@ -0,0 +1,154 @@ +diff --git a/hw/xfree86/vnc/vncint.h b/hw/xfree86/vnc/vncint.h +new file mode 100644 +index 0000000..43aeaae +--- /dev/null ++++ b/hw/xfree86/vnc/vncint.h +@@ -0,0 +1,151 @@ +/* + * Copyright (C) 2002 Alan Hourihane. All Rights Reserved. + * @@ -23588,13 +23673,10 @@ diff -pNur xorg-server-1.4.orig/hw/xfree86/vnc/vncint.h xorg-server-1.4/hw/xfree +#ifndef _VNC_H_ +#define _VNC_H_ + -+#include -+/*#include */ -+ -+extern int vncScreenPrivateIndex; ++#include <../ramdac/xf86Cursor.h> + +#define VNCPTR(pScreen)\ -+ (vncScreenPtr)((pScreen)->devPrivates[vncScreenPrivateIndex].ptr) ++ (vncScreenPtr)(dixLookupPrivate(&(pScreen)->devPrivates, VNCScreenKey)) + +typedef struct { + int rfbPort; @@ -23718,31 +23800,10 @@ diff -pNur xorg-server-1.4.orig/hw/xfree86/vnc/vncint.h xorg-server-1.4/hw/xfree + +#endif /* _VNC_H_ */ + -diff -pNur xorg-server-1.4.orig/Makefile.am xorg-server-1.4/Makefile.am ---- xorg-server-1.4.orig/Makefile.am 2007-08-23 12:04:52.000000000 -0700 -+++ xorg-server-1.4/Makefile.am 2007-09-06 16:09:46.000000000 -0700 -@@ -30,6 +30,10 @@ if DBE - DBE_DIR=dbe - endif - -+if XCLIPLIST -+XCLIPLIST_DIR=xcliplist -+endif -+ - SUBDIRS = \ - doc \ - include \ -@@ -54,6 +58,7 @@ SUBDIRS = \ - $(XTRAP_DIR) \ - $(COMPOSITE_DIR) \ - $(GLX_DIR) \ -+ $(XCLIPLIST_DIR) \ - exa \ - config \ - hw -diff -pNur xorg-server-1.4.orig/mi/miinitext.c xorg-server-1.4/mi/miinitext.c ---- xorg-server-1.4.orig/mi/miinitext.c 2007-08-23 12:04:54.000000000 -0700 -+++ xorg-server-1.4/mi/miinitext.c 2007-09-06 16:09:46.000000000 -0700 +diff --git a/mi/miinitext.c b/mi/miinitext.c +index 3c55eeb..4cb6584 100644 +--- a/mi/miinitext.c ++++ b/mi/miinitext.c @@ -79,6 +79,18 @@ SOFTWARE. #undef XF86VIDMODE #endif @@ -23762,9 +23823,35 @@ diff -pNur xorg-server-1.4.orig/mi/miinitext.c xorg-server-1.4/mi/miinitext.c #include "misc.h" #include "extension.h" #include "micmap.h" -diff -pNur xorg-server-1.4.orig/xcliplist/cliplist.c xorg-server-1.4/xcliplist/cliplist.c ---- xorg-server-1.4.orig/xcliplist/cliplist.c 1969-12-31 16:00:00.000000000 -0800 -+++ xorg-server-1.4/xcliplist/cliplist.c 2007-09-06 16:09:46.000000000 -0700 +diff --git a/xcliplist/Makefile.am b/xcliplist/Makefile.am +new file mode 100644 +index 0000000..3f13acc +--- /dev/null ++++ b/xcliplist/Makefile.am +@@ -0,0 +1,18 @@ ++#noinst_LTLIBRARIES = libxcliplist.la ++libxcliplist_la_LTLIBRARIES = libxcliplist.la ++ ++#AM_CFLAGS = $(DIX_CFLAGS) @SERVER_DEFINES@ @LOADER_DEFINES@ ++AM_CFLAGS = $(DIX_CFLAGS) ++ ++libxcliplist_la_LDFLAGS = -module -avoid-version ++libxcliplist_ladir = $(moduledir)/extensions ++ ++libxcliplist_la_SOURCES = \ ++ cliplist.c \ ++ cliplistmod.c ++ ++## cliplistmod.c ++ ++if XORG ++sdk_HEADERS = ++endif +diff --git a/xcliplist/cliplist.c b/xcliplist/cliplist.c +new file mode 100644 +index 0000000..290eb79 +--- /dev/null ++++ b/xcliplist/cliplist.c @@ -0,0 +1,128 @@ +/* + * Server-side code for the Xcliplist extension @@ -23894,12 +23981,14 @@ diff -pNur xorg-server-1.4.orig/xcliplist/cliplist.c xorg-server-1.4/xcliplist/c + XClipListErrorBase = extEntry->errorBase; + } +} -diff -pNur xorg-server-1.4.orig/xcliplist/cliplistmod.c xorg-server-1.4/xcliplist/cliplistmod.c ---- xorg-server-1.4.orig/xcliplist/cliplistmod.c 1969-12-31 16:00:00.000000000 -0800 -+++ xorg-server-1.4/xcliplist/cliplistmod.c 2007-09-06 16:09:46.000000000 -0700 +diff --git a/xcliplist/cliplistmod.c b/xcliplist/cliplistmod.c +new file mode 100644 +index 0000000..c365ca2 +--- /dev/null ++++ b/xcliplist/cliplistmod.c @@ -0,0 +1,46 @@ + -+#include "xorg/xf86Module.h" ++#include "../hw/xfree86/common/xf86Module.h" + +extern Bool noTestExtensions; + @@ -23944,95 +24033,3 @@ diff -pNur xorg-server-1.4.orig/xcliplist/cliplistmod.c xorg-server-1.4/xcliplis + return (pointer)1; +} + -diff -pNur xorg-server-1.4.orig/xcliplist/Makefile.am xorg-server-1.4/xcliplist/Makefile.am ---- xorg-server-1.4.orig/xcliplist/Makefile.am 1969-12-31 16:00:00.000000000 -0800 -+++ xorg-server-1.4/xcliplist/Makefile.am 2007-09-06 16:09:46.000000000 -0700 -@@ -0,0 +1,18 @@ -+#noinst_LTLIBRARIES = libxcliplist.la -+libxcliplist_la_LTLIBRARIES = libxcliplist.la -+ -+#AM_CFLAGS = $(DIX_CFLAGS) @SERVER_DEFINES@ @LOADER_DEFINES@ -+AM_CFLAGS = $(DIX_CFLAGS) -+ -+libxcliplist_la_LDFLAGS = -module -avoid-version -+libxcliplist_ladir = $(moduledir)/extensions -+ -+libxcliplist_la_SOURCES = \ -+ cliplist.c \ -+ cliplistmod.c -+ -+## cliplistmod.c -+ -+if XORG -+sdk_HEADERS = -+endif ---- a/hw/dmx/Makefile.am.orig 2008-04-10 20:57:59.000000000 +0200 -+++ a/hw/dmx/Makefile.am 2008-06-16 18:29:11.000000000 +0200 -@@ -1,6 +1,6 @@ --DIST_SUBDIRS = input config glxProxy examples doc -+DIST_SUBDIRS = input vnc config glxProxy examples doc - --SUBDIRS = input config examples -+SUBDIRS = input vnc config examples - bin_PROGRAMS = Xdmx - - if XINERAMA -@@ -85,7 +85,9 @@ - @XDMX_LIBS@ \ - $(GLX_LIBS) \ - input/libdmxinput.a \ -+ vnc/libdmxvnc.a \ - config/libdmxconfig.a \ -+ -ljpeg -lcrypt \ - $(XSERVER_LIBS) - - Xdmx_LDFLAGS = $(LD_EXPORT_SYMBOLS_FLAG) ---- a/hw/Makefile.am.orig 2008-05-21 23:51:51.000000000 +0200 -+++ a/hw/Makefile.am 2008-06-16 18:33:58.000000000 +0200 -@@ -34,6 +34,10 @@ - XQUARTZ_SUBDIRS = xquartz - endif - -+if VNC -+VNC_SUBDIRS = vnc -+endif -+ - SUBDIRS = \ - $(XORG_SUBDIRS) \ - $(XGL_SUBDIRS) \ -@@ -41,6 +45,7 @@ - $(XVFB_SUBDIRS) \ - $(XNEST_SUBDIRS) \ - $(DMX_SUBDIRS) \ -+ $(VNC_SUBDIRS) \ - $(KDRIVE_SUBDIRS) \ - $(XQUARTZ_SUBDIRS) \ - $(XPRINT_SUBDIRS) ---- a/hw/xfree86/Makefile.am.orig 2008-05-21 23:51:52.000000000 +0200 -+++ a/hw/xfree86/Makefile.am 2008-06-16 18:37:31.000000000 +0200 -@@ -8,6 +8,10 @@ - DRI2_SUBDIR = dri2 - endif - -+if VNC -+VNC_SUBDIR = vnc -+endif -+ - if XF86UTILS - XF86UTILS_SUBDIR = utils - endif -@@ -25,12 +29,12 @@ - SUBDIRS = common ddc dummylib i2c x86emu int10 fbdevhw os-support parser rac \ - ramdac shadowfb vbe vgahw xaa $(MFB_SUBDIR) $(CFB_SUBDIR) \ - xf8_16bpp loader dixmods exa modes \ -- $(DRI_SUBDIR) $(DRI2_SUBDIR) $(XF86UTILS_SUBDIR) $(DOC_SUBDIR) -+ $(DRI_SUBDIR) $(DRI2_SUBDIR) $(XF86UTILS_SUBDIR) $(DOC_SUBDIR) $(VNC_SUBDIR) - - DIST_SUBDIRS = common ddc dummylib i2c x86emu int10 fbdevhw os-support \ - parser rac ramdac shadowfb vbe vgahw xaa xf1bpp xf4bpp \ - xf8_16bpp xf8_32bpp loader dixmods dri dri2 exa modes \ -- utils doc -+ utils doc vnc - - bin_PROGRAMS = Xorg - diff --git a/xorg-x11-server.changes b/xorg-x11-server.changes index b9cd3c9..0d2f430 100644 --- a/xorg-x11-server.changes +++ b/xorg-x11-server.changes @@ -1,3 +1,32 @@ +------------------------------------------------------------------- +Thu Jul 10 10:27:18 CEST 2008 - sndirsch@suse.de + +- xorg-server-xf4vnc-TranslateNone.diff + * supposed to fix Xvnc crash when VNC client is running on a + display with the same color depth (bnc #389386) +- ppc.diff + * fixes build on ppc/ppc64 + +------------------------------------------------------------------- +Thu Jul 10 09:34:11 CEST 2008 - sndirsch@suse.de + +- enabled build of Xvnc/libvnc +- xorg-server-xf4vnc-disable-dmxvnc.diff + * disabled VNC feature in DMX to fix VNC build + +------------------------------------------------------------------- +Thu Jul 10 08:56:00 CEST 2008 - sndirsch@suse.de + +- updated to new vnc patch "xorg-server-xf4vnc.patch "by Dan + Nicholson, which is still disabled due to build errors +- obsoletes the following patches: + * xorg-server-1.4-vnc-64bit.diff + * xorg-server-1.4-vnc-disable_render.diff + * xorg-server-1.4-vnc-fix.patch + * xorg-server-1.4-vnc-memory.diff + * xorg-server-1.4-vnc-render_sig11.diff + * xorg-server-1.4-vnc.patch + ------------------------------------------------------------------- Tue Jul 8 08:38:15 CEST 2008 - sndirsch@suse.de diff --git a/xorg-x11-server.spec b/xorg-x11-server.spec index f9431a6..cdadadd 100644 --- a/xorg-x11-server.spec +++ b/xorg-x11-server.spec @@ -14,8 +14,7 @@ Name: xorg-x11-server %define dirsuffix 1.4.99.905 %define fglrx_driver_hack 0 -### FIXME -%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-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 %if %vnc BuildRequires: libjpeg-devel @@ -23,7 +22,7 @@ BuildRequires: libjpeg-devel Url: http://xorg.freedesktop.org/ %define EXPERIMENTAL 0 Version: 7.3 -Release: 115 +Release: 117 License: X11/MIT BuildRoot: %{_tmppath}/%{name}-%{version}-build Group: System/X11/Servers/XF86_4 @@ -65,10 +64,10 @@ Patch34: p_pci-off-by-one.diff.ia64 Patch36: libdrm.diff %if %vnc ### Dan Nicholson -#http://www.linuxfromscratch.org/~dnicholson/patches/xorg-server-1.4-vnc.patch -Patch39: xorg-server-1.4-vnc.patch -Patch40: xorg-server-1.4-vnc-fix.patch -Patch43: xorg-server-1.4-vnc-64bit.diff +#http://people.freedesktop.org/~dbn/xorg-server-xf4vnc.patch +Patch39: xorg-server-xf4vnc.patch +Patch40: xorg-server-xf4vnc-disable-dmxvnc.diff +Patch42: xorg-server-xf4vnc-TranslateNone.diff %endif Patch41: loadmod-bug197195.diff Patch45: bug-197858_dpms.diff @@ -82,17 +81,15 @@ Patch88: commit-f6401f9.diff Patch93: pixman.diff Patch99: commit-50e80c3.diff Patch101: zap_warning_xserver.diff -Patch102: xorg-server-1.4-vnc-memory.diff Patch103: confine_to_shape.diff Patch104: bitmap_always_unscaled.diff Patch106: randr1_1-sig11.diff Patch109: events.diff -Patch110: xorg-server-1.4-vnc-disable_render.diff -Patch111: xorg-server-1.4-vnc-render_sig11.diff Patch112: fix-dpi-values.diff Patch113: no-return-in-nonvoid-function.diff Patch114: 64bit-portability-issue.diff Patch115: commit-a18551c.diff +Patch116: ppc.diff %description This package contains the X.Org Server. @@ -179,12 +176,8 @@ popd %patch36 -p0 %if %vnc %patch39 -p1 -%patch40 -p1 -%patch43 -p0 -%patch102 -p1 -### disabled since it broke 24bit color depth support (Bug #390011) -#%patch110 -p0 -%patch111 -p0 +%patch40 -p0 +%patch42 -p1 chmod 755 hw/vnc/symlink-vnc.sh %endif %patch41 -p1 @@ -211,6 +204,9 @@ popd %patch113 -p0 %patch114 -p0 %patch115 -p1 +%ifarch ppc ppc64 +%patch116 -p1 +%endif %build pushd xorg-docs-* @@ -327,11 +323,6 @@ mkdir -p $RPM_BUILD_ROOT/etc/modprobe.d install -m 644 $RPM_SOURCE_DIR/modprobe.nvidia $RPM_BUILD_ROOT/etc/modprobe.d/nvidia %endif %if %vnc -%ifarch s390 s390x -rm $RPM_BUILD_ROOT/mfb.h -%endif -%endif -%if %vnc mkdir -p $RPM_BUILD_ROOT/etc/sysconfig/SuSEfirewall2.d/services cat > $RPM_BUILD_ROOT/etc/sysconfig/SuSEfirewall2.d/services/%{name} << EOF ## Name: VNC Server @@ -530,6 +521,26 @@ exit 0 %endif %changelog +* Thu Jul 10 2008 sndirsch@suse.de +- xorg-server-xf4vnc-TranslateNone.diff + * supposed to fix Xvnc crash when VNC client is running on a + display with the same color depth (bnc #389386) +- ppc.diff + * fixes build on ppc/ppc64 +* Thu Jul 10 2008 sndirsch@suse.de +- enabled build of Xvnc/libvnc +- xorg-server-xf4vnc-disable-dmxvnc.diff + * disabled VNC feature in DMX to fix VNC build +* Thu Jul 10 2008 sndirsch@suse.de +- updated to new vnc patch "xorg-server-xf4vnc.patch "by Dan + Nicholson, which is still disabled due to build errors +- obsoletes the following patches: + * xorg-server-1.4-vnc-64bit.diff + * xorg-server-1.4-vnc-disable_render.diff + * xorg-server-1.4-vnc-fix.patch + * xorg-server-1.4-vnc-memory.diff + * xorg-server-1.4-vnc-render_sig11.diff + * xorg-server-1.4-vnc.patch * Tue Jul 08 2008 sndirsch@suse.de - commit-a18551c.diff * Fix GLX in Xvfb and kdrive.