On Thu, 10 Mar 2005, Alan Hourihane wrote: >>> Have you tried xf4vnc's vnc.so or Xvnc ??
>>> Does that work for you as it has RENDER support, and I don't believe >>> seeing troubles with it. >> >> Yes, it works. I cannot reproduce the OO problem with this version. >> >> I've noticed that your sources contains some RENDER stuff, like: >> >> /* wrapped screen functions */ >> ... >> #ifdef RENDER >> CompositeProcPtr Composite; >> #endif >> >> I guess this is what's missing from the other versions. > > Right. Thanks. The patch below (against TightVNC 1.5 CVS) seems to fix the problem. Index: vnc/Imakefile =================================================================== RCS file: /cvsroot/vnc-tight/tightvnc/xc/programs/Xserver/vnc/Imakefile,v retrieving revision 1.2 diff -u -r1.2 Imakefile --- vnc/Imakefile 10 Feb 2005 13:48:57 -0000 1.2 +++ vnc/Imakefile 10 Mar 2005 12:06:32 -0000 @@ -18,7 +18,7 @@ SRCS = vncExtInit.cc vncHooks.cc XserverDesktop.cc OBJS = vncExtInit.o vncHooks.o XserverDesktop.o INCLUDES = -I../include -I$(EXTINCSRC) -I$(XINCLUDESRC) -I$(FONTINCSRC) \ - -I../mfb -I../mi $(VNCINCLUDE) + -I../render $(VNCINCLUDE) #if defined(XFree86Version) && XFree86Version >= 4000 VNCDEFINES = -DGC_HAS_COMPOSITE_CLIP #endif Index: vnc/vncHooks.cc =================================================================== RCS file: /cvsroot/vnc-tight/tightvnc/xc/programs/Xserver/vnc/vncHooks.cc,v retrieving revision 1.1.1.1 diff -u -r1.1.1.1 vncHooks.cc --- vnc/vncHooks.cc 8 Oct 2004 09:44:18 -0000 1.1.1.1 +++ vnc/vncHooks.cc 10 Mar 2005 12:06:32 -0000 @@ -29,6 +29,9 @@ #include "regionstr.h" #include "dixfontstr.h" #include "colormapst.h" +#ifdef RENDER +#include "picturestr.h" +#endif #ifdef GC_HAS_COMPOSITE_CLIP #define COMPOSITE_CLIP(gc) ((gc)->pCompositeClip) @@ -74,6 +77,9 @@ StoreColorsProcPtr StoreColors; DisplayCursorProcPtr DisplayCursor; ScreenBlockHandlerProcPtr BlockHandler; +#ifdef RENDER + CompositeProcPtr Composite; +#endif } vncHooksScreenRec, *vncHooksScreenPtr; typedef struct { @@ -104,6 +110,11 @@ static Bool vncHooksDisplayCursor(ScreenPtr pScreen, CursorPtr cursor); static void vncHooksBlockHandler(int i, pointer blockData, pointer pTimeout, pointer pReadmask); +#ifdef RENDER +static void vncHooksComposite(CARD8 op, PicturePtr pSrc, PicturePtr pMask, + PicturePtr pDst, INT16 xSrc, INT16 ySrc, INT16 xMask, + INT16 yMask, INT16 xDst, INT16 yDst, CARD16 width, CARD16 height); +#endif // GC "funcs" @@ -229,6 +240,13 @@ vncHooksScreen->StoreColors = pScreen->StoreColors; vncHooksScreen->DisplayCursor = pScreen->DisplayCursor; vncHooksScreen->BlockHandler = pScreen->BlockHandler; +#ifdef RENDER + PictureScreenPtr ps; + ps = GetPictureScreenIfSet(pScreen); + if (ps) { + vncHooksScreen->Composite = ps->Composite; + } +#endif pScreen->CloseScreen = vncHooksCloseScreen; pScreen->CreateGC = vncHooksCreateGC; @@ -241,6 +259,11 @@ pScreen->StoreColors = vncHooksStoreColors; pScreen->DisplayCursor = vncHooksDisplayCursor; pScreen->BlockHandler = vncHooksBlockHandler; +#ifdef RENDER + if (ps) { + ps->Composite = vncHooksComposite; + } +#endif return TRUE; } @@ -470,6 +493,33 @@ SCREEN_REWRAP(BlockHandler); } +// Composite - needed for RENDER + +#ifdef RENDER +void vncHooksComposite(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; + vncHooksScreenPtr vncHooksScreen = ((vncHooksScreenPtr)pScreen->devPrivates[vncHooksScreenIndex].ptr); + BoxRec box; + PictureScreenPtr ps = GetPictureScreen(pScreen); + + box.x1 = pDst->pDrawable->x + xDst; + box.y1 = pDst->pDrawable->y + yDst; + box.x2 = box.x1 + width; + box.y2 = box.y1 + height; + + RegionHelper changed(pScreen, &box, 0); + vncHooksScreen->desktop->add_changed(changed.reg); + + ps->Composite = vncHooksScreen->Composite; + (*ps->Composite)(op, pSrc, pMask, pDst, xSrc, ySrc, + xMask, yMask, xDst, yDst, width, height); + ps->Composite = vncHooksComposite; +} + +#endif /* RENDER */ ///////////////////////////////////////////////////////////////////////////// Index: vnc/module/Imakefile =================================================================== RCS file: /cvsroot/vnc-tight/tightvnc/xc/programs/Xserver/vnc/module/Imakefile,v retrieving revision 1.2 diff -u -r1.2 Imakefile --- vnc/module/Imakefile 10 Feb 2005 13:48:58 -0000 1.2 +++ vnc/module/Imakefile 10 Mar 2005 12:06:32 -0000 @@ -12,7 +12,7 @@ OBJS = vncExtInit.o vncHooks.o xf86vncModule.o XserverDesktop.o INCLUDES = -I.. -I../../include -I$(EXTINCSRC) -I$(XINCLUDESRC) \ -I$(FONTINCSRC) -I$(XF86COMSRC) \ - $(VNCINCLUDE) + -I../../render $(VNCINCLUDE) DEFINES = $(STD_DEFINES) -DGC_HAS_COMPOSITE_CLIP -DXFree86LOADER LinkSourceFile(vncExtInit.cc,..) -- Peter Estrand Chief Developer Cendio www.thinlinc.com Teknikringen 3 www.cendio.se 583 30 Linkvping Phone: +46-13-21 46 00 _______________________________________________ VNC-List mailing list VNC-List@realvnc.com To remove yourself from the list visit: http://www.realvnc.com/mailman/listinfo/vnc-list