On Fri, Feb 01, 2008 at 08:52:14PM -0600, Mario Limonciello wrote: > Adam Tkac wrote: > > On Wed, Jan 30, 2008 at 12:13:42PM -0600, Mario Limonciello wrote: > > > > Xvnc source is designed to work with pretty old monolitic XFree > > source. I've forked vnc free edition about 2 months ago as project > > 'baracuda'. You will see https://fedorahosted.org/baracuda/ and > > mercurial repository http://hg.fedorahosted.org/hg/baracuda. Now > > nearly all things works as expected with latest Xorg source (except > > borders of windows aren't correctly rendered but you will help me > > to find how get it fixed) > > > > Adam > > > Adam, > > I got pretty far into building this into a nice source package that grabs our > X > source and would integrate nicely into our releases. Unfortunately, I didn't > realize until a little bit ago that you have been targeting xorg-server-1.5. > This is trouble since our development release is still tracking > xorg-server-1.4. > It appears a ton has already changed between the APIs of the two.
Only privates allocation is different, patch is pretty simple. > > Without hunting too much in depth on your earlier checkouts, any luck that you > were targeting 1.4 before, and switched to 1.5 later? > > If not, then I guess this solution won't work for us :( > Please try attached patch and try build with this way: (I still don't have time to update documentation about building :)) - build rfb libraries and client apps autoreconf -fiv ./configure make - build server copy xserver codebase to bin/xorg subdirectory (I tried it with your https://launchpad.net/ubuntu/hardy/+source/xorg-server/2:1.4.1~git20080118-1ubuntu2 codebase) - patch source with bin/xorg.patch (you should correct hw/Makefile.am failure) - export CPPFLAGS='-DXSERVER_1_4' - see bin/test-build script which options I'm using for building (your may be different) - run make Adam -- Adam Tkac, Red Hat, Inc. diff -r 69b822429c1d bin/xorg/hw/vnc/vncHooks.cc --- a/bin/xorg/hw/vnc/vncHooks.cc Tue Jan 29 11:25:02 2008 +0100 +++ b/bin/xorg/hw/vnc/vncHooks.cc Mon Feb 04 12:12:09 2008 +0100 @@ -87,6 +87,17 @@ typedef struct { GCOps *wrappedOps; } vncHooksGCRec, *vncHooksGCPtr; +#ifdef XSERVER_1_4 +static int vncHooksScreenIndex; +static int vncHooksGCIndex; + +#define vncHooksScreenPrivate(scrn) \ + ((vncHooksScreenPtr) (scrn)->devPrivates[vncHooksScreenIndex].ptr) + +#define vncHooksGCPrivate(pGC) \ + ((vncHooksGCPtr)(pGC)->devPrivates[vncHooksGCIndex].ptr) + +#else static DevPrivateKey vncHooksScrPrivateKey = &vncHooksScrPrivateKey; static DevPrivateKey vncHooksGCPrivateKey = &vncHooksGCPrivateKey; @@ -96,6 +107,7 @@ static DevPrivateKey vncHooksGCPrivateKe #define vncHooksGCPrivate(pGC) \ (vncHooksGCPtr) dixLookupPrivate (&(pGC)->devPrivates, \ vncHooksGCPrivateKey) +#endif // screen functions @@ -215,12 +227,33 @@ Bool vncHooksInit(ScreenPtr pScreen, Xse if (vncHooksGeneration != serverGeneration) { vncHooksGeneration = serverGeneration; +#ifdef XSERVER_1_4 + vncHooksScreenIndex = AllocateScreenPrivateIndex(); + if (vncHooksScreenIndex < 0) { + ErrorF("vncHooksInit: AllocateScreenPrivateIndex failed\n"); + return FALSE; + } + vncHooksGCIndex = AllocateGCPrivateIndex(); + if (vncHooksGCIndex < 0) { + ErrorF("vncHooksInit: AllocateGCPrivateIndex failed\n"); + return FALSE; + } + } + + if (!AllocateGCPrivate(pScreen, vncHooksGCIndex, sizeof(vncHooksGCRec))) { + ErrorF("vncHooksInit: AllocateGCPrivate failed\n"); + return FALSE; +#else if (!dixRequestPrivate (vncHooksGCPrivateKey, sizeof (vncHooksGCRec))) return FALSE; +#endif } vncHooksScreen = (vncHooksScreenPtr)xnfalloc(sizeof(vncHooksScreenRec)); +#ifdef XSERVER_1_4 + pScreen->devPrivates[vncHooksScreenIndex].ptr = (pointer)vncHooksScreen; +#endif vncHooksScreen->desktop = desktop; @@ -258,7 +291,9 @@ Bool vncHooksInit(ScreenPtr pScreen, Xse pScreen->DisplayCursor = vncHooksDisplayCursor; pScreen->BlockHandler = vncHooksBlockHandler; +#ifndef XSERVER_1_4 dixSetPrivate (&pScreen->devPrivates, vncHooksScrPrivateKey, vncHooksScreen); +#endif return TRUE; } _______________________________________________ VNC-List mailing list [email protected] To remove yourself from the list visit: http://www.realvnc.com/mailman/listinfo/vnc-list
