diff options
21 files changed, 349 insertions, 264 deletions
diff --git a/nx-X11/programs/Xserver/Xext/dpms.c b/nx-X11/programs/Xserver/Xext/dpms.c index 81bbd5179..3342f7738 100644 --- a/nx-X11/programs/Xserver/Xext/dpms.c +++ b/nx-X11/programs/Xserver/Xext/dpms.c @@ -196,12 +196,15 @@ static int ProcDPMSEnable(client) register ClientPtr client; { - /* REQUEST(xDPMSEnableReq); */ + Bool was_enabled = DPMSEnabled; REQUEST_SIZE_MATCH(xDPMSEnableReq); - if (DPMSCapableFlag) + if (DPMSCapableFlag) { DPMSEnabled = TRUE; + if (!was_enabled) + SetScreenSaverTimer(); + } return(client->noClientException); } diff --git a/nx-X11/programs/Xserver/Xext/panoramiX.c b/nx-X11/programs/Xserver/Xext/panoramiX.c index e36d04d9e..6eab7f36d 100644 --- a/nx-X11/programs/Xserver/Xext/panoramiX.c +++ b/nx-X11/programs/Xserver/Xext/panoramiX.c @@ -55,8 +55,10 @@ Equipment Corporation. #ifdef RENDER #include "picturestr.h" #endif + #include "protocol-versions.h" + #ifdef GLXPROXY extern VisualPtr glxMatchVisual(ScreenPtr pScreen, VisualPtr pVisual, @@ -107,7 +109,6 @@ static void PanoramiXResetProc(ExtensionEntry*); #include "panoramiXh.h" int (* SavedProcVector[256]) (ClientPtr client) = { NULL, }; -ScreenInfo *GlobalScrInfo = NULL; static int PanoramiXGCIndex = -1; static int PanoramiXScreenIndex = -1; @@ -133,7 +134,7 @@ static void XineramaChangeClip(GCPtr, int, void *, int); static void XineramaDestroyClip(GCPtr); static void XineramaCopyClip(GCPtr, GCPtr); -GCFuncs XineramaGCFuncs = { +static GCFuncs XineramaGCFuncs = { XineramaValidateGC, XineramaChangeGC, XineramaCopyGC, XineramaDestroyGC, XineramaChangeClip, XineramaDestroyClip, XineramaCopyClip }; @@ -166,7 +167,7 @@ XineramaCloseScreen (ScreenPtr pScreen) return (*pScreen->CloseScreen) (pScreen); } -Bool +static Bool XineramaCreateGC(GCPtr pGC) { ScreenPtr pScreen = pGC->pScreen; @@ -337,32 +338,11 @@ XineramaDeleteResource(void * data, XID id) return 1; } - -static Bool -XineramaFindIDOnAnyScreen(void * resource, XID id, void * privdata) -{ - PanoramiXRes *res = (PanoramiXRes*)resource; - int j; - - FOR_NSCREENS(j) - if(res->info[j].id == *((XID*)privdata)) return TRUE; - - return FALSE; -} - -PanoramiXRes * -PanoramiXFindIDOnAnyScreen(RESTYPE type, XID id) -{ - return LookupClientResourceComplex(clients[CLIENT_ID(id)], type, - XineramaFindIDOnAnyScreen, &id); -} - typedef struct { int screen; int id; } PanoramiXSearchData; - static Bool XineramaFindIDByScrnum(void * resource, XID id, void * privdata) { @@ -387,23 +367,6 @@ PanoramiXFindIDByScrnum(RESTYPE type, XID id, int screen) XineramaFindIDByScrnum, &data); } -WindowPtr -PanoramiXChangeWindow(int ScrnNum, WindowPtr pWin) -{ - int num = pWin->drawable.pScreen->myNum; - - if(num != ScrnNum) { - PanoramiXRes *win; - - win = PanoramiXFindIDByScrnum(XRT_WINDOW, pWin->drawable.id, num); - - if (win) - pWin = (WindowPtr) LookupIDByType(win->info[ScrnNum].id, RT_WINDOW); - } - - return pWin; -} - typedef struct _connect_callback_list { void (*func)(void); struct _connect_callback_list *next; @@ -494,7 +457,6 @@ void PanoramiXExtensionInit(int argc, char *argv[]) if (noPanoramiXExtension) return; - GlobalScrInfo = &screenInfo; /* For debug visibility */ PanoramiXNumScreens = screenInfo.numScreens; if (PanoramiXNumScreens == 1) { /* Only 1 screen */ noPanoramiXExtension = TRUE; diff --git a/nx-X11/programs/Xserver/Xext/panoramiX.h b/nx-X11/programs/Xserver/Xext/panoramiX.h index 210ba2751..22b93ea87 100644 --- a/nx-X11/programs/Xserver/Xext/panoramiX.h +++ b/nx-X11/programs/Xserver/Xext/panoramiX.h @@ -1,4 +1,3 @@ -/* $TOG: panoramiX.h /main/4 1998/03/17 06:51:02 kaleb $ */ /***************************************************************** Copyright (c) 1991, 1997 Digital Equipment Corporation, Maynard, Massachusetts. @@ -94,18 +93,6 @@ typedef struct { (a).root = screenInfo.screens[0]->root->drawable.id; \ } -#define FORCE_WIN(a) { \ - if ((win = PanoramiXFindIDOnAnyScreen(XRT_WINDOW, a))) { \ - (a) = win->info[0].id; /* Real ID */ \ - } \ -} - -#define FORCE_CMAP(a) { \ - if ((win = PanoramiXFindIDOnAnyScreen(XRT_COLORMAP, a))) { \ - (a) = win->info[0].id; /* Real ID */ \ - } \ -} - #define IS_SHARED_PIXMAP(r) (((r)->type == XRT_PIXMAP) && (r)->u.pix.shared) #define SKIP_FAKE_WINDOW(a) if(!LookupIDByType(a, XRT_WINDOW)) return diff --git a/nx-X11/programs/Xserver/Xext/panoramiXSwap.c b/nx-X11/programs/Xserver/Xext/panoramiXSwap.c index c597da39c..4a8dcbdb7 100644 --- a/nx-X11/programs/Xserver/Xext/panoramiXSwap.c +++ b/nx-X11/programs/Xserver/Xext/panoramiXSwap.c @@ -68,6 +68,7 @@ SProcPanoramiXGetState(ClientPtr client) swaps (&stuff->length); REQUEST_SIZE_MATCH(xPanoramiXGetStateReq); + swapl (&stuff->window); return ProcPanoramiXGetState(client); } @@ -78,6 +79,7 @@ SProcPanoramiXGetScreenCount(ClientPtr client) swaps (&stuff->length); REQUEST_SIZE_MATCH(xPanoramiXGetScreenCountReq); + swapl (&stuff->window); return ProcPanoramiXGetScreenCount(client); } @@ -88,6 +90,8 @@ SProcPanoramiXGetScreenSize(ClientPtr client) swaps (&stuff->length); REQUEST_SIZE_MATCH(xPanoramiXGetScreenSizeReq); + swapl (&stuff->window); + swapl (&stuff->screen); return ProcPanoramiXGetScreenSize(client); } diff --git a/nx-X11/programs/Xserver/Xext/panoramiXh.h b/nx-X11/programs/Xserver/Xext/panoramiXh.h index 6cee650ac..1a76a45cd 100644 --- a/nx-X11/programs/Xserver/Xext/panoramiXh.h +++ b/nx-X11/programs/Xserver/Xext/panoramiXh.h @@ -19,10 +19,10 @@ extern int PanoramiXGetGeometry(ClientPtr client); extern int PanoramiXTranslateCoords(ClientPtr client); extern int PanoramiXCreatePixmap(ClientPtr client); extern int PanoramiXFreePixmap(ClientPtr client); -extern int PanoramiXCreateGC(ClientPtr client); extern int PanoramiXChangeGC(ClientPtr client); extern int PanoramiXCopyGC(ClientPtr client); extern int PanoramiXCopyColormapAndFree(ClientPtr client); +extern int PanoramiXCreateGC(ClientPtr client); extern int PanoramiXSetDashes(ClientPtr client); extern int PanoramiXSetClipRectangles(ClientPtr client); extern int PanoramiXFreeGC(ClientPtr client); @@ -64,7 +64,6 @@ PROC_EXTERN(ProcPanoramiXGetScreenSize); PROC_EXTERN(ProcXineramaQueryScreens); PROC_EXTERN(ProcXineramaIsActive); -extern Bool XineramaCreateGC(GCPtr pGC); extern int SProcPanoramiXDispatch(ClientPtr client); @@ -72,6 +71,4 @@ extern char *ConnectionInfo; extern int connBlockScreenStart; extern xConnSetupPrefix connSetupPrefix; -extern ScreenInfo *GlobalScrInfo; extern int (* SavedProcVector[256]) (ClientPtr client); - diff --git a/nx-X11/programs/Xserver/Xext/panoramiXprocs.c b/nx-X11/programs/Xserver/Xext/panoramiXprocs.c index 053213573..ce12bd9fd 100644 --- a/nx-X11/programs/Xserver/Xext/panoramiXprocs.c +++ b/nx-X11/programs/Xserver/Xext/panoramiXprocs.c @@ -572,7 +572,7 @@ int PanoramiXTranslateCoords(ClientPtr client) INT16 x, y; REQUEST(xTranslateCoordsReq); - register WindowPtr pWin, pDst; + WindowPtr pWin, pDst; xTranslateCoordsReply rep; REQUEST_SIZE_MATCH(xTranslateCoordsReq); @@ -1080,8 +1080,8 @@ int PanoramiXCopyArea(ClientPtr client) VALIDATE_DRAWABLE_AND_GC(stuff->dstDrawable, pDst, pGC, client); if (stuff->dstDrawable != stuff->srcDrawable) { SECURITY_VERIFY_DRAWABLE(pSrc, stuff->srcDrawable, client, - DixReadAccess); - if ((pDst->pScreen != pSrc->pScreen) || + DixReadAccess); + if ((pDst->pScreen != pSrc->pScreen) || (pDst->depth != pSrc->depth)) { client->errorValue = stuff->dstDrawable; return (BadMatch); @@ -1186,7 +1186,7 @@ int PanoramiXCopyPlane(ClientPtr client) VALIDATE_DRAWABLE_AND_GC(stuff->dstDrawable, pdstDraw, pGC, client); if (stuff->dstDrawable != stuff->srcDrawable) { SECURITY_VERIFY_DRAWABLE(psrcDraw, stuff->srcDrawable, client, - DixReadAccess); + DixReadAccess); if (pdstDraw->pScreen != psrcDraw->pScreen) { client->errorValue = stuff->dstDrawable; return (BadMatch); diff --git a/nx-X11/programs/Xserver/Xext/saver.c b/nx-X11/programs/Xserver/Xext/saver.c index 89eebd7b1..65c43f6b4 100644 --- a/nx-X11/programs/Xserver/Xext/saver.c +++ b/nx-X11/programs/Xserver/Xext/saver.c @@ -1,5 +1,4 @@ /* - * $XConsortium: saver.c,v 1.12 94/04/17 20:59:36 dpw Exp $ * Copyright (c) 1992 X Consortium @@ -65,7 +64,7 @@ static unsigned char ScreenSaverReqCode = 0; #endif static int ScreenSaverEventBase = 0; -extern DISPATCH_PROC(ProcScreenSaverQueryInfo); +static DISPATCH_PROC(ProcScreenSaverQueryInfo); static DISPATCH_PROC(ProcScreenSaverDispatch); static DISPATCH_PROC(ProcScreenSaverQueryVersion); static DISPATCH_PROC(ProcScreenSaverSelectInput); @@ -137,7 +136,7 @@ typedef struct _ScreenSaverSuspension } ScreenSaverSuspensionRec; static int ScreenSaverFreeSuspend( - pointer /*value */, + void * /*value */, XID /* id */ ); @@ -461,7 +460,7 @@ ScreenSaverFreeAttr (value, id) } static int -ScreenSaverFreeSuspend (pointer value, XID id) +ScreenSaverFreeSuspend (void * value, XID id) { ScreenSaverSuspensionPtr data = (ScreenSaverSuspensionPtr) value; ScreenSaverSuspensionPtr *prev, this; @@ -767,7 +766,7 @@ ProcScreenSaverQueryVersion (client) return (client->noClientException); } -int +static int ProcScreenSaverQueryInfo (client) register ClientPtr client; { @@ -863,9 +862,7 @@ ScreenSaverSetAttributes (ClientPtr client) ScreenPtr pScreen; ScreenSaverScreenPrivatePtr pPriv = 0; ScreenSaverAttrPtr pAttr = 0; - int ret; - int len; - int class, bw, depth; + int ret, len, class, bw, depth; unsigned long visual; int idepth, ivisual; Bool fOK; @@ -1404,7 +1401,7 @@ ProcScreenSaverSuspend (ClientPtr client) this->count = 1; this->clientResource = FakeClientID (client->index); - if (!AddResource (this->clientResource, SuspendType, (pointer) this)) + if (!AddResource (this->clientResource, SuspendType, (void *) this)) { free (this); return BadAlloc; diff --git a/nx-X11/programs/Xserver/Xext/shm.c b/nx-X11/programs/Xserver/Xext/shm.c index ca1ff9a7f..8e99b1047 100644 --- a/nx-X11/programs/Xserver/Xext/shm.c +++ b/nx-X11/programs/Xserver/Xext/shm.c @@ -758,10 +758,10 @@ CreatePmap: if (sizeof(size) == 4 && BitsPerPixel(depth) > 8) { if (size < width * height) return BadAlloc; - /* thankfully, offset is unsigned */ - if (stuff->offset + size < size) - return BadAlloc; } + /* thankfully, offset is unsigned */ + if (stuff->offset + size < size) + return BadAlloc; VERIFY_SHMSIZE(shmdesc, stuff->offset, size, client); @@ -820,8 +820,8 @@ static int ProcShmPutImage(client) register ClientPtr client; { - register GCPtr pGC; - register DrawablePtr pDraw; + GCPtr pGC; + DrawablePtr pDraw; long length; ShmDescPtr shmdesc; REQUEST(xShmPutImageReq); @@ -933,7 +933,7 @@ static int ProcShmGetImage(client) register ClientPtr client; { - register DrawablePtr pDraw; + DrawablePtr pDraw; long lenPer = 0, length; Mask plane = 0; xShmGetImageReply xgi; @@ -1070,7 +1070,7 @@ ProcShmCreatePixmap(client) register ClientPtr client; { PixmapPtr pMap; - register DrawablePtr pDraw; + DrawablePtr pDraw; DepthPtr pDepth; register int i; ShmDescPtr shmdesc; @@ -1112,9 +1112,9 @@ CreatePmap: if (sizeof(size) == 4 && BitsPerPixel(depth) > 8) { if (size < width * height) return BadAlloc; - /* thankfully, offset is unsigned */ - if (stuff->offset + size < size) - return BadAlloc; + /* thankfully, offset is unsigned */ + if (stuff->offset + size < size) + return BadAlloc; } VERIFY_SHMSIZE(shmdesc, stuff->offset, size, client); diff --git a/nx-X11/programs/Xserver/Xext/shmint.h b/nx-X11/programs/Xserver/Xext/shmint.h index 5135d1729..fc056bc72 100644 --- a/nx-X11/programs/Xserver/Xext/shmint.h +++ b/nx-X11/programs/Xserver/Xext/shmint.h @@ -1,6 +1,4 @@ /* - * $Id$ - * * Copyright © 2003 Keith Packard * * Permission to use, copy, modify, distribute, and sell this software and its diff --git a/nx-X11/programs/Xserver/Xext/sleepuntil.c b/nx-X11/programs/Xserver/Xext/sleepuntil.c index cc43815a7..8d59588f0 100644 --- a/nx-X11/programs/Xserver/Xext/sleepuntil.c +++ b/nx-X11/programs/Xserver/Xext/sleepuntil.c @@ -1,5 +1,4 @@ /* - * $Xorg: sleepuntil.c,v 1.4 2001/02/09 02:04:33 xorgcvs Exp $ * Copyright 1992, 1998 The Open Group diff --git a/nx-X11/programs/Xserver/Xext/sync.c b/nx-X11/programs/Xserver/Xext/sync.c index a0711b77a..bc7cb404a 100644 --- a/nx-X11/programs/Xserver/Xext/sync.c +++ b/nx-X11/programs/Xserver/Xext/sync.c @@ -71,9 +71,8 @@ PERFORMANCE OF THIS SOFTWARE. #include "protocol-versions.h" #include <stdio.h> -#if !defined(WIN32) #include <sys/time.h> -#endif + /* * Local Global Variables @@ -572,7 +571,7 @@ SyncSendAlarmNotifyEvents(pAlarm) /* send to other interested clients */ for (pcl = pAlarm->pEventClients; pcl; pcl = pcl->next) - WriteEventsToClient(pcl->client, 1, (xEvent *) &ane); + WriteEventsToClient(pcl->client, 1, (xEvent *) &ane); } @@ -1112,7 +1111,7 @@ SyncComputeBracketValues(pCounter, startOver) { SyncTriggerList *pCur; SyncTrigger *pTrigger; - SysCounterInfo *psci = pCounter->pSysCounterInfo; + SysCounterInfo *psci; CARD64 *pnewgtval = NULL; CARD64 *pnewltval = NULL; SyncCounterType ct; @@ -1120,6 +1119,7 @@ SyncComputeBracketValues(pCounter, startOver) if (!pCounter) return; + psci = pCounter->pSysCounterInfo; ct = pCounter->pSysCounterInfo->counterType; if (ct == XSyncCounterNeverChanges) return; @@ -2460,7 +2460,7 @@ ServertimeQueryValue(pCounter, pValue_return) static void ServertimeBracketValues(pCounter, pbracket_less, pbracket_greater) - void * pCounter; + void *pCounter; CARD64 *pbracket_less; CARD64 *pbracket_greater; { @@ -2480,7 +2480,7 @@ ServertimeBracketValues(pCounter, pbracket_less, pbracket_greater) } static void -SyncInitServerTime() +SyncInitServerTime(void) { CARD64 resolution; @@ -2502,14 +2502,14 @@ static XSyncValue *pIdleTimeValueLess; static XSyncValue *pIdleTimeValueGreater; static void -IdleTimeQueryValue (pointer pCounter, CARD64 *pValue_return) +IdleTimeQueryValue (void *pCounter, CARD64 *pValue_return) { CARD32 idle = GetTimeInMillis() - lastDeviceEventTime.milliseconds; XSyncIntsToValue (pValue_return, idle, 0); } static void -IdleTimeBlockHandler (pointer env, struct timeval **wt, pointer LastSelectMask) +IdleTimeBlockHandler (void *env, struct timeval **wt, void *LastSelectMask) { XSyncValue idle, old_idle; SyncTriggerList *list = IdleTimeCounter->pTriglist; @@ -2584,9 +2584,9 @@ IdleTimeBlockHandler (pointer env, struct timeval **wt, pointer LastSelectMask) } static void -IdleTimeWakeupHandler (pointer env, +IdleTimeWakeupHandler (void * env, int rc, - pointer LastSelectMask) + void * LastSelectMask) { XSyncValue idle; @@ -2598,14 +2598,14 @@ IdleTimeWakeupHandler (pointer env, if ((pIdleTimeValueGreater && XSyncValueGreaterOrEqual (idle, *pIdleTimeValueGreater)) || (pIdleTimeValueLess && - XSyncValueLessOrEqual (idle, *pIdleTimeValueLess))) + XSyncValueLessOrEqual (idle, *pIdleTimeValueLess))) { SyncChangeCounter (IdleTimeCounter, idle); } } static void -IdleTimeBracketValues (pointer pCounter, +IdleTimeBracketValues (void *pCounter, CARD64 *pbracket_less, CARD64 *pbracket_greater) { diff --git a/nx-X11/programs/Xserver/Xext/xf86bigfont.c b/nx-X11/programs/Xserver/Xext/xf86bigfont.c index d8cae74ef..08ce9e5d9 100644 --- a/nx-X11/programs/Xserver/Xext/xf86bigfont.c +++ b/nx-X11/programs/Xserver/Xext/xf86bigfont.c @@ -66,6 +66,7 @@ #include <nx-X11/X.h> #include <nx-X11/Xproto.h> #include "misc.h" +#include "os.h" #include "dixstruct.h" #include "gcstruct.h" #include "dixfontstr.h" diff --git a/nx-X11/programs/Xserver/Xext/xres.c b/nx-X11/programs/Xserver/Xext/xres.c index 03597ad95..977ea4ce6 100644 --- a/nx-X11/programs/Xserver/Xext/xres.c +++ b/nx-X11/programs/Xserver/Xext/xres.c @@ -17,6 +17,9 @@ #include "swaprep.h" #include <nx-X11/extensions/XResproto.h> #include "pixmapstr.h" +#include "windowstr.h" +#include "gcstruct.h" + #include "protocol-versions.h" static int @@ -171,13 +174,54 @@ ProcXResQueryClientResources (ClientPtr client) return (client->noClientException); } +static unsigned long +ResGetApproxPixmapBytes (PixmapPtr pix) +{ + unsigned long nPixels; + int bytesPerPixel; + + bytesPerPixel = pix->drawable.bitsPerPixel>>3; + nPixels = pix->drawable.width * pix->drawable.height; + + /* Divide by refcnt as pixmap could be shared between clients, + * so total pixmap mem is shared between these. + */ + return ( nPixels * bytesPerPixel ) / pix->refcnt; +} + static void ResFindPixmaps (void * value, XID id, void * cdata) { unsigned long *bytes = (unsigned long *)cdata; PixmapPtr pix = (PixmapPtr)value; - *bytes += (pix->devKind * pix->drawable.height); + *bytes += ResGetApproxPixmapBytes(pix); +} + +static void +ResFindWindowPixmaps (void * value, XID id, void * cdata) +{ + unsigned long *bytes = (unsigned long *)cdata; + WindowPtr pWin = (WindowPtr)value; + + if (pWin->backgroundState == BackgroundPixmap) + *bytes += ResGetApproxPixmapBytes(pWin->background.pixmap); + + if (pWin->border.pixmap != NULL && !pWin->borderIsPixel) + *bytes += ResGetApproxPixmapBytes(pWin->border.pixmap); +} + +static void +ResFindGCPixmaps (void * value, XID id, void * cdata) +{ + unsigned long *bytes = (unsigned long *)cdata; + GCPtr pGC = (GCPtr)value; + + if (pGC->stipple != NULL) + *bytes += ResGetApproxPixmapBytes(pGC->stipple); + + if (pGC->tile.pixmap != NULL && !pGC->tileIsPixel) + *bytes += ResGetApproxPixmapBytes(pGC->tile.pixmap); } static int @@ -204,6 +248,24 @@ ProcXResQueryClientPixmapBytes (ClientPtr client) FindClientResourcesByType(clients[clientID], RT_PIXMAP, ResFindPixmaps, (void *)(&bytes)); + /* + * Make sure win background pixmaps also held to account. + */ + FindClientResourcesByType(clients[clientID], RT_WINDOW, + ResFindWindowPixmaps, + (void *)(&bytes)); + + /* + * GC Tile & Stipple pixmaps too. + */ + FindClientResourcesByType(clients[clientID], RT_GC, + ResFindGCPixmaps, + (void *)(&bytes)); + +#ifdef COMPOSITE + /* FIXME: include composite pixmaps too */ +#endif + rep.type = X_Reply; rep.sequenceNumber = client->sequence; rep.length = 0; diff --git a/nx-X11/programs/Xserver/Xext/xtest.c b/nx-X11/programs/Xserver/Xext/xtest.c index a392599ea..b05d31ba5 100644 --- a/nx-X11/programs/Xserver/Xext/xtest.c +++ b/nx-X11/programs/Xserver/Xext/xtest.c @@ -168,12 +168,10 @@ ProcXTestFakeInput(client) register ClientPtr client; { REQUEST(xXTestFakeInputReq); - int nev; - int n; + int nev, n, type; xEvent *ev; DeviceIntPtr dev = NULL; WindowPtr root; - int type; #ifdef XINPUT Bool extension = FALSE; deviceValuator *dv = NULL; @@ -437,6 +435,8 @@ ProcXTestFakeInput(client) (root->drawable.pScreen, ev->u.keyButtonPointer.rootX, ev->u.keyButtonPointer.rootY, FALSE); + dev->valuator->lastx = ev->u.keyButtonPointer.rootX; + dev->valuator->lasty = ev->u.keyButtonPointer.rootY; break; case ButtonPress: case ButtonRelease: diff --git a/nx-X11/programs/Xserver/Xext/xvdisp.c b/nx-X11/programs/Xserver/Xext/xvdisp.c index 5f65c3fcd..54ab4ac48 100644 --- a/nx-X11/programs/Xserver/Xext/xvdisp.c +++ b/nx-X11/programs/Xserver/Xext/xvdisp.c @@ -381,10 +381,8 @@ ProcXvQueryAdaptors(ClientPtr client) xvFormat format; xvAdaptorInfo ainfo; xvQueryAdaptorsReply rep; - int totalSize; - int na; + int totalSize, na, nf; XvAdaptorPtr pa; - int nf; XvFormatPtr pf; WindowPtr pWin; ScreenPtr pScreen; @@ -539,9 +537,9 @@ ProcXvQueryEncodings(ClientPtr client) static int ProcXvPutVideo(ClientPtr client) { - register DrawablePtr pDraw; + DrawablePtr pDraw; XvPortPtr pPort; - register GCPtr pGC; + GCPtr pGC; int status; REQUEST(xvPutVideoReq); @@ -585,9 +583,9 @@ ProcXvPutVideo(ClientPtr client) static int ProcXvPutStill(ClientPtr client) { - register DrawablePtr pDraw; + DrawablePtr pDraw; XvPortPtr pPort; - register GCPtr pGC; + GCPtr pGC; int status; REQUEST(xvPutStillReq); @@ -632,9 +630,9 @@ ProcXvPutStill(ClientPtr client) static int ProcXvGetVideo(ClientPtr client) { - register DrawablePtr pDraw; + DrawablePtr pDraw; XvPortPtr pPort; - register GCPtr pGC; + GCPtr pGC; int status; REQUEST(xvGetVideoReq); @@ -679,9 +677,9 @@ ProcXvGetVideo(ClientPtr client) static int ProcXvGetStill(ClientPtr client) { - register DrawablePtr pDraw; + DrawablePtr pDraw; XvPortPtr pPort; - register GCPtr pGC; + GCPtr pGC; int status; REQUEST(xvGetStillReq); @@ -725,7 +723,7 @@ ProcXvGetStill(ClientPtr client) static int ProcXvSelectVideoNotify(ClientPtr client) { - register DrawablePtr pDraw; + DrawablePtr pDraw; REQUEST(xvSelectVideoNotifyReq); REQUEST_SIZE_MATCH(xvSelectVideoNotifyReq); @@ -831,7 +829,7 @@ static int ProcXvStopVideo(ClientPtr client) { int status; - register DrawablePtr pDraw; + DrawablePtr pDraw; XvPortPtr pPort; REQUEST(xvStopVideoReq); REQUEST_SIZE_MATCH(xvStopVideoReq); diff --git a/nx-X11/programs/Xserver/Xext/xvmain.c b/nx-X11/programs/Xserver/Xext/xvmain.c index c1492fdc6..02e3b0eda 100644 --- a/nx-X11/programs/Xserver/Xext/xvmain.c +++ b/nx-X11/programs/Xserver/Xext/xvmain.c @@ -153,7 +153,7 @@ static int XvdiSendVideoNotify(XvPortPtr, DrawablePtr, int); */ void -XvExtensionInit() +XvExtensionInit(void) { ExtensionEntry *extEntry; @@ -205,7 +205,7 @@ XvExtensionInit() } static Bool -CreateResourceTypes() +CreateResourceTypes(void) { diff --git a/nx-X11/programs/Xserver/Xext/xvmc.c b/nx-X11/programs/Xserver/Xext/xvmc.c index fcd170efd..b24a3c2c8 100644 --- a/nx-X11/programs/Xserver/Xext/xvmc.c +++ b/nx-X11/programs/Xserver/Xext/xvmc.c @@ -668,7 +668,7 @@ SProcXvMCDispatch (ClientPtr client) } void -XvMCExtensionInit() +XvMCExtensionInit(void) { ExtensionEntry *extEntry; diff --git a/nx-X11/programs/Xserver/code-versions.txt b/nx-X11/programs/Xserver/code-versions.txt index fe8938895..37a5f9d44 100644 --- a/nx-X11/programs/Xserver/code-versions.txt +++ b/nx-X11/programs/Xserver/code-versions.txt @@ -16,7 +16,7 @@ os 7.1/1.1 randr 1.18.0 record 1.4.2 render 6.9/7.0 -Xext 7.1/1.1 +Xext 1.4.2 xfixes 1.4.2 Xi 1.3.0.0 xkb 1.3.0.0 diff --git a/nx-X11/programs/Xserver/hw/nxagent/NXshm.c b/nx-X11/programs/Xserver/hw/nxagent/NXshm.c index 5e8e8ed6b..246d39355 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/NXshm.c +++ b/nx-X11/programs/Xserver/hw/nxagent/NXshm.c @@ -95,15 +95,21 @@ ShmExtensionInit(void) } #endif +#ifdef NXAGENT_SERVER if (nxagentOption(SharedMemory) == False) { return; } +#endif sharedPixmaps = xFalse; pixmapFormat = 0; { +#ifdef NXAGENT_SERVER sharedPixmaps = nxagentOption(SharedPixmaps); +#else + sharedPixmaps = xTrue; +#endif pixmapFormat = shmPixFormat[0]; for (i = 0; i < screenInfo.numScreens; i++) { @@ -156,7 +162,7 @@ ShmExtensionInit(void) } static void -miShmPutImage(dst, pGC, depth, format, w, h, sx, sy, sw, sh, dx, dy, data) +nxagent_miShmPutImage(dst, pGC, depth, format, w, h, sx, sy, sw, sh, dx, dy, data) DrawablePtr dst; GCPtr pGC; int depth, w, h, sx, sy, sw, sh, dx, dy; @@ -166,18 +172,15 @@ miShmPutImage(dst, pGC, depth, format, w, h, sx, sy, sw, sh, dx, dy, data) PixmapPtr pmap; GCPtr putGC; - nxagentShmTrap = 0; putGC = GetScratchGC(depth, dst->pScreen); if (!putGC) { - nxagentShmTrap = 1; return; } pmap = (*dst->pScreen->CreatePixmap)(dst->pScreen, sw, sh, depth, CREATE_PIXMAP_USAGE_SCRATCH); if (!pmap) { - nxagentShmTrap = 1; FreeScratchGC(putGC); return; } @@ -192,9 +195,28 @@ miShmPutImage(dst, pGC, depth, format, w, h, sx, sy, sw, sh, dx, dy, data) (void)(*pGC->ops->CopyArea)((DrawablePtr)pmap, dst, pGC, 0, 0, sw, sh, dx, dy); (*pmap->drawable.pScreen->DestroyPixmap)(pmap); +} + +static void +miShmPutImage(dst, pGC, depth, format, w, h, sx, sy, sw, sh, dx, dy, data) + DrawablePtr dst; + GCPtr pGC; + int depth, w, h, sx, sy, sw, sh, dx, dy; + unsigned int format; + char *data; +{ + /* Careful! This wrapper DEACTIVATES the trap! */ + + nxagentShmTrap = 0; + + nxagent_miShmPutImage(dst, pGC, depth, format, w, h, sx, sy, sw, sh, dx, dy, data); + nxagentShmTrap = 1; + + return; } + static void fbShmPutImage(dst, pGC, depth, format, w, h, sx, sy, sw, sh, dx, dy, data) DrawablePtr dst; @@ -203,6 +225,7 @@ fbShmPutImage(dst, pGC, depth, format, w, h, sx, sy, sw, sh, dx, dy, data) unsigned int format; char *data; { +#ifdef NXAGENT_SERVER int length; char *newdata; extern int nxagentImageLength(int, int, int, int, int); @@ -211,6 +234,7 @@ fbShmPutImage(dst, pGC, depth, format, w, h, sx, sy, sw, sh, dx, dy, data) fprintf(stderr, "fbShmPutImage: Called with drawable at [%p] GC at [%p] data at [%p].\n", (void *) dst, (void *) pGC, (void *) data); #endif +#endif if ((format == ZPixmap) || (depth == 1)) { @@ -227,6 +251,7 @@ fbShmPutImage(dst, pGC, depth, format, w, h, sx, sy, sw, sh, dx, dy, data) (void)(*pGC->ops->CopyArea)((DrawablePtr)pPixmap, dst, pGC, sx, sy, sw, sh, dx, dy); +#ifdef NXAGENT_SERVER /* * We updated the internal framebuffer, * now we want to go on the real X. @@ -255,6 +280,7 @@ fbShmPutImage(dst, pGC, depth, format, w, h, sx, sy, sw, sh, dx, dy, data) #endif } +#endif /* NXAGENT_SERVER */ FreeScratchPixmapHeader(pPixmap); } else @@ -345,17 +371,46 @@ ProcShmPutImage(client) stuff->srcY, stuff->totalWidth, stuff->totalHeight); #endif - #ifdef TEST - fprintf(stderr, "ProcShmPutImage: Calling (*shmFuncs[pDraw->pScreen->myNum]->PutImage)().\n"); - #endif - - (*shmFuncs[pDraw->pScreen->myNum]->PutImage)( - pDraw, pGC, stuff->depth, stuff->format, - stuff->totalWidth, stuff->totalHeight, - stuff->srcX, stuff->srcY, - stuff->srcWidth, stuff->srcHeight, +#ifndef NXAGENT_SERVER + /* + It seems like this code was removed for a good reason. Including + it leads to very strange issues when coupled with libXcomp and using + connection speed settings lower than LAN (and even on LAN some icons + are not showing up correctly, e.g., when using MATE). + + Further investigation on why this happens pending and might happen at a + later time. + + See also ArcticaProject/nx-libs#656 + */ + if ((((stuff->format == ZPixmap) && (stuff->srcX == 0)) || + ((stuff->format != ZPixmap) && + (stuff->srcX < screenInfo.bitmapScanlinePad) && + ((stuff->format == XYBitmap) || + - ((stuff->srcY == 0) && + - (stuff->srcHeight == stuff->totalHeight))))) && + ((stuff->srcX + stuff->srcWidth) == stuff->totalWidth)) + (*pGC->ops->PutImage) (pDraw, pGC, stuff->depth, stuff->dstX, stuff->dstY, - shmdesc->addr + stuff->offset); + stuff->totalWidth, stuff->srcHeight, + stuff->srcX, stuff->format, + shmdesc->addr + stuff->offset + + (stuff->srcY * length)); +- else +#endif + { + #ifdef TEST + fprintf(stderr, "ProcShmPutImage: Calling (*shmFuncs[pDraw->pScreen->myNum]->PutImage)().\n"); + #endif + + (*shmFuncs[pDraw->pScreen->myNum]->PutImage)( + pDraw, pGC, stuff->depth, stuff->format, + stuff->totalWidth, stuff->totalHeight, + stuff->srcX, stuff->srcY, + stuff->srcWidth, stuff->srcHeight, + stuff->dstX, stuff->dstY, + shmdesc->addr + stuff->offset); + } if (stuff->sendEvent) { @@ -376,7 +431,7 @@ ProcShmPutImage(client) static PixmapPtr -fbShmCreatePixmap (pScreen, width, height, depth, addr) +nxagent_fbShmCreatePixmap (pScreen, width, height, depth, addr) ScreenPtr pScreen; int width; int height; @@ -385,47 +440,59 @@ fbShmCreatePixmap (pScreen, width, height, depth, addr) { register PixmapPtr pPixmap; - nxagentShmPixmapTrap = 1; - pPixmap = (*pScreen->CreatePixmap)(pScreen, width, height, depth, 0); if (!pPixmap) { - nxagentShmPixmapTrap = 0; - return NullPixmap; } - #ifdef TEST + #if defined(NXAGENT_SERVER) && defined(TEST) fprintf(stderr,"fbShmCreatePixmap: Width [%d] Height [%d] Depth [%d] Hint[%d]\n", width, height, depth, 0); #endif if (!(*pScreen->ModifyPixmapHeader)(pPixmap, width, height, depth, BitsPerPixel(depth), PixmapBytePad(width, depth), (void *)addr)) { - #ifdef WARNING + #if defined(NXAGENT_SERVER) && defined(WARNING) fprintf(stderr,"fbShmCreatePixmap: Return Null Pixmap.\n"); #endif (*pScreen->DestroyPixmap)(pPixmap); - nxagentShmPixmapTrap = 0; - return NullPixmap; } + return pPixmap; +} + +static PixmapPtr +fbShmCreatePixmap (pScreen, width, height, depth, addr) + ScreenPtr pScreen; + int width; + int height; + int depth; + char *addr; +{ + PixmapPtr result; + + nxagentShmPixmapTrap = 1; + + result = nxagent_fbShmCreatePixmap(pScreen, width, height, depth, addr); + nxagentShmPixmapTrap = 0; - return pPixmap; + return result; } static int -ProcShmDispatch (client) +nxagent_ProcShmDispatch (client) register ClientPtr client; { REQUEST(xReq); +#ifdef NXAGENT_SERVER #ifdef TEST fprintf(stderr, "ProcShmDispatch: Going to execute operation [%d] for client [%d].\n", stuff -> data, client -> index); @@ -436,6 +503,7 @@ ProcShmDispatch (client) nxagentShmRequestLiteral[stuff->data], stuff->data); } #endif +#endif switch (stuff->data) { @@ -447,36 +515,18 @@ ProcShmDispatch (client) return ProcShmDetach(client); case X_ShmPutImage: { - int result; - +#ifdef NXAGENT_SERVER #ifdef TEST fprintf(stderr, "ProcShmDispatch: Going to execute ProcShmPutImage() for client [%d].\n", client -> index); #endif - - nxagentShmTrap = 1; +#endif #ifdef PANORAMIX if ( !noPanoramiXExtension ) - { - result = ProcPanoramiXShmPutImage(client); - - nxagentShmTrap = 0; - - return result; - } + return ProcPanoramiXShmPutImage(client); #endif - - result = ProcShmPutImage(client); - - nxagentShmTrap = 0; - - #ifdef TEST - fprintf(stderr, "ProcShmDispatch: Returning from ProcShmPutImage() for client [%d].\n", - client -> index); - #endif - - return result; + return ProcShmPutImage(client); } case X_ShmGetImage: #ifdef PANORAMIX @@ -495,6 +545,23 @@ ProcShmDispatch (client) } } +/* A wrapper that handles the trap. This construct is used + to keep the derived code closer to the original +*/ +static int +ProcShmDispatch (register ClientPtr client) +{ + int result; + + nxagentShmTrap = 1; + + result = nxagent_ProcShmDispatch(client); + + nxagentShmTrap = 0; + + return result; +} + static int SProcShmDispatch (client) register ClientPtr client; @@ -523,11 +590,15 @@ SProcShmDispatch (client) client -> index); #endif +#ifdef NXAGENT_SERVER nxagentShmTrap = 1; +#endif result = SProcShmPutImage(client); +#ifdef NXAGENT_SERVER nxagentShmTrap = 0; +#endif #ifdef TEST fprintf(stderr, "SProcShmDispatch: Returning from SProcShmPutImage() for client [%d].\n", diff --git a/nx-X11/programs/Xserver/hw/nxagent/NXxvdisp.c b/nx-X11/programs/Xserver/hw/nxagent/NXxvdisp.c index ea617aa4b..336ec1060 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/NXxvdisp.c +++ b/nx-X11/programs/Xserver/hw/nxagent/NXxvdisp.c @@ -64,194 +64,195 @@ SOFTWARE. */ int -ProcXvDispatch(ClientPtr client) +nxagent_ProcXvDispatch(ClientPtr client) { - int result; - REQUEST(xReq); UpdateCurrentTime(); - /* - * Report upstream that we are - * dispatching a XVideo operation. - */ - - nxagentXvTrap = 1; - - #ifdef TEST - fprintf(stderr, "ProcXvDispatch: Going to dispatch XVideo operation [%d] for client [%d].\n", - stuff->data, client -> index); - #endif - switch (stuff->data) { - case xv_QueryExtension: result = (ProcXvQueryExtension(client)); break; - case xv_QueryAdaptors: result = (ProcXvQueryAdaptors(client)); break; - case xv_QueryEncodings: result = (ProcXvQueryEncodings(client)); break; + case xv_QueryExtension: return(ProcXvQueryExtension(client)); + case xv_QueryAdaptors: return(ProcXvQueryAdaptors(client)); + case xv_QueryEncodings: return(ProcXvQueryEncodings(client)); case xv_PutVideo: #ifdef PANORAMIX if(!noPanoramiXExtension) - result = (XineramaXvPutVideo(client)); + return(XineramaXvPutVideo(client)); else #endif - { - result = (ProcXvPutVideo(client)); - } - break; + return(ProcXvPutVideo(client)); case xv_PutStill: #ifdef PANORAMIX if(!noPanoramiXExtension) - result = (XineramaXvPutStill(client)); + return(XineramaXvPutStill(client)); else #endif { - result = (ProcXvPutStill(client)); + return(ProcXvPutStill(client)); } - break; - case xv_GetVideo: result = (ProcXvGetVideo(client)); break; - case xv_GetStill: result = (ProcXvGetStill(client)); break; - case xv_GrabPort: result = (ProcXvGrabPort(client)); break; - case xv_UngrabPort: result = (ProcXvUngrabPort(client)); break; - case xv_SelectVideoNotify: result = (ProcXvSelectVideoNotify(client)); break; - case xv_SelectPortNotify: result = (ProcXvSelectPortNotify(client)); break; + case xv_GetVideo: return(ProcXvGetVideo(client)); + case xv_GetStill: return(ProcXvGetStill(client)); + case xv_GrabPort: return(ProcXvGrabPort(client)); + case xv_UngrabPort: return(ProcXvUngrabPort(client)); + case xv_SelectVideoNotify: return(ProcXvSelectVideoNotify(client)); + case xv_SelectPortNotify: return(ProcXvSelectPortNotify(client)); case xv_StopVideo: #ifdef PANORAMIX if(!noPanoramiXExtension) - result = (XineramaXvStopVideo(client)); + return(XineramaXvStopVideo(client)); else #endif - { - result = (ProcXvStopVideo(client)); - } - break; + return(ProcXvStopVideo(client)); case xv_SetPortAttribute: #ifdef PANORAMIX if(!noPanoramiXExtension) - result = (XineramaXvSetPortAttribute(client)); + return(XineramaXvSetPortAttribute(client)); else #endif - { - result = (ProcXvSetPortAttribute(client)); - } - break; - case xv_GetPortAttribute: result = (ProcXvGetPortAttribute(client)); break; - case xv_QueryBestSize: result = (ProcXvQueryBestSize(client)); break; - case xv_QueryPortAttributes: result = (ProcXvQueryPortAttributes(client)); break; + return(ProcXvSetPortAttribute(client)); + case xv_GetPortAttribute: return(ProcXvGetPortAttribute(client)); + case xv_QueryBestSize: return(ProcXvQueryBestSize(client)); + case xv_QueryPortAttributes: return(ProcXvQueryPortAttributes(client)); case xv_PutImage: #ifdef PANORAMIX if(!noPanoramiXExtension) - result = (XineramaXvPutImage(client)); + return(XineramaXvPutImage(client)); else #endif - { - result = (ProcXvPutImage(client)); - } - break; + return(ProcXvPutImage(client)); #ifdef MITSHM case xv_ShmPutImage: #ifdef PANORAMIX if(!noPanoramiXExtension) - result = (XineramaXvShmPutImage(client)); + return(XineramaXvShmPutImage(client)); else #endif - { - result = (ProcXvShmPutImage(client)); - } - break; + return(ProcXvShmPutImage(client)); #endif - case xv_QueryImageAttributes: result = (ProcXvQueryImageAttributes(client)); break; - case xv_ListImageFormats: result = (ProcXvListImageFormats(client)); break; + case xv_QueryImageAttributes: return(ProcXvQueryImageAttributes(client)); + case xv_ListImageFormats: return(ProcXvListImageFormats(client)); default: if (stuff->data < xvNumRequests) { SendErrorToClient(client, XvReqCode, stuff->data, 0, BadImplementation); - result = (BadImplementation); break; + return(BadImplementation); } else { SendErrorToClient(client, XvReqCode, stuff->data, 0, BadRequest); - result = (BadRequest); break; + return(BadRequest); } } - - nxagentXvTrap = 0; - - #ifdef TEST - fprintf(stderr, "ProcXvDispatch: Dispatched XVideo operation [%d] for client [%d].\n", - stuff->data, client -> index); - #endif - - return result; } int -SProcXvDispatch(ClientPtr client) +ProcXvDispatch(ClientPtr client) { int result; - REQUEST(xReq); - - UpdateCurrentTime(); - /* * Report upstream that we are * dispatching a XVideo operation. */ + #ifdef TEST + fprintf(stderr, "ProcXvDispatch: Going to dispatch XVideo operation [%d] for client [%d].\n", + stuff->data, client -> index); + #endif + nxagentXvTrap = 1; + result = nxagent_ProcXvDispatch(client); + + nxagentXvTrap = 0; + #ifdef TEST - fprintf(stderr, "SProcXvDispatch: Going to dispatch XVideo operation [%d] for client [%d].\n", + fprintf(stderr, "ProcXvDispatch: Dispatched XVideo operation [%d] for client [%d].\n", stuff->data, client -> index); #endif + return result; +} + + +int +nxagent_SProcXvDispatch(ClientPtr client) +{ + REQUEST(xReq); + + UpdateCurrentTime(); + switch (stuff->data) { - case xv_QueryExtension: result = (SProcXvQueryExtension(client)); break; - case xv_QueryAdaptors: result = (SProcXvQueryAdaptors(client)); break; - case xv_QueryEncodings: result = (SProcXvQueryEncodings(client)); break; - case xv_PutVideo: result = (SProcXvPutVideo(client)); break; - case xv_PutStill: result = (SProcXvPutStill(client)); break; - case xv_GetVideo: result = (SProcXvGetVideo(client)); break; - case xv_GetStill: result = (SProcXvGetStill(client)); break; - case xv_GrabPort: result = (SProcXvGrabPort(client)); break; - case xv_UngrabPort: result = (SProcXvUngrabPort(client)); break; - case xv_SelectVideoNotify: result = (SProcXvSelectVideoNotify(client)); break; - case xv_SelectPortNotify: result = (SProcXvSelectPortNotify(client)); break; - case xv_StopVideo: result = (SProcXvStopVideo(client)); break; - case xv_SetPortAttribute: result = (SProcXvSetPortAttribute(client)); break; - case xv_GetPortAttribute: result = (SProcXvGetPortAttribute(client)); break; - case xv_QueryBestSize: result = (SProcXvQueryBestSize(client)); break; - case xv_QueryPortAttributes: result = (SProcXvQueryPortAttributes(client)); break; - case xv_PutImage: result = (SProcXvPutImage(client)); break; + case xv_QueryExtension: return(SProcXvQueryExtension(client)); + case xv_QueryAdaptors: return(SProcXvQueryAdaptors(client)); + case xv_QueryEncodings: return(SProcXvQueryEncodings(client)); + case xv_PutVideo: return(SProcXvPutVideo(client)); + case xv_PutStill: return(SProcXvPutStill(client)); + case xv_GetVideo: return(SProcXvGetVideo(client)); + case xv_GetStill: return(SProcXvGetStill(client)); + case xv_GrabPort: return(SProcXvGrabPort(client)); + case xv_UngrabPort: return(SProcXvUngrabPort(client)); + case xv_SelectVideoNotify: return(SProcXvSelectVideoNotify(client)); + case xv_SelectPortNotify: return(SProcXvSelectPortNotify(client)); + case xv_StopVideo: return(SProcXvStopVideo(client)); + case xv_SetPortAttribute: return(SProcXvSetPortAttribute(client)); + case xv_GetPortAttribute: return(SProcXvGetPortAttribute(client)); + case xv_QueryBestSize: return(SProcXvQueryBestSize(client)); + case xv_QueryPortAttributes: return(SProcXvQueryPortAttributes(client)); + case xv_PutImage: return(SProcXvPutImage(client)); #ifdef MITSHM - case xv_ShmPutImage: result = (SProcXvShmPutImage(client)); break; + case xv_ShmPutImage: return(SProcXvShmPutImage(client)); #endif - case xv_QueryImageAttributes: result = (SProcXvQueryImageAttributes(client)); break; - case xv_ListImageFormats: result = (SProcXvListImageFormats(client)); break; + case xv_QueryImageAttributes: return(SProcXvQueryImageAttributes(client)); + case xv_ListImageFormats: return(SProcXvListImageFormats(client)); default: if (stuff->data < xvNumRequests) { SendErrorToClient(client, XvReqCode, stuff->data, 0, BadImplementation); - result = (BadImplementation); break; + return(BadImplementation); } else { SendErrorToClient(client, XvReqCode, stuff->data, 0, BadRequest); - result = (BadRequest); break; + return(BadRequest); } } +} + + +int +SProcXvDispatch(ClientPtr client) +{ + int result; + + /* + * Report upstream that we are + * dispatching a XVideo operation. + */ + + #ifdef TEST + fprintf(stderr, "SProcXvDispatch: Going to dispatch XVideo operation [%d] for client [%d].\n", + stuff->data, client -> index); + #endif + + nxagentXvTrap = 1; + + result = nxagent_SProcXvDispatch(client); nxagentXvTrap = 0; #ifdef TEST - fprintf(stderr, "ProcXvDispatch: Dispatched XVideo operation [%d] for client [%d].\n", + fprintf(stderr, "SProcXvDispatch: Dispatched XVideo operation [%d] for client [%d].\n", stuff->data, client -> index); #endif return result; } + + + #endif /* !defined(__sun) && !defined(__CYGWIN__) */ diff --git a/nx-X11/programs/Xserver/include/inputstr.h b/nx-X11/programs/Xserver/include/inputstr.h index 5e2e26968..5bc7be2ff 100644 --- a/nx-X11/programs/Xserver/include/inputstr.h +++ b/nx-X11/programs/Xserver/include/inputstr.h @@ -147,6 +147,11 @@ typedef struct _ValuatorClassRec { AxisInfoPtr axes; unsigned short numAxes; int *axisVal; + /* the next two are only written by xtest and never read currently. They exist + to satisfy the compiler. Once Xi is updated, too, they will be a regular member + anyway */ + int lastx, lasty; /* last event recorded, not posted to + * client; see dix/devices.c */ CARD8 mode; } ValuatorClassRec, *ValuatorClassPtr; |