summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKeith Packard <keithp@keithp.com>2010-05-13 18:22:49 -0700
committerKeith Packard <keithp@keithp.com>2010-05-13 18:22:49 -0700
commit795432d4a92ed5b9fa4d9163e73c8e4fe4c74534 (patch)
tree8bdcc020ca5ff5d5eef28f9acfb365daef1b8bde
parentf2a0c324e37c9fa3eb9087adbf963addb7f21d88 (diff)
parent92ed75ac59e2d3af149cddb962efd05fc8487750 (diff)
Merge remote branch 'jamey/cleanups'
-rw-r--r--Xext/bigreq.c2
-rw-r--r--Xext/dpms.c16
-rw-r--r--Xext/geext.c2
-rw-r--r--Xext/panoramiX.c12
-rw-r--r--Xext/panoramiXprocs.c37
-rw-r--r--Xext/saver.c6
-rw-r--r--Xext/security.c7
-rw-r--r--Xext/shape.c8
-rw-r--r--Xext/shm.c18
-rw-r--r--Xext/sync.c14
-rw-r--r--Xext/xcalibrate.c6
-rw-r--r--Xext/xcmisc.c6
-rw-r--r--Xext/xf86bigfont.c4
-rw-r--r--Xext/xres.c8
-rw-r--r--Xext/xselinux_ext.c6
-rw-r--r--Xext/xtest.c8
-rw-r--r--Xext/xvdisp.c4
-rw-r--r--Xext/xvmain.c2
-rw-r--r--Xi/exevents.c2
-rw-r--r--composite/compalloc.c5
-rw-r--r--composite/compext.c10
-rw-r--r--damageext/damageext.c10
-rw-r--r--dbe/dbe.c8
-rw-r--r--dix/colormap.c26
-rw-r--r--dix/devices.c8
-rw-r--r--dix/dispatch.c377
-rw-r--r--dix/dixfonts.c14
-rw-r--r--dix/extension.c4
-rw-r--r--dix/gc.c253
-rw-r--r--dix/glyphcurs.c5
-rw-r--r--dix/property.c14
-rw-r--r--dix/selection.c8
-rw-r--r--dix/window.c21
-rw-r--r--fb/fbseg.c4
-rw-r--r--glx/glxdriswrast.c16
-rw-r--r--glx/glxext.c2
-rw-r--r--glx/xfont.c2
-rw-r--r--hw/dmx/dmx.c28
-rw-r--r--hw/dmx/dmxfont.c2
-rw-r--r--hw/kdrive/ephyr/ephyr_draw.c18
-rw-r--r--hw/kdrive/ephyr/ephyrdriext.c24
-rw-r--r--hw/kdrive/src/kcmap.c2
-rw-r--r--hw/kdrive/src/kxv.c8
-rw-r--r--hw/vfb/InitOutput.c2
-rw-r--r--hw/xfree86/common/xf86xv.c15
-rw-r--r--hw/xfree86/dixmods/extmod/xf86dga2.c64
-rw-r--r--hw/xfree86/dixmods/extmod/xf86vmode.c44
-rw-r--r--hw/xfree86/dri/xf86dri.c24
-rw-r--r--hw/xfree86/dri2/dri2ext.c36
-rw-r--r--hw/xfree86/vgahw/vgaCmap.c2
-rw-r--r--hw/xfree86/xaa/xaaPCache.c8
-rw-r--r--hw/xquartz/applewm.c26
-rw-r--r--hw/xquartz/pseudoramiX.c10
-rw-r--r--hw/xquartz/xpr/appledri.c14
-rwxr-xr-xhw/xwin/winwindowswm.c14
-rw-r--r--include/colormap.h6
-rw-r--r--include/gc.h9
-rw-r--r--include/gcstruct.h2
-rw-r--r--mi/miarc.c36
-rw-r--r--mi/mibitblt.c41
-rw-r--r--mi/midispcur.c24
-rw-r--r--mi/miexpose.c11
-rw-r--r--mi/miglblt.c32
-rw-r--r--mi/mipolypnt.c12
-rw-r--r--mi/miwideline.c203
-rw-r--r--mi/miwideline.h8
-rw-r--r--mi/mizerarc.c8
-rw-r--r--miext/cw/cw.c22
-rw-r--r--randr/rrcrtc.c14
-rw-r--r--randr/rrdispatch.c2
-rw-r--r--randr/rrmode.c2
-rw-r--r--randr/rroutput.c6
-rw-r--r--randr/rrproperty.c14
-rw-r--r--randr/rrscreen.c8
-rw-r--r--randr/rrxinerama.c12
-rw-r--r--record/record.c4
-rw-r--r--render/miindex.c2
-rw-r--r--render/mirect.c23
-rw-r--r--render/render.c50
-rw-r--r--xfixes/cursor.c16
-rw-r--r--xfixes/region.c57
-rw-r--r--xfixes/saveset.c6
-rw-r--r--xfixes/xfixes.c2
-rw-r--r--xkb/xkb.c50
84 files changed, 863 insertions, 1115 deletions
diff --git a/Xext/bigreq.c b/Xext/bigreq.c
index f9f15edc5..ce3734e8d 100644
--- a/Xext/bigreq.c
+++ b/Xext/bigreq.c
@@ -76,5 +76,5 @@ ProcBigReqDispatch (ClientPtr client)
swapl(&rep.max_request_size, n);
}
WriteToClient(client, sizeof(xBigReqEnableReply), (char *)&rep);
- return(client->noClientException);
+ return Success;
}
diff --git a/Xext/dpms.c b/Xext/dpms.c
index df63a8bf1..33a6e267c 100644
--- a/Xext/dpms.c
+++ b/Xext/dpms.c
@@ -61,7 +61,7 @@ ProcDPMSGetVersion(ClientPtr client)
swaps(&rep.minorVersion, n);
}
WriteToClient(client, sizeof(xDPMSGetVersionReply), (char *)&rep);
- return(client->noClientException);
+ return Success;
}
static int
@@ -82,7 +82,7 @@ ProcDPMSCapable(ClientPtr client)
swaps(&rep.sequenceNumber, n);
}
WriteToClient(client, sizeof(xDPMSCapableReply), (char *)&rep);
- return(client->noClientException);
+ return Success;
}
static int
@@ -108,7 +108,7 @@ ProcDPMSGetTimeouts(ClientPtr client)
swaps(&rep.off, n);
}
WriteToClient(client, sizeof(xDPMSGetTimeoutsReply), (char *)&rep);
- return(client->noClientException);
+ return Success;
}
static int
@@ -134,7 +134,7 @@ ProcDPMSSetTimeouts(ClientPtr client)
DPMSOffTime = stuff->off * MILLI_PER_SECOND;
SetScreenSaverTimer();
- return(client->noClientException);
+ return Success;
}
static int
@@ -150,7 +150,7 @@ ProcDPMSEnable(ClientPtr client)
SetScreenSaverTimer();
}
- return(client->noClientException);
+ return Success;
}
static int
@@ -164,7 +164,7 @@ ProcDPMSDisable(ClientPtr client)
DPMSEnabled = FALSE;
- return(client->noClientException);
+ return Success;
}
static int
@@ -187,7 +187,7 @@ ProcDPMSForceLevel(ClientPtr client)
DPMSSet(client, stuff->level);
- return(client->noClientException);
+ return Success;
}
static int
@@ -210,7 +210,7 @@ ProcDPMSInfo(ClientPtr client)
swaps(&rep.power_level, n);
}
WriteToClient(client, sizeof(xDPMSInfoReply), (char *)&rep);
- return(client->noClientException);
+ return Success;
}
static int
diff --git a/Xext/geext.c b/Xext/geext.c
index f0a3d8778..b7f32c079 100644
--- a/Xext/geext.c
+++ b/Xext/geext.c
@@ -91,7 +91,7 @@ ProcGEQueryVersion(ClientPtr client)
}
WriteToClient(client, sizeof(xGEQueryVersionReply), (char*)&rep);
- return(client->noClientException);
+ return Success;
}
int (*ProcGEVector[GENumberRequests])(ClientPtr) = {
diff --git a/Xext/panoramiX.c b/Xext/panoramiX.c
index 38b2f48d6..31286d41f 100644
--- a/Xext/panoramiX.c
+++ b/Xext/panoramiX.c
@@ -917,7 +917,7 @@ ProcPanoramiXQueryVersion (ClientPtr client)
swaps(&rep.minorVersion, n);
}
WriteToClient(client, sizeof (xPanoramiXQueryVersionReply), (char *)&rep);
- return (client->noClientException);
+ return Success;
}
int
@@ -944,7 +944,7 @@ ProcPanoramiXGetState(ClientPtr client)
swapl (&rep.window, n);
}
WriteToClient (client, sizeof (xPanoramiXGetStateReply), (char *) &rep);
- return client->noClientException;
+ return Success;
}
@@ -972,7 +972,7 @@ ProcPanoramiXGetScreenCount(ClientPtr client)
swapl (&rep.window, n);
}
WriteToClient (client, sizeof (xPanoramiXGetScreenCountReply), (char *) &rep);
- return client->noClientException;
+ return Success;
}
int
@@ -1008,7 +1008,7 @@ ProcPanoramiXGetScreenSize(ClientPtr client)
swapl (&rep.screen, n);
}
WriteToClient (client, sizeof (xPanoramiXGetScreenSizeReply), (char *) &rep);
- return client->noClientException;
+ return Success;
}
@@ -1039,7 +1039,7 @@ ProcXineramaIsActive(ClientPtr client)
swapl (&rep.state, n);
}
WriteToClient (client, sizeof (xXineramaIsActiveReply), (char *) &rep);
- return client->noClientException;
+ return Success;
}
@@ -1084,7 +1084,7 @@ ProcXineramaQueryScreens(ClientPtr client)
}
}
- return client->noClientException;
+ return Success;
}
diff --git a/Xext/panoramiXprocs.c b/Xext/panoramiXprocs.c
index 75f758da5..a1816958f 100644
--- a/Xext/panoramiXprocs.c
+++ b/Xext/panoramiXprocs.c
@@ -52,13 +52,6 @@ Equipment Corporation.
#define INPUTONLY_LEGAL_MASK (CWWinGravity | CWEventMask | \
CWDontPropagate | CWOverrideRedirect | CWCursor )
-/* Various of the DIX function interfaces were not designed to allow
- * the client->errorValue to be set on BadValue and other errors.
- * Rather than changing interfaces and breaking untold code we introduce
- * a new global that dispatch can use.
- */
-extern XID clientErrorValue; /* XXX this is a kludge */
-
int PanoramiXCreateWindow(ClientPtr client)
{
PanoramiXRes *parent, *newWin;
@@ -579,7 +572,7 @@ int PanoramiXGetGeometry(ClientPtr client)
}
WriteReplyToClient(client, sizeof(xGetGeometryReply), &rep);
- return (client->noClientException);
+ return Success;
}
int PanoramiXTranslateCoords(ClientPtr client)
@@ -649,7 +642,7 @@ int PanoramiXTranslateCoords(ClientPtr client)
}
WriteReplyToClient(client, sizeof(xTranslateCoordsReply), &rep);
- return(client->noClientException);
+ return Success;
}
int PanoramiXCreatePixmap(ClientPtr client)
@@ -1088,8 +1081,6 @@ int PanoramiXCopyArea(ClientPtr client)
}
free(data);
-
- result = Success;
} else {
DrawablePtr pDst = NULL, pSrc = NULL;
GCPtr pGC = NULL;
@@ -1157,11 +1148,9 @@ int PanoramiXCopyArea(ClientPtr client)
client, &totalReg, stuff->dstDrawable, X_CopyArea, 0);
REGION_UNINIT(pScreen, &totalReg);
}
-
- result = client->noClientException;
}
- return (result);
+ return Success;
}
@@ -1271,7 +1260,7 @@ int PanoramiXCopyPlane(ClientPtr client)
REGION_UNINIT(pScreen, &totalReg);
}
- return (client->noClientException);
+ return Success;
}
@@ -1331,7 +1320,7 @@ int PanoramiXPolyPoint(ClientPtr client)
free(origPts);
return (result);
} else
- return (client->noClientException);
+ return Success;
}
@@ -1391,7 +1380,7 @@ int PanoramiXPolyLine(ClientPtr client)
free(origPts);
return (result);
} else
- return (client->noClientException);
+ return Success;
}
@@ -1454,7 +1443,7 @@ int PanoramiXPolySegment(ClientPtr client)
free(origSegs);
return (result);
} else
- return (client->noClientException);
+ return Success;
}
@@ -1516,7 +1505,7 @@ int PanoramiXPolyRectangle(ClientPtr client)
free(origRecs);
return (result);
} else
- return (client->noClientException);
+ return Success;
}
@@ -1576,7 +1565,7 @@ int PanoramiXPolyArc(ClientPtr client)
free(origArcs);
return (result);
} else
- return (client->noClientException);
+ return Success;
}
@@ -1637,7 +1626,7 @@ int PanoramiXFillPoly(ClientPtr client)
free(locPts);
return (result);
} else
- return (client->noClientException);
+ return Success;
}
@@ -1698,7 +1687,7 @@ int PanoramiXPolyFillRectangle(ClientPtr client)
free(origRects);
return (result);
} else
- return (client->noClientException);
+ return Success;
}
@@ -1759,7 +1748,7 @@ int PanoramiXPolyFillArc(ClientPtr client)
free(origArcs);
return (result);
} else
- return (client->noClientException);
+ return Success;
}
@@ -1954,7 +1943,7 @@ int PanoramiXGetImage(ClientPtr client)
}
}
free(pBuf);
- return (client->noClientException);
+ return Success;
}
diff --git a/Xext/saver.c b/Xext/saver.c
index f89ee1886..4b43a305a 100644
--- a/Xext/saver.c
+++ b/Xext/saver.c
@@ -737,7 +737,7 @@ ProcScreenSaverQueryVersion (ClientPtr client)
swapl(&rep.length, n);
}
WriteToClient(client, sizeof (xScreenSaverQueryVersionReply), (char *)&rep);
- return (client->noClientException);
+ return Success;
}
static int
@@ -813,7 +813,7 @@ ProcScreenSaverQueryInfo (ClientPtr client)
swapl (&rep.eventMask, n);
}
WriteToClient(client, sizeof (xScreenSaverQueryInfoReply), (char *)&rep);
- return (client->noClientException);
+ return Success;
}
static int
@@ -1415,7 +1415,7 @@ ProcScreenSaverSuspend (ClientPtr client)
FreeScreenSaverTimer();
}
- return (client->noClientException);
+ return Success;
}
static DISPATCH_PROC((*NormalVector[])) = {
diff --git a/Xext/security.c b/Xext/security.c
index 268581579..7995ff2f3 100644
--- a/Xext/security.c
+++ b/Xext/security.c
@@ -383,7 +383,7 @@ ProcSecurityQueryVersion(
}
(void)WriteToClient(client, SIZEOF(xSecurityQueryVersionReply),
(char *)&rep);
- return (client->noClientException);
+ return Success;
} /* ProcSecurityQueryVersion */
@@ -604,10 +604,7 @@ ProcSecurityGenerateAuthorization(
pAuth->group, eventMask);
/* the request succeeded; don't call RemoveAuthorization or free pAuth */
-
- removeAuth = FALSE;
- pAuth = NULL;
- err = client->noClientException;
+ return Success;
bailout:
if (removeAuth)
diff --git a/Xext/shape.c b/Xext/shape.c
index f21d633c9..cd756583c 100644
--- a/Xext/shape.c
+++ b/Xext/shape.c
@@ -269,7 +269,7 @@ ProcShapeQueryVersion (ClientPtr client)
swaps(&rep.minorVersion, n);
}
WriteToClient(client, sizeof (xShapeQueryVersionReply), (char *)&rep);
- return (client->noClientException);
+ return Success;
}
/*****************
@@ -736,7 +736,7 @@ ProcShapeQueryExtents (ClientPtr client)
swaps(&rep.heightClipShape, n);
}
WriteToClient(client, sizeof (xShapeQueryExtentsReply), (char *)&rep);
- return (client->noClientException);
+ return Success;
}
/*ARGSUSED*/
@@ -996,7 +996,7 @@ ProcShapeInputSelected (ClientPtr client)
swapl (&rep.length, n);
}
WriteToClient (client, sizeof (xShapeInputSelectedReply), (char *) &rep);
- return (client->noClientException);
+ return Success;
}
static int
@@ -1081,7 +1081,7 @@ ProcShapeGetRectangles (ClientPtr client)
WriteToClient (client, sizeof (rep), (char *) &rep);
WriteToClient (client, nrects * sizeof (xRectangle), (char *) rects);
free(rects);
- return client->noClientException;
+ return Success;
}
static int
diff --git a/Xext/shm.c b/Xext/shm.c
index 39b392943..25043fadc 100644
--- a/Xext/shm.c
+++ b/Xext/shm.c
@@ -359,7 +359,7 @@ ProcShmQueryVersion(ClientPtr client)
swaps(&rep.gid, n);
}
WriteToClient(client, sizeof(xShmQueryVersionReply), (char *)&rep);
- return (client->noClientException);
+ return Success;
}
/*
@@ -485,7 +485,7 @@ ProcShmAttach(ClientPtr client)
}
if (!AddResource(stuff->shmseg, ShmSegType, (pointer)shmdesc))
return BadAlloc;
- return(client->noClientException);
+ return Success;
}
/*ARGSUSED*/
@@ -515,7 +515,7 @@ ProcShmDetach(ClientPtr client)
REQUEST_SIZE_MATCH(xShmDetachReq);
VERIFY_SHMSEG(stuff->shmseg, shmdesc, client);
FreeResource(stuff->shmseg, RT_NONE);
- return(client->noClientException);
+ return Success;
}
/*
@@ -601,7 +601,7 @@ ProcPanoramiXShmPutImage(ClientPtr client)
stuff->dstY = orig_y - panoramiXdataPtr[j].y;
}
result = ProcShmPutImage(client);
- if(result != client->noClientException) break;
+ if(result != Success) break;
}
return(result);
}
@@ -733,7 +733,7 @@ ProcPanoramiXShmGetImage(ClientPtr client)
}
WriteToClient(client, sizeof(xShmGetImageReply), (char *)&xgi);
- return(client->noClientException);
+ return Success;
}
static int
@@ -804,7 +804,7 @@ CreatePmap:
for(j = 1; j < PanoramiXNumScreens; j++)
newPix->info[j].id = FakeClientID(client->index);
- result = (client->noClientException);
+ result = Success;
FOR_NSCREENS(j) {
ShmScrPrivateRec *screen_priv;
@@ -951,7 +951,7 @@ ProcShmPutImage(ClientPtr client)
WriteEventsToClient(client, 1, (xEvent *) &ev);
}
- return (client->noClientException);
+ return Success;
}
@@ -1065,7 +1065,7 @@ ProcShmGetImage(ClientPtr client)
}
WriteToClient(client, sizeof(xShmGetImageReply), (char *)&xgi);
- return(client->noClientException);
+ return Success;
}
static PixmapPtr
@@ -1162,7 +1162,7 @@ CreatePmap:
pMap->drawable.id = stuff->pid;
if (AddResource(stuff->pid, RT_PIXMAP, (pointer)pMap))
{
- return(client->noClientException);
+ return Success;
}
pDraw->pScreen->DestroyPixmap(pMap);
}
diff --git a/Xext/sync.c b/Xext/sync.c
index 94ac5dfb1..0534728a7 100644
--- a/Xext/sync.c
+++ b/Xext/sync.c
@@ -1146,7 +1146,7 @@ ProcSyncInitialize(ClientPtr client)
swaps(&rep.sequenceNumber, n);
}
WriteToClient(client, sizeof(rep), (char *) &rep);
- return client->noClientException;
+ return Success;
}
/*
@@ -1223,7 +1223,7 @@ ProcSyncListSystemCounters(ClientPtr client)
free(list);
}
- return client->noClientException;
+ return Success;
}
/*
@@ -1297,7 +1297,7 @@ ProcSyncGetPriority(ClientPtr client)
WriteToClient(client, sizeof(xSyncGetPriorityReply), (char *) &rep);
- return client->noClientException;
+ return Success;
}
/*
@@ -1317,7 +1317,7 @@ ProcSyncCreateCounter(ClientPtr client)
if (!SyncCreateCounter(client, stuff->cid, initial))
return BadAlloc;
- return client->noClientException;
+ return Success;
}
/*
@@ -1569,7 +1569,7 @@ ProcSyncQueryCounter(ClientPtr client)
swapl(&rep.value_lo, n);
}
WriteToClient(client, sizeof(xSyncQueryCounterReply), (char *) &rep);
- return client->noClientException;
+ return Success;
}
@@ -1749,7 +1749,7 @@ ProcSyncQueryAlarm(ClientPtr client)
}
WriteToClient(client, sizeof(xSyncQueryAlarmReply), (char *) &rep);
- return client->noClientException;
+ return Success;
}
static int
@@ -1767,7 +1767,7 @@ ProcSyncDestroyAlarm(ClientPtr client)
return (rc == BadValue) ? SyncErrorBase + XSyncBadAlarm : rc;
FreeResource(stuff->alarm, RT_NONE);
- return client->noClientException;
+ return Success;
}
/*
diff --git a/Xext/xcalibrate.c b/Xext/xcalibrate.c
index 6e6461a5f..364b92ac4 100644
--- a/Xext/xcalibrate.c
+++ b/Xext/xcalibrate.c
@@ -90,7 +90,7 @@ ProcXCalibrateQueryVersion (ClientPtr client)
swaps(&rep.minorVersion, n);
}
WriteToClient(client, sizeof (xXCalibrateQueryVersionReply), (char *)&rep);
- return (client->noClientException);
+ return Success;
}
static int
@@ -160,7 +160,7 @@ ProcXCalibrateSetRawMode (ClientPtr client)
swaps (&rep.status, n);
}
WriteToClient(client, sizeof (rep), (char *) &rep);
- return (client->noClientException);
+ return Success;
}
static int
@@ -200,7 +200,7 @@ ProcXCalibrateScreenToCoord (ClientPtr client)
swaps (&rep.y, n);
}
WriteToClient(client, sizeof (rep), (char *) &rep);
- return (client->noClientException);
+ return Success;
}
static int
diff --git a/Xext/xcmisc.c b/Xext/xcmisc.c
index 1c8e3f2c4..986c870a5 100644
--- a/Xext/xcmisc.c
+++ b/Xext/xcmisc.c
@@ -83,7 +83,7 @@ ProcXCMiscGetVersion(ClientPtr client)
swaps(&rep.minorVersion, n);
}
WriteToClient(client, sizeof(xXCMiscGetVersionReply), (char *)&rep);
- return(client->noClientException);
+ return Success;
}
static int
@@ -106,7 +106,7 @@ ProcXCMiscGetXIDRange(ClientPtr client)
swapl(&rep.count, n);
}
WriteToClient(client, sizeof(xXCMiscGetXIDRangeReply), (char *)&rep);
- return(client->noClientException);
+ return Success;
}
static int
@@ -145,7 +145,7 @@ ProcXCMiscGetXIDList(ClientPtr client)
WriteSwappedDataToClient(client, count * sizeof(XID), pids);
}
free(pids);
- return(client->noClientException);
+ return Success;
}
static int
diff --git a/Xext/xf86bigfont.c b/Xext/xf86bigfont.c
index 312fcc9e9..8c4a7eba9 100644
--- a/Xext/xf86bigfont.c
+++ b/Xext/xf86bigfont.c
@@ -368,7 +368,7 @@ ProcXF86BigfontQueryVersion(
}
WriteToClient(client,
sizeof(xXF86BigfontQueryVersionReply), (char *)&reply);
- return client->noClientException;
+ return Success;
}
static void
@@ -698,7 +698,7 @@ ProcXF86BigfontQueryFont(
if (shmid == -1) free(pIndex2UniqIndex);
if (!pDesc) free(pCI);
}
- return (client->noClientException);
+ return Success;
}
}
diff --git a/Xext/xres.c b/Xext/xres.c
index 14641f70f..06639a2cf 100644
--- a/Xext/xres.c
+++ b/Xext/xres.c
@@ -50,7 +50,7 @@ ProcXResQueryVersion (ClientPtr client)
swaps(&rep.server_minor, n);
}
WriteToClient(client, sizeof (xXResQueryVersionReply), (char *)&rep);
- return (client->noClientException);
+ return Success;
}
static int
@@ -103,7 +103,7 @@ ProcXResQueryClients (ClientPtr client)
free(current_clients);
- return (client->noClientException);
+ return Success;
}
@@ -184,7 +184,7 @@ ProcXResQueryClientResources (ClientPtr client)
free(counts);
- return (client->noClientException);
+ return Success;
}
static unsigned long
@@ -295,7 +295,7 @@ ProcXResQueryClientPixmapBytes (ClientPtr client)
}
WriteToClient (client,sizeof(xXResQueryClientPixmapBytesReply),(char*)&rep);
- return (client->noClientException);
+ return Success;
}
static int
diff --git a/Xext/xselinux_ext.c b/Xext/xselinux_ext.c
index 4d55e1565..93c1b595f 100644
--- a/Xext/xselinux_ext.c
+++ b/Xext/xselinux_ext.c
@@ -78,7 +78,7 @@ ProcSELinuxQueryVersion(ClientPtr client)
swaps(&rep.server_minor, n);
}
WriteToClient(client, sizeof(rep), (char *)&rep);
- return (client->noClientException);
+ return Success;
}
static int
@@ -109,7 +109,7 @@ SELinuxSendContextReply(ClientPtr client, security_id_t sid)
WriteToClient(client, sizeof(SELinuxGetContextReply), (char *)&rep);
WriteToClient(client, len, ctx);
freecon(ctx);
- return client->noClientException;
+ return Success;
}
static int
@@ -390,7 +390,7 @@ SELinuxSendItemsToClient(ClientPtr client, SELinuxListItemRec *items,
WriteToClient(client, size * 4, (char *)buf);
/* Free stuff and return */
- rc = client->noClientException;
+ rc = Success;
free(buf);
out:
SELinuxFreeItems(items, count);
diff --git a/Xext/xtest.c b/Xext/xtest.c
index bb5bae6bc..09c4677a2 100644
--- a/Xext/xtest.c
+++ b/Xext/xtest.c
@@ -126,7 +126,7 @@ ProcXTestGetVersion(ClientPtr client)
swaps(&rep.minorVersion, n);
}
WriteToClient(client, sizeof(xXTestGetVersionReply), (char *)&rep);
- return(client->noClientException);
+ return Success;
}
static int
@@ -164,7 +164,7 @@ ProcXTestCompareCursor(ClientPtr client)
swaps(&rep.sequenceNumber, n);
}
WriteToClient(client, sizeof(xXTestCompareCursorReply), (char *)&rep);
- return(client->noClientException);
+ return Success;
}
static int
@@ -457,7 +457,7 @@ ProcXTestFakeInput(ClientPtr client)
if (need_ptr_update)
miPointerUpdateSprite(dev);
- return client->noClientException;
+ return Success;
}
static int
@@ -475,7 +475,7 @@ ProcXTestGrabControl(ClientPtr client)
MakeClientGrabImpervious(client);
else
MakeClientGrabPervious(client);
- return(client->noClientException);
+ return Success;
}
static int
diff --git a/Xext/xvdisp.c b/Xext/xvdisp.c
index b8d8d17c3..fd633f1f9 100644
--- a/Xext/xvdisp.c
+++ b/Xext/xvdisp.c
@@ -460,7 +460,7 @@ ProcXvQueryAdaptors(ClientPtr client)
}
- return (client->noClientException);
+ return Success;
}
static int
@@ -520,7 +520,7 @@ ProcXvQueryEncodings(ClientPtr client)
pe++;
}
- return (client->noClientException);
+ return Success;
}
static int
diff --git a/Xext/xvmain.c b/Xext/xvmain.c
index 13cd600a1..72678f766 100644
--- a/Xext/xvmain.c
+++ b/Xext/xvmain.c
@@ -126,8 +126,6 @@ unsigned long XvRTPortNotify;
/* EXTERNAL */
-extern XID clientErrorValue;
-
static void WriteSwappedVideoNotifyEvent(xvEvent *, xvEvent *);
static void WriteSwappedPortNotifyEvent(xvEvent *, xvEvent *);
static Bool CreateResourceTypes(void);
diff --git a/Xi/exevents.c b/Xi/exevents.c
index 3ddee7791..b24204d82 100644
--- a/Xi/exevents.c
+++ b/Xi/exevents.c
@@ -1851,7 +1851,7 @@ ChangeKeyMapping(ClientPtr client,
XkbApplyMappingChange(dev, &keysyms, firstKeyCode, keyCodes, NULL,
serverClient);
- return client->noClientException;
+ return Success;
}
static void
diff --git a/composite/compalloc.c b/composite/compalloc.c
index a764972a2..3694ab868 100644
--- a/composite/compalloc.c
+++ b/composite/compalloc.c
@@ -497,10 +497,11 @@ compNewPixmap (WindowPtr pWin, int x, int y, int w, int h)
*/
if (pGC)
{
- XID val = IncludeInferiors;
+ ChangeGCVal val;
+ val.val = IncludeInferiors;
ValidateGC(&pPixmap->drawable, pGC);
- dixChangeGC (serverClient, pGC, GCSubwindowMode, &val, NULL);
+ ChangeGC (serverClient, pGC, GCSubwindowMode, &val);
(*pGC->ops->CopyArea) (&pParent->drawable,
&pPixmap->drawable,
pGC,
diff --git a/composite/compext.c b/composite/compext.c
index 17c4bae1e..3bb9a3701 100644
--- a/composite/compext.c
+++ b/composite/compext.c
@@ -132,7 +132,7 @@ ProcCompositeQueryVersion (ClientPtr client)
swapl(&rep.minorVersion, n);
}
WriteToClient(client, sizeof(xCompositeQueryVersionReply), (char *)&rep);
- return(client->noClientException);
+ return Success;
}
#define VERIFY_WINDOW(pWindow, wid, client, mode) \
@@ -226,7 +226,7 @@ ProcCompositeCreateRegionFromBorderClip (ClientPtr client)
if (!AddResource (stuff->region, RegionResType, (pointer) pRegion))
return BadAlloc;
- return(client->noClientException);
+ return Success;
}
static int
@@ -265,7 +265,7 @@ ProcCompositeNameWindowPixmap (ClientPtr client)
if (!AddResource (stuff->pixmap, RT_PIXMAP, (pointer) pPixmap))
return BadAlloc;
- return(client->noClientException);
+ return Success;
}
@@ -325,7 +325,7 @@ ProcCompositeGetOverlayWindow (ClientPtr client)
}
(void) WriteToClient(client, sz_xCompositeGetOverlayWindowReply, (char *)&rep);
- return client->noClientException;
+ return Success;
}
static int
@@ -351,7 +351,7 @@ ProcCompositeReleaseOverlayWindow (ClientPtr client)
/* The delete function will free the client structure */
FreeResource (pOc->resource, RT_NONE);
- return client->noClientException;
+ return Success;
}
static int (*ProcCompositeVector[CompositeNumberRequests])(ClientPtr) = {
diff --git a/damageext/damageext.c b/damageext/damageext.c
index f2630feb4..af4fef678 100644
--- a/damageext/damageext.c
+++ b/damageext/damageext.c
@@ -162,7 +162,7 @@ ProcDamageQueryVersion(ClientPtr client)
swapl(&rep.minorVersion, n);
}
WriteToClient(client, sizeof(xDamageQueryVersionReply), (char *)&rep);
- return(client->noClientException);
+ return Success;
}
static int
@@ -231,7 +231,7 @@ ProcDamageCreate (ClientPtr client)
DamageRegionAppend(pDrawable, pRegion);
}
- return (client->noClientException);
+ return Success;
}
static int
@@ -243,7 +243,7 @@ ProcDamageDestroy (ClientPtr client)
REQUEST_SIZE_MATCH(xDamageDestroyReq);
VERIFY_DAMAGEEXT(pDamageExt, stuff->damage, client, DixWriteAccess);
FreeResource (stuff->damage, RT_NONE);
- return (client->noClientException);
+ return Success;
}
static int
@@ -276,7 +276,7 @@ ProcDamageSubtract (ClientPtr client)
DamageEmpty (pDamage);
}
}
- return (client->noClientException);
+ return Success;
}
static int
@@ -301,7 +301,7 @@ ProcDamageAdd (ClientPtr client)
DamageRegionAppend(pDrawable, pRegion);
REGION_TRANSLATE(pScreen, pRegion, -pDrawable->x, -pDrawable->y);
- return (client->noClientException);
+ return Success;
}
/* Major version controls available requests */
diff --git a/dbe/dbe.c b/dbe/dbe.c
index 1d14bb38a..b28b3a0e6 100644
--- a/dbe/dbe.c
+++ b/dbe/dbe.c
@@ -147,7 +147,7 @@ ProcDbeGetVersion(ClientPtr client)
WriteToClient(client, sizeof(xDbeGetVersionReply), (char *)&rep);
- return(client->noClientException);
+ return Success;
} /* ProcDbeGetVersion() */
@@ -810,7 +810,7 @@ ProcDbeGetVisualInfo(ClientPtr client)
free(pDrawables);
}
- return(client->noClientException);
+ return Success;
} /* ProcDbeGetVisualInfo() */
@@ -866,7 +866,7 @@ ProcDbeGetBackBufferAttributes(ClientPtr client)
WriteToClient(client, sizeof(xDbeGetBackBufferAttributesReply),
(char *)&rep);
- return(client->noClientException);
+ return Success;
} /* ProcDbeGetbackBufferAttributes() */
@@ -1283,7 +1283,7 @@ DbeSetupBackgroundPainter(WindowPtr pWin, GCPtr pGC)
return(FALSE);
}
- return dixChangeGC(NullClient, pGC, gcmask, NULL, gcvalues) == 0;
+ return ChangeGC(NullClient, pGC, gcmask, gcvalues) == 0;
} /* DbeSetupBackgroundPainter() */
diff --git a/dix/colormap.c b/dix/colormap.c
index 9a4ff2845..f75eefe14 100644
--- a/dix/colormap.c
+++ b/dix/colormap.c
@@ -65,8 +65,6 @@ SOFTWARE.
#include "privates.h"
#include "xace.h"
-extern XID clientErrorValue;
-
static Pixel FindBestPixel(
EntryPtr /*pentFirst*/,
int /*size*/,
@@ -1415,7 +1413,7 @@ BlueComp (EntryPtr pent, xrgb *prgb)
/* Read the color value of a cell */
int
-QueryColors (ColormapPtr pmap, int count, Pixel *ppixIn, xrgb *prgbList)
+QueryColors (ColormapPtr pmap, int count, Pixel *ppixIn, xrgb *prgbList, ClientPtr client)
{
Pixel *ppix, pixel;
xrgb *prgb;
@@ -1438,14 +1436,14 @@ QueryColors (ColormapPtr pmap, int count, Pixel *ppixIn, xrgb *prgbList)
{
pixel = *ppix;
if (pixel & rgbbad) {
- clientErrorValue = pixel;
+ client->errorValue = pixel;
errVal = BadValue;
continue;
}
i = (pixel & pVisual->redMask) >> pVisual->offsetRed;
if (i >= numred)
{
- clientErrorValue = pixel;
+ client->errorValue = pixel;
errVal = BadValue;
continue;
}
@@ -1453,7 +1451,7 @@ QueryColors (ColormapPtr pmap, int count, Pixel *ppixIn, xrgb *prgbList)
i = (pixel & pVisual->greenMask) >> pVisual->offsetGreen;
if (i >= numgreen)
{
- clientErrorValue = pixel;
+ client->errorValue = pixel;
errVal = BadValue;
continue;
}
@@ -1461,7 +1459,7 @@ QueryColors (ColormapPtr pmap, int count, Pixel *ppixIn, xrgb *prgbList)
i = (pixel & pVisual->blueMask) >> pVisual->offsetBlue;
if (i >= numblue)
{
- clientErrorValue = pixel;
+ client->errorValue = pixel;
errVal = BadValue;
continue;
}
@@ -1475,7 +1473,7 @@ QueryColors (ColormapPtr pmap, int count, Pixel *ppixIn, xrgb *prgbList)
pixel = *ppix;
if (pixel >= pVisual->ColormapEntries)
{
- clientErrorValue = pixel;
+ client->errorValue = pixel;
errVal = BadValue;
}
else
@@ -2238,7 +2236,7 @@ FreeColors (ColormapPtr pmap, int client, int count, Pixel *pixels, Pixel mask)
}
if ((mask != rmask) && count)
{
- clientErrorValue = *pixels | mask;
+ clients[client]->errorValue = *pixels | mask;
result = BadValue;
}
/* XXX should worry about removing any RT_CMAPENTRY resource */
@@ -2320,7 +2318,7 @@ FreeCo (ColormapPtr pmap, int client, int color, int npixIn, Pixel *ppixIn, Pixe
pixTest = ((*pptr | bits) & cmask) >> offset;
if ((pixTest >= numents) || (*pptr & rgbbad))
{
- clientErrorValue = *pptr | bits;
+ clients[client]->errorValue = *pptr | bits;
errVal = BadValue;
continue;
}
@@ -2401,7 +2399,7 @@ FreeCo (ColormapPtr pmap, int client, int color, int npixIn, Pixel *ppixIn, Pixe
/* Redefine color values */
int
-StoreColors (ColormapPtr pmap, int count, xColorItem *defs)
+StoreColors (ColormapPtr pmap, int count, xColorItem *defs, ClientPtr client)
{
Pixel pix;
xColorItem *pdef;
@@ -2439,7 +2437,7 @@ StoreColors (ColormapPtr pmap, int count, xColorItem *defs)
if (pdef->pixel & rgbbad)
{
errVal = BadValue;
- clientErrorValue = pdef->pixel;
+ client->errorValue = pdef->pixel;
continue;
}
pix = (pdef->pixel & pVisual->redMask) >> pVisual->offsetRed;
@@ -2511,7 +2509,7 @@ StoreColors (ColormapPtr pmap, int count, xColorItem *defs)
defs[idef] = defs[n];
idef++;
} else
- clientErrorValue = pdef->pixel;
+ client->errorValue = pdef->pixel;
}
}
else
@@ -2522,7 +2520,7 @@ StoreColors (ColormapPtr pmap, int count, xColorItem *defs)
ok = TRUE;
if (pdef->pixel >= pVisual->ColormapEntries)
{
- clientErrorValue = pdef->pixel;
+ client->errorValue = pdef->pixel;
errVal = BadValue;
ok = FALSE;
}
diff --git a/dix/devices.c b/dix/devices.c
index db5c4a136..de72c8834 100644
--- a/dix/devices.c
+++ b/dix/devices.c
@@ -1535,7 +1535,7 @@ ProcSetModifierMapping(ClientPtr client)
rep.success = rc;
WriteReplyToClient(client, sizeof(xSetModifierMappingReply), &rep);
- return client->noClientException;
+ return Success;
}
int
@@ -1561,7 +1561,7 @@ ProcGetModifierMapping(ClientPtr client)
free(modkeymap);
- return client->noClientException;
+ return Success;
}
int
@@ -1619,7 +1619,7 @@ ProcChangeKeyboardMapping(ClientPtr client)
stuff->keyCodes, NULL, client);
}
- return client->noClientException;
+ return Success;
}
int
@@ -1722,7 +1722,7 @@ ProcGetKeyboardMapping(ClientPtr client)
free(syms->map);
free(syms);
- return client->noClientException;
+ return Success;
}
int
diff --git a/dix/dispatch.c b/dix/dispatch.c
index 4dc9ecd9d..fe9ddb2a8 100644
--- a/dix/dispatch.c
+++ b/dix/dispatch.c
@@ -176,13 +176,6 @@ CallbackListPtr ClientStateCallback;
volatile char dispatchException = 0;
volatile char isItTimeToYield;
-/* Various of the DIX function interfaces were not designed to allow
- * the client->errorValue to be set on BadValue and other errors.
- * Rather than changing interfaces and breaking untold code we introduce
- * a new global that dispatch can use.
- */
-XID clientErrorValue; /* XXX this is a kludge */
-
#define SAME_SCREENS(a, b) (\
(a.pScreen == b.pScreen))
@@ -444,16 +437,18 @@ Dispatch(void)
client->sequence, client->index, result);
#endif
- if (result != Success)
+ if (client->noClientException != Success)
{
- if (client->noClientException != Success)
- CloseDownClient(client);
- else
- SendErrorToClient(client, MAJOROP,
- MinorOpcodeOfRequest(client),
- client->errorValue, result);
+ CloseDownClient(client);
break;
- }
+ }
+ else if (result != Success)
+ {
+ SendErrorToClient(client, MAJOROP,
+ MinorOpcodeOfRequest(client),
+ client->errorValue, result);
+ break;
+ }
}
FlushAllOutput();
client = clients[clientReady[nready]];
@@ -675,10 +670,7 @@ ProcCreateWindow(ClientPtr client)
return BadAlloc;
pWin->eventMask = mask;
}
- if (client->noClientException != Success)
- return(client->noClientException);
- else
- return rc;
+ return rc;
}
int
@@ -686,7 +678,7 @@ ProcChangeWindowAttributes(ClientPtr client)
{
WindowPtr pWin;
REQUEST(xChangeWindowAttributesReq);
- int result, len, rc;
+ int len, rc;
Mask access_mode = 0;
REQUEST_AT_LEAST_SIZE(xChangeWindowAttributesReq);
@@ -698,14 +690,10 @@ ProcChangeWindowAttributes(ClientPtr client)
len = client->req_len - bytes_to_int32(sizeof(xChangeWindowAttributesReq));
if (len != Ones(stuff->valueMask))
return BadLength;
- result = ChangeWindowAttributes(pWin,
+ return ChangeWindowAttributes(pWin,
stuff->valueMask,
(XID *) &stuff[1],
client);
- if (client->noClientException != Success)
- return(client->noClientException);
- else
- return(result);
}
int
@@ -723,7 +711,7 @@ ProcGetWindowAttributes(ClientPtr client)
memset(&wa, 0, sizeof(xGetWindowAttributesReply));
GetWindowAttributes(pWin, client, &wa);
WriteReplyToClient(client, sizeof(xGetWindowAttributesReply), &wa);
- return(client->noClientException);
+ return Success;
}
int
@@ -744,7 +732,7 @@ ProcDestroyWindow(ClientPtr client)
return rc;
FreeResource(stuff->id, RT_NONE);
}
- return(client->noClientException);
+ return Success;
}
int
@@ -759,7 +747,7 @@ ProcDestroySubwindows(ClientPtr client)
if (rc != Success)
return rc;
DestroySubwindows(pWin, client);
- return(client->noClientException);
+ return Success;
}
int
@@ -767,7 +755,7 @@ ProcChangeSaveSet(ClientPtr client)
{
WindowPtr pWin;
REQUEST(xChangeSaveSetReq);
- int result, rc;
+ int rc;
REQUEST_SIZE_MATCH(xChangeSaveSetReq);
rc = dixLookupWindow(&pWin, stuff->window, client, DixManageAccess);
@@ -776,18 +764,9 @@ ProcChangeSaveSet(ClientPtr client)
if (client->clientAsMask == (CLIENT_BITS(pWin->drawable.id)))
return BadMatch;
if ((stuff->mode == SetModeInsert) || (stuff->mode == SetModeDelete))
- {
- result = AlterSaveSetForClient(client, pWin, stuff->mode, FALSE, TRUE);
- if (client->noClientException != Success)
- return(client->noClientException);
- else
- return(result);
- }
- else
- {
- client->errorValue = stuff->mode;
- return( BadValue );
- }
+ return AlterSaveSetForClient(client, pWin, stuff->mode, FALSE, TRUE);
+ client->errorValue = stuff->mode;
+ return BadValue;
}
int
@@ -795,7 +774,7 @@ ProcReparentWindow(ClientPtr client)
{
WindowPtr pWin, pParent;
REQUEST(xReparentWindowReq);
- int result, rc;
+ int rc;
REQUEST_SIZE_MATCH(xReparentWindowReq);
rc = dixLookupWindow(&pWin, stuff->window, client, DixManageAccess);
@@ -804,23 +783,16 @@ ProcReparentWindow(ClientPtr client)
rc = dixLookupWindow(&pParent, stuff->parent, client, DixAddAccess);
if (rc != Success)
return rc;
- if (SAME_SCREENS(pWin->drawable, pParent->drawable))
- {
- if ((pWin->backgroundState == ParentRelative) &&
- (pParent->drawable.depth != pWin->drawable.depth))
- return BadMatch;
- if ((pWin->drawable.class != InputOnly) &&
- (pParent->drawable.class == InputOnly))
- return BadMatch;
- result = ReparentWindow(pWin, pParent,
- (short)stuff->x, (short)stuff->y, client);
- if (client->noClientException != Success)
- return(client->noClientException);
- else
- return(result);
- }
- else
- return (BadMatch);
+ if (!SAME_SCREENS(pWin->drawable, pParent->drawable))
+ return BadMatch;
+ if ((pWin->backgroundState == ParentRelative) &&
+ (pParent->drawable.depth != pWin->drawable.depth))
+ return BadMatch;
+ if ((pWin->drawable.class != InputOnly) &&
+ (pParent->drawable.class == InputOnly))
+ return BadMatch;
+ return ReparentWindow(pWin, pParent,
+ (short)stuff->x, (short)stuff->y, client);
}
int
@@ -836,7 +808,7 @@ ProcMapWindow(ClientPtr client)
return rc;
MapWindow(pWin, client);
/* update cache to say it is mapped */
- return(client->noClientException);
+ return Success;
}
int
@@ -852,7 +824,7 @@ ProcMapSubwindows(ClientPtr client)
return rc;
MapSubwindows(pWin, client);
/* update cache to say it is mapped */
- return(client->noClientException);
+ return Success;
}
int
@@ -868,7 +840,7 @@ ProcUnmapWindow(ClientPtr client)
return rc;
UnmapWindow(pWin, FALSE);
/* update cache to say it is mapped */
- return(client->noClientException);
+ return Success;
}
int
@@ -883,7 +855,7 @@ ProcUnmapSubwindows(ClientPtr client)
if (rc != Success)
return rc;
UnmapSubwindows(pWin);
- return(client->noClientException);
+ return Success;
}
int
@@ -891,7 +863,6 @@ ProcConfigureWindow(ClientPtr client)
{
WindowPtr pWin;
REQUEST(xConfigureWindowReq);
- int result;
int len, rc;
REQUEST_AT_LEAST_SIZE(xConfigureWindowReq);
@@ -902,12 +873,7 @@ ProcConfigureWindow(ClientPtr client)
len = client->req_len - bytes_to_int32(sizeof(xConfigureWindowReq));
if (Ones((Mask)stuff->mask) != len)
return BadLength;
- result = ConfigureWindow(pWin, (Mask)stuff->mask, (XID *) &stuff[1],
- client);
- if (client->noClientException != Success)
- return(client->noClientException);
- else
- return(result);
+ return ConfigureWindow(pWin, (Mask)stuff->mask, (XID *) &stuff[1], client);
}
int
@@ -928,7 +894,7 @@ ProcCirculateWindow(ClientPtr client)
if (rc != Success)
return rc;
CirculateWindow(pWin, (int)stuff->direction, client);
- return(client->noClientException);
+ return Success;
}
static int
@@ -987,7 +953,7 @@ ProcGetGeometry(ClientPtr client)
return status;
WriteReplyToClient(client, sizeof(xGetGeometryReply), &rep);
- return(client->noClientException);
+ return Success;
}
@@ -1037,7 +1003,7 @@ ProcQueryTree(ClientPtr client)
free(childIDs);
}
- return(client->noClientException);
+ return Success;
}
int
@@ -1064,7 +1030,7 @@ ProcInternAtom(ClientPtr client)
reply.sequenceNumber = client->sequence;
reply.atom = atom;
WriteReplyToClient(client, sizeof(xInternAtomReply), &reply);
- return(client->noClientException);
+ return Success;
}
else
return (BadAlloc);
@@ -1089,7 +1055,7 @@ ProcGetAtomName(ClientPtr client)
reply.nameLength = len;
WriteReplyToClient(client, sizeof(xGetAtomNameReply), &reply);
(void)WriteToClient(client, len, str);
- return(client->noClientException);
+ return Success;
}
else
{
@@ -1109,7 +1075,7 @@ ProcGrabServer(ClientPtr client)
client->sequence--;
BITSET(grabWaiters, client->index);
IgnoreClient(client);
- return(client->noClientException);
+ return Success;
}
rc = OnlyListenToOneClient(client);
if (rc != Success)
@@ -1125,7 +1091,7 @@ ProcGrabServer(ClientPtr client)
CallCallbacks(&ServerGrabCallback, (pointer)&grabinfo);
}
- return(client->noClientException);
+ return Success;
}
static void
@@ -1160,7 +1126,7 @@ ProcUngrabServer(ClientPtr client)
{
REQUEST_SIZE_MATCH(xReq);
UngrabServer(client);
- return(client->noClientException);
+ return Success;
}
int
@@ -1234,7 +1200,7 @@ ProcTranslateCoords(ClientPtr client)
rep.dstY = y - pDst->drawable.y;
}
WriteReplyToClient(client, sizeof(xTranslateCoordsReply), &rep);
- return(client->noClientException);
+ return Success;
}
int
@@ -1250,7 +1216,7 @@ ProcOpenFont(ClientPtr client)
stuff->nbytes, (char *)&stuff[1]);
if (err == Success)
{
- return(client->noClientException);
+ return Success;
}
else
return err;
@@ -1269,7 +1235,7 @@ ProcCloseFont(ClientPtr client)
if (rc == Success)
{
FreeResource(stuff->id, RT_NONE);
- return(client->noClientException);
+ return Success;
}
else
{
@@ -1321,7 +1287,7 @@ ProcQueryFont(ClientPtr client)
WriteReplyToClient(client, rlength, reply);
free(reply);
- return(client->noClientException);
+ return Success;
}
}
@@ -1362,7 +1328,7 @@ ProcQueryTextExtents(ClientPtr client)
reply.overallLeft = info.overallLeft;
reply.overallRight = info.overallRight;
WriteReplyToClient(client, sizeof(xQueryTextExtentsReply), &reply);
- return(client->noClientException);
+ return Success;
}
int
@@ -1463,7 +1429,7 @@ CreatePmap:
return rc;
}
if (AddResource(stuff->pid, RT_PIXMAP, (pointer)pMap))
- return(client->noClientException);
+ return Success;
(*pDraw->pScreen->DestroyPixmap)(pMap);
}
return (BadAlloc);
@@ -1482,7 +1448,7 @@ ProcFreePixmap(ClientPtr client)
if (rc == Success)
{
FreeResource(stuff->id, RT_NONE);
- return(client->noClientException);
+ return Success;
}
else
{
@@ -1517,7 +1483,7 @@ ProcCreateGC(ClientPtr client)
return error;
if (!AddResource(stuff->gc, RT_GC, (pointer)pGC))
return (BadAlloc);
- return(client->noClientException);
+ return Success;
}
int
@@ -1537,14 +1503,7 @@ ProcChangeGC(ClientPtr client)
if (len != Ones(stuff->mask))
return BadLength;
- result = dixChangeGC(client, pGC, stuff->mask, (CARD32 *) &stuff[1], 0);
- if (client->noClientException != Success)
- return(client->noClientException);
- else
- {
- client->errorValue = clientErrorValue;
- return(result);
- }
+ return ChangeGCXIDs(client, pGC, stuff->mask, (CARD32 *) &stuff[1]);
}
int
@@ -1564,14 +1523,12 @@ ProcCopyGC(ClientPtr client)
return result;
if ((dstGC->pScreen != pGC->pScreen) || (dstGC->depth != pGC->depth))
return (BadMatch);
- result = CopyGC(pGC, dstGC, stuff->mask);
- if (client->noClientException != Success)
- return(client->noClientException);
- else
+ if (stuff->mask & ~GCAllBits)
{
- client->errorValue = clientErrorValue;
- return(result);
+ client->errorValue = stuff->mask;
+ return BadValue;
}
+ return CopyGC(pGC, dstGC, stuff->mask);
}
int
@@ -1592,15 +1549,11 @@ ProcSetDashes(ClientPtr client)
if (result != Success)
return result;
- result = SetDashes(pGC, stuff->dashOffset, stuff->nDashes,
+ /* If there's an error, either there's no sensible errorValue,
+ * or there was a dash segment of 0. */
+ client->errorValue = 0;
+ return SetDashes(pGC, stuff->dashOffset, stuff->nDashes,
(unsigned char *)&stuff[1]);
- if (client->noClientException != Success)
- return(client->noClientException);
- else
- {
- client->errorValue = clientErrorValue;
- return(result);
- }
}
int
@@ -1625,12 +1578,8 @@ ProcSetClipRectangles(ClientPtr client)
if (nr & 4)
return(BadLength);
nr >>= 3;
- result = SetClipRects(pGC, stuff->xOrigin, stuff->yOrigin,
+ return SetClipRects(pGC, stuff->xOrigin, stuff->yOrigin,
nr, (xRectangle *)&stuff[1], (int)stuff->ordering);
- if (client->noClientException != Success)
- return(client->noClientException);
- else
- return(result);
}
int
@@ -1646,7 +1595,7 @@ ProcFreeGC(ClientPtr client)
return rc;
FreeResource(stuff->id, RT_NONE);
- return(client->noClientException);
+ return Success;
}
int
@@ -1673,7 +1622,7 @@ ProcClearToBackground(ClientPtr client)
(*pWin->drawable.pScreen->ClearToBackground)(pWin, stuff->x, stuff->y,
stuff->width, stuff->height,
(Bool)stuff->exposures);
- return(client->noClientException);
+ return Success;
}
int
@@ -1715,7 +1664,7 @@ ProcCopyArea(ClientPtr client)
REGION_DESTROY(pDst->pScreen, pRgn);
}
- return(client->noClientException);
+ return Success;
}
int
@@ -1764,7 +1713,7 @@ ProcCopyPlane(ClientPtr client)
if (pRgn)
REGION_DESTROY(pdstDraw->pScreen, pRgn);
}
- return(client->noClientException);
+ return Success;
}
int
@@ -1787,7 +1736,7 @@ ProcPolyPoint(ClientPtr client)
if (npoint)
(*pGC->ops->PolyPoint)(pDraw, pGC, stuff->coordMode, npoint,
(xPoint *) &stuff[1]);
- return (client->noClientException);
+ return Success;
}
int
@@ -1810,7 +1759,7 @@ ProcPolyLine(ClientPtr client)
if (npoint > 1)
(*pGC->ops->Polylines)(pDraw, pGC, stuff->coordMode, npoint,
(DDXPointPtr) &stuff[1]);
- return(client->noClientException);
+ return Success;
}
int
@@ -1829,7 +1778,7 @@ ProcPolySegment(ClientPtr client)
nsegs >>= 3;
if (nsegs)
(*pGC->ops->PolySegment)(pDraw, pGC, nsegs, (xSegment *) &stuff[1]);
- return (client->noClientException);
+ return Success;
}
int
@@ -1849,7 +1798,7 @@ ProcPolyRectangle (ClientPtr client)
if (nrects)
(*pGC->ops->PolyRectangle)(pDraw, pGC,
nrects, (xRectangle *) &stuff[1]);
- return(client->noClientException);
+ return Success;
}
int
@@ -1868,7 +1817,7 @@ ProcPolyArc(ClientPtr client)
narcs /= sizeof(xArc);
if (narcs)
(*pGC->ops->PolyArc)(pDraw, pGC, narcs, (xArc *) &stuff[1]);
- return (client->noClientException);
+ return Success;
}
int
@@ -1899,7 +1848,7 @@ ProcFillPoly(ClientPtr client)
(*pGC->ops->FillPolygon) (pDraw, pGC, stuff->shape,
stuff->coordMode, things,
(DDXPointPtr) &stuff[1]);
- return(client->noClientException);
+ return Success;
}
int
@@ -1920,7 +1869,7 @@ ProcPolyFillRectangle(ClientPtr client)
if (things)
(*pGC->ops->PolyFillRect) (pDraw, pGC, things,
(xRectangle *) &stuff[1]);
- return (client->noClientException);
+ return Success;
}
int
@@ -1939,7 +1888,7 @@ ProcPolyFillArc(ClientPtr client)
narcs /= sizeof(xArc);
if (narcs)
(*pGC->ops->PolyFillArc) (pDraw, pGC, narcs, (xArc *) &stuff[1]);
- return (client->noClientException);
+ return Success;
}
#ifdef MATCH_CLIENT_ENDIAN
@@ -2050,7 +1999,7 @@ ProcPutImage(ClientPtr client)
stuff->width, stuff->height,
stuff->leftPad, stuff->format, tmpImage);
- return (client->noClientException);
+ return Success;
}
static int
@@ -2294,7 +2243,7 @@ DoGetImage(ClientPtr client, int format, Drawable drawable,
REGION_DESTROY(pDraw->pScreen, pVisibleRegion);
if (!im_return)
free(pBuf);
- return (client->noClientException);
+ return Success;
}
int
@@ -2333,7 +2282,7 @@ ProcPolyText(ClientPtr client)
if (err == Success)
{
- return(client->noClientException);
+ return Success;
}
else
return err;
@@ -2363,7 +2312,7 @@ ProcImageText8(ClientPtr client)
if (err == Success)
{
- return(client->noClientException);
+ return Success;
}
else
return err;
@@ -2393,7 +2342,7 @@ ProcImageText16(ClientPtr client)
if (err == Success)
{
- return(client->noClientException);
+ return Success;
}
else
return err;
@@ -2431,12 +2380,8 @@ ProcCreateColormap(ClientPtr client)
{
if (pVisual->vid != stuff->visual)
continue;
- result = CreateColormap(mid, pScreen, pVisual, &pmap,
+ return CreateColormap(mid, pScreen, pVisual, &pmap,
(int)stuff->alloc, client->index);
- if (client->noClientException != Success)
- return(client->noClientException);
- else
- return(result);
}
client->errorValue = stuff->visual;
return(BadMatch);
@@ -2457,7 +2402,7 @@ ProcFreeColormap(ClientPtr client)
/* Freeing a default colormap is a no-op */
if (!(pmap->flags & IsDefault))
FreeResource(stuff->id, RT_NONE);
- return (client->noClientException);
+ return Success;
}
else
{
@@ -2481,18 +2426,9 @@ ProcCopyColormapAndFree(ClientPtr client)
rc = dixLookupResourceByType((pointer *)&pSrcMap, stuff->srcCmap, RT_COLORMAP,
client, DixReadAccess|DixRemoveAccess);
if (rc == Success)
- {
- rc = CopyColormapAndFree(mid, pSrcMap, client->index);
- if (client->noClientException != Success)
- return(client->noClientException);
- else
- return rc;
- }
- else
- {
- client->errorValue = stuff->srcCmap;
- return (rc == BadValue) ? BadColor : rc;
- }
+ return CopyColormapAndFree(mid, pSrcMap, client->index);
+ client->errorValue = stuff->srcCmap;
+ return (rc == BadValue) ? BadColor : rc;
}
int
@@ -2513,8 +2449,8 @@ ProcInstallColormap(ClientPtr client)
goto out;
(*(pcmp->pScreen->InstallColormap)) (pcmp);
+ return Success;
- rc = client->noClientException;
out:
client->errorValue = stuff->id;
return (rc == BadValue) ? BadColor : rc;
@@ -2539,8 +2475,8 @@ ProcUninstallColormap(ClientPtr client)
if(pcmp->mid != pcmp->pScreen->defColormap)
(*(pcmp->pScreen->UninstallColormap)) (pcmp);
+ return Success;
- rc = client->noClientException;
out:
client->errorValue = stuff->id;
return (rc == BadValue) ? BadColor : rc;
@@ -2557,12 +2493,12 @@ ProcListInstalledColormaps(ClientPtr client)
rc = dixLookupWindow(&pWin, stuff->id, client, DixGetAttrAccess);
if (rc != Success)
- goto out;
+ return rc;
rc = XaceHook(XACE_SCREEN_ACCESS, client, pWin->drawable.pScreen,
DixGetAttrAccess);
if (rc != Success)
- goto out;
+ return rc;
preply = malloc(sizeof(xListInstalledColormapsReply) +
pWin->drawable.pScreen->maxInstalledCmaps *
@@ -2580,9 +2516,7 @@ ProcListInstalledColormaps(ClientPtr client)
client->pSwapReplyFunc = (ReplySwapPtr) Swap32Write;
WriteSwappedDataToClient(client, nummaps * sizeof(Colormap), &preply[1]);
free(preply);
- rc = client->noClientException;
-out:
- return rc;
+ return Success;
}
int
@@ -2607,17 +2541,12 @@ ProcAllocColor (ClientPtr client)
acr.pixel = 0;
if( (rc = AllocColor(pmap, &acr.red, &acr.green, &acr.blue,
&acr.pixel, client->index)) )
- {
- if (client->noClientException != Success)
- return(client->noClientException);
- else
- return rc;
- }
+ return rc;
#ifdef PANORAMIX
if (noPanoramiXExtension || !pmap->pScreen->myNum)
#endif
WriteReplyToClient(client, sizeof(xAllocColorReply), &acr);
- return (client->noClientException);
+ return Success;
}
else
@@ -2655,17 +2584,12 @@ ProcAllocNamedColor (ClientPtr client)
if( (rc = AllocColor(pcmp,
&ancr.screenRed, &ancr.screenGreen, &ancr.screenBlue,
&ancr.pixel, client->index)) )
- {
- if (client->noClientException != Success)
- return(client->noClientException);
- else
- return rc;
- }
+ return rc;
#ifdef PANORAMIX
if (noPanoramiXExtension || !pcmp->pScreen->myNum)
#endif
WriteReplyToClient(client, sizeof (xAllocNamedColorReply), &ancr);
- return (client->noClientException);
+ return Success;
}
else
return(BadName);
@@ -2717,10 +2641,7 @@ ProcAllocColorCells (ClientPtr client)
(Bool)stuff->contiguous, ppixels, pmasks)) )
{
free(ppixels);
- if (client->noClientException != Success)
- return(client->noClientException);
- else
- return rc;
+ return rc;
}
#ifdef PANORAMIX
if (noPanoramiXExtension || !pcmp->pScreen->myNum)
@@ -2736,7 +2657,7 @@ ProcAllocColorCells (ClientPtr client)
WriteSwappedDataToClient(client, length, ppixels);
}
free(ppixels);
- return (client->noClientException);
+ return Success;
}
else
{
@@ -2786,10 +2707,7 @@ ProcAllocColorPlanes(ClientPtr client)
&acpr.redMask, &acpr.greenMask, &acpr.blueMask)) )
{
free(ppixels);
- if (client->noClientException != Success)
- return(client->noClientException);
- else
- return rc;
+ return rc;
}
acpr.length = bytes_to_int32(length);
#ifdef PANORAMIX
@@ -2801,7 +2719,7 @@ ProcAllocColorPlanes(ClientPtr client)
WriteSwappedDataToClient(client, length, ppixels);
}
free(ppixels);
- return (client->noClientException);
+ return Success;
}
else
{
@@ -2827,16 +2745,8 @@ ProcFreeColors(ClientPtr client)
if(pcmp->flags & AllAllocated)
return(BadAccess);
count = bytes_to_int32((client->req_len << 2) - sizeof(xFreeColorsReq));
- rc = FreeColors(pcmp, client->index, count,
+ return FreeColors(pcmp, client->index, count,
(Pixel *)&stuff[1], (Pixel)stuff->planeMask);
- if (client->noClientException != Success)
- return(client->noClientException);
- else
- {
- client->errorValue = clientErrorValue;
- return rc;
- }
-
}
else
{
@@ -2863,14 +2773,7 @@ ProcStoreColors (ClientPtr client)
if (count % sizeof(xColorItem))
return(BadLength);
count /= sizeof(xColorItem);
- rc = StoreColors(pcmp, count, (xColorItem *)&stuff[1]);
- if (client->noClientException != Success)
- return(client->noClientException);
- else
- {
- client->errorValue = clientErrorValue;
- return rc;
- }
+ return StoreColors(pcmp, count, (xColorItem *)&stuff[1], client);
}
else
{
@@ -2898,11 +2801,7 @@ ProcStoreNamedColor (ClientPtr client)
{
def.flags = stuff->flags;
def.pixel = stuff->pixel;
- rc = StoreColors(pcmp, 1, &def);
- if (client->noClientException != Success)
- return(client->noClientException);
- else
- return rc;
+ return StoreColors(pcmp, 1, &def, client);
}
return (BadName);
}
@@ -2933,16 +2832,10 @@ ProcQueryColors(ClientPtr client)
prgbs = calloc(1, count * sizeof(xrgb));
if(!prgbs && count)
return(BadAlloc);
- if( (rc = QueryColors(pcmp, count, (Pixel *)&stuff[1], prgbs)) )
+ if( (rc = QueryColors(pcmp, count, (Pixel *)&stuff[1], prgbs, client)) )
{
if (prgbs) free(prgbs);
- if (client->noClientException != Success)
- return(client->noClientException);
- else
- {
- client->errorValue = clientErrorValue;
- return rc;
- }
+ return rc;
}
memset(&qcr, 0, sizeof(xQueryColorsReply));
qcr.type = X_Reply;
@@ -2956,7 +2849,7 @@ ProcQueryColors(ClientPtr client)
WriteSwappedDataToClient(client, count * sizeof(xrgb), prgbs);
}
if (prgbs) free(prgbs);
- return(client->noClientException);
+ return Success;
}
else
@@ -2994,7 +2887,7 @@ ProcLookupColor(ClientPtr client)
&lcr.screenBlue,
pcmp->pVisual);
WriteReplyToClient(client, sizeof(xLookupColorReply), &lcr);
- return(client->noClientException);
+ return Success;
}
return (BadName);
}
@@ -3093,7 +2986,7 @@ ProcCreateCursor (ClientPtr client)
if (!AddResource(stuff->cid, RT_CURSOR, (pointer)pCursor))
return BadAlloc;
- return client->noClientException;
+ return Success;
}
int
@@ -3115,7 +3008,7 @@ ProcCreateGlyphCursor (ClientPtr client)
if (res != Success)
return res;
if (AddResource(stuff->cid, RT_CURSOR, (pointer)pCursor))
- return client->noClientException;
+ return Success;
return BadAlloc;
}
@@ -3133,7 +3026,7 @@ ProcFreeCursor (ClientPtr client)
if (rc == Success)
{
FreeResource(stuff->id, RT_NONE);
- return (client->noClientException);
+ return Success;
}
else
{
@@ -3179,7 +3072,7 @@ ProcQueryBestSize (ClientPtr client)
reply.width = stuff->width;
reply.height = stuff->height;
WriteReplyToClient(client, sizeof(xQueryBestSizeReply), &reply);
- return (client->noClientException);
+ return Success;
}
@@ -3243,7 +3136,7 @@ ProcSetScreenSaver (ClientPtr client)
ScreenSaverInterval = defaultScreenSaverInterval;
SetScreenSaverTimer();
- return (client->noClientException);
+ return Success;
}
int
@@ -3268,31 +3161,24 @@ ProcGetScreenSaver(ClientPtr client)
rep.preferBlanking = ScreenSaverBlanking;
rep.allowExposures = ScreenSaverAllowExposures;
WriteReplyToClient(client, sizeof(xGetScreenSaverReply), &rep);
- return (client->noClientException);
+ return Success;
}
int
ProcChangeHosts(ClientPtr client)
{
REQUEST(xChangeHostsReq);
- int result;
REQUEST_FIXED_SIZE(xChangeHostsReq, stuff->hostLength);
if(stuff->mode == HostInsert)
- result = AddHost(client, (int)stuff->hostFamily,
+ return AddHost(client, (int)stuff->hostFamily,
stuff->hostLength, (pointer)&stuff[1]);
- else if (stuff->mode == HostDelete)
- result = RemoveHost(client, (int)stuff->hostFamily,
+ if (stuff->mode == HostDelete)
+ return RemoveHost(client, (int)stuff->hostFamily,
stuff->hostLength, (pointer)&stuff[1]);
- else
- {
- client->errorValue = stuff->mode;
- return BadValue;
- }
- if (!result)
- result = client->noClientException;
- return (result);
+ client->errorValue = stuff->mode;
+ return BadValue;
}
int
@@ -3324,13 +3210,12 @@ ProcListHosts(ClientPtr client)
WriteSwappedDataToClient(client, len, pdata);
}
free(pdata);
- return (client->noClientException);
+ return Success;
}
int
ProcChangeAccessControl(ClientPtr client)
{
- int result;
REQUEST(xSetAccessControlReq);
REQUEST_SIZE_MATCH(xSetAccessControlReq);
@@ -3339,10 +3224,7 @@ ProcChangeAccessControl(ClientPtr client)
client->errorValue = stuff->mode;
return BadValue;
}
- result = ChangeAccessControl(client, stuff->mode == EnableAccess);
- if (!result)
- result = client->noClientException;
- return (result);
+ return ChangeAccessControl(client, stuff->mode == EnableAccess);
}
/*********************
@@ -3378,7 +3260,7 @@ ProcKillClient(ClientPtr client)
if (stuff->id == AllTemporary)
{
CloseDownRetainedResources();
- return (client->noClientException);
+ return Success;
}
rc = dixLookupClient(&killclient, stuff->id, client, DixDestroyAccess);
@@ -3393,7 +3275,7 @@ ProcKillClient(ClientPtr client)
isItTimeToYield = TRUE;
return (Success);
}
- return (client->noClientException);
+ return Success;
}
else
return rc;
@@ -3405,7 +3287,7 @@ ProcSetFontPath(ClientPtr client)
unsigned char *ptr;
unsigned long nbytes, total;
long nfonts;
- int n, result;
+ int n;
REQUEST(xSetFontPathReq);
REQUEST_AT_LEAST_SIZE(xSetFontPathReq);
@@ -3423,10 +3305,7 @@ ProcSetFontPath(ClientPtr client)
}
if (total >= 4)
return(BadLength);
- result = SetFontPath(client, stuff->nFonts, (unsigned char *)&stuff[1]);
- if (!result)
- result = client->noClientException;
- return (result);
+ return SetFontPath(client, stuff->nFonts, (unsigned char *)&stuff[1]);
}
int
@@ -3450,7 +3329,7 @@ ProcGetFontPath(ClientPtr client)
WriteReplyToClient(client, sizeof(xGetFontPathReply), &reply);
if (stringLens || numpaths)
(void)WriteToClient(client, stringLens + numpaths, (char *)bufferStart);
- return(client->noClientException);
+ return Success;
}
int
@@ -3469,7 +3348,7 @@ ProcChangeCloseDownMode(ClientPtr client)
(stuff->mode == RetainTemporary))
{
client->closeDownMode = stuff->mode;
- return (client->noClientException);
+ return Success;
}
else
{
@@ -3494,7 +3373,7 @@ int ProcForceScreenSaver(ClientPtr client)
rc = dixSaveScreens(client, SCREEN_SAVER_FORCER, (int)stuff->mode);
if (rc != Success)
return rc;
- return client->noClientException;
+ return Success;
}
int ProcNoOperation(ClientPtr client)
@@ -3502,7 +3381,7 @@ int ProcNoOperation(ClientPtr client)
REQUEST_AT_LEAST_SIZE(xReq);
/* noop -- don't do anything */
- return(client->noClientException);
+ return Success;
}
void
@@ -3720,7 +3599,7 @@ ProcInitialConnection(ClientPtr client)
swaps(&stuff->length, whichbyte);
}
ResetCurrentRequest(client);
- return (client->noClientException);
+ return Success;
}
static int
@@ -3817,7 +3696,7 @@ SendConnSetup(ClientPtr client, char *reason)
clientinfo.setup = (xConnSetup *)lConnectionInfo;
CallCallbacks((&ClientStateCallback), (pointer)&clientinfo);
}
- return (client->noClientException);
+ return Success;
}
int
@@ -3851,7 +3730,7 @@ ProcEstablishConnection(ClientPtr client)
client->clientState = ClientStateCheckedSecurity;
else if (client->clientState != ClientStateAuthenticating)
return(SendConnSetup(client, reason));
- return(client->noClientException);
+ return Success;
}
void
diff --git a/dix/dixfonts.c b/dix/dixfonts.c
index 332fb9728..585754b57 100644
--- a/dix/dixfonts.c
+++ b/dix/dixfonts.c
@@ -1166,7 +1166,7 @@ badAlloc:
#define TextEltHeader 2
#define FontShiftSize 5
-static XID clearGC[] = { CT_NONE };
+static ChangeGCVal clearGC[] = { { .ptr = NullPixmap } };
#define clearGCmask (GCClipMask)
int
@@ -1261,7 +1261,9 @@ doPolyText(ClientPtr client, PTclosurePtr c)
{
if (pFont != c->pGC->font && c->pDraw)
{
- dixChangeGC(NullClient, c->pGC, GCFont, &fid, NULL);
+ ChangeGCVal val;
+ val.ptr = pFont;
+ ChangeGC(NullClient, c->pGC, GCFont, &val);
ValidateGC(c->pDraw, c->pGC);
if (c->reqType == X_PolyText8)
c->polyText = (PolyTextPtr) c->pGC->ops->PolyText8;
@@ -1404,7 +1406,9 @@ bail:
/* Step 4 */
if (pFont != origGC->font)
{
- dixChangeGC(NullClient, origGC, GCFont, &fid, NULL);
+ ChangeGCVal val;
+ val.ptr = pFont;
+ ChangeGC(NullClient, origGC, GCFont, &val);
ValidateGC(c->pDraw, origGC);
}
@@ -1423,7 +1427,7 @@ bail:
if (c->slept)
{
ClientWakeup(c->client);
- dixChangeGC(NullClient, c->pGC, clearGCmask, clearGC, NULL);
+ ChangeGC(NullClient, c->pGC, clearGCmask, clearGC);
/* Unreference the font from the scratch GC */
CloseFont(c->pGC->font, (Font)0);
@@ -1580,7 +1584,7 @@ bail:
if (c->slept)
{
ClientWakeup(c->client);
- dixChangeGC(NullClient, c->pGC, clearGCmask, clearGC, NULL);
+ ChangeGC(NullClient, c->pGC, clearGCmask, clearGC);
/* Unreference the font from the scratch GC */
CloseFont(c->pGC->font, (Font)0);
diff --git a/dix/extension.c b/dix/extension.c
index 6940b68b0..d3d4db042 100644
--- a/dix/extension.c
+++ b/dix/extension.c
@@ -293,7 +293,7 @@ ProcQueryExtension(ClientPtr client)
}
}
WriteReplyToClient(client, sizeof(xQueryExtensionReply), &reply);
- return(client->noClientException);
+ return Success;
}
int
@@ -354,5 +354,5 @@ ProcListExtensions(ClientPtr client)
WriteToClient(client, total_length, buffer);
free(buffer);
}
- return(client->noClientException);
+ return Success;
}
diff --git a/dix/gc.c b/dix/gc.c
index c9b704a66..00b63bd2d 100644
--- a/dix/gc.c
+++ b/dix/gc.c
@@ -66,7 +66,6 @@ SOFTWARE.
#include "xace.h"
#include <assert.h>
-extern XID clientErrorValue;
extern FontPtr defaultFont;
static Bool CreateDefaultTile(GCPtr pGC);
@@ -82,69 +81,55 @@ ValidateGC(DrawablePtr pDraw, GC *pGC)
}
-/* dixChangeGC(client, pGC, mask, pC32, pUnion)
- *
- * This function was created as part of the Security extension
- * implementation. The client performing the gc change must be passed so
- * that access checks can be performed on any tiles, stipples, or fonts
- * that are specified. ddxen can call this too; they should normally
- * pass NullClient for the client since any access checking should have
+/*
+ * ChangeGC/ChangeGCXIDs:
+ *
+ * The client performing the gc change must be passed so that access
+ * checks can be performed on any tiles, stipples, or fonts that are
+ * specified. ddxen can call this too; they should normally pass
+ * NullClient for the client since any access checking should have
* already been done at a higher level.
*
- * You can pass the list of gc values via pC32 or pUnion, but not both;
- * one of them must be NULL. If you don't need to pass any pointers,
- * you can use either one:
+ * If you have any XIDs, you must use ChangeGCXIDs:
*
- * example calling dixChangeGC using pC32 parameter
- *
* CARD32 v[2];
- * v[0] = foreground;
- * v[1] = background;
- * dixChangeGC(client, pGC, GCForeground|GCBackground, v, NULL);
- *
- * example calling dixChangeGC using pUnion parameter;
- * same effect as above
- *
- * ChangeGCVal v[2];
- * v[0].val = foreground;
- * v[1].val = background;
- * dixChangeGC(client, pGC, GCForeground|GCBackground, NULL, v);
+ * v[0] = FillTiled;
+ * v[1] = pid;
+ * ChangeGCXIDs(client, pGC, GCFillStyle|GCTile, v);
*
- * However, if you need to pass a pointer to a pixmap or font, you MUST
- * use the pUnion parameter.
+ * However, if you need to pass a pointer to a pixmap or font, you must
+ * use ChangeGC:
*
- * example calling dixChangeGC passing pointers in the value list
- * v[1].ptr is a pointer to a pixmap
- *
* ChangeGCVal v[2];
* v[0].val = FillTiled;
* v[1].ptr = pPixmap;
- * dixChangeGC(client, pGC, GCFillStyle|GCTile, NULL, v);
+ * ChangeGC(client, pGC, GCFillStyle|GCTile, v);
*
- * Note: we could have gotten by with just the pUnion parameter, but on
- * 64 bit machines that would have forced us to copy the value list that
- * comes in the ChangeGC request.
+ * If you have neither XIDs nor pointers, you can use either function,
+ * but ChangeGC will do less work.
+ *
+ * ChangeGCVal v[2];
+ * v[0].val = foreground;
+ * v[1].val = background;
+ * ChangeGC(client, pGC, GCForeground|GCBackground, v);
*/
#define NEXTVAL(_type, _var) { \
- if (pC32) _var = (_type)*pC32++; \
- else { \
_var = (_type)(pUnion->val); pUnion++; \
- } \
}
#define NEXT_PTR(_type, _var) { \
- assert(pUnion); _var = (_type)pUnion->ptr; pUnion++; }
+ _var = (_type)pUnion->ptr; pUnion++; }
int
-dixChangeGC(ClientPtr client, GC *pGC, BITS32 mask, CARD32 *pC32, ChangeGCValPtr pUnion)
+ChangeGC(ClientPtr client, GC *pGC, BITS32 mask, ChangeGCValPtr pUnion)
{
BITS32 index2;
- int rc, error = 0;
+ int error = 0;
PixmapPtr pPixmap;
BITS32 maskQ;
- assert( (pC32 && !pUnion) || (!pC32 && pUnion) );
+ assert(pUnion);
pGC->serialNumber |= GC_CHANGE_SERIAL_BIT;
maskQ = mask; /* save these for when we walk the GCque */
@@ -163,7 +148,8 @@ dixChangeGC(ClientPtr client, GC *pGC, BITS32 mask, CARD32 *pC32, ChangeGCValPtr
pGC->alu = newalu;
else
{
- clientErrorValue = newalu;
+ if (client)
+ client->errorValue = newalu;
error = BadValue;
}
break;
@@ -196,7 +182,8 @@ dixChangeGC(ClientPtr client, GC *pGC, BITS32 mask, CARD32 *pC32, ChangeGCValPtr
pGC->lineStyle = newlinestyle;
else
{
- clientErrorValue = newlinestyle;
+ if (client)
+ client->errorValue = newlinestyle;
error = BadValue;
}
break;
@@ -209,7 +196,8 @@ dixChangeGC(ClientPtr client, GC *pGC, BITS32 mask, CARD32 *pC32, ChangeGCValPtr
pGC->capStyle = newcapstyle;
else
{
- clientErrorValue = newcapstyle;
+ if (client)
+ client->errorValue = newcapstyle;
error = BadValue;
}
break;
@@ -222,7 +210,8 @@ dixChangeGC(ClientPtr client, GC *pGC, BITS32 mask, CARD32 *pC32, ChangeGCValPtr
pGC->joinStyle = newjoinstyle;
else
{
- clientErrorValue = newjoinstyle;
+ if (client)
+ client->errorValue = newjoinstyle;
error = BadValue;
}
break;
@@ -235,7 +224,8 @@ dixChangeGC(ClientPtr client, GC *pGC, BITS32 mask, CARD32 *pC32, ChangeGCValPtr
pGC->fillStyle = newfillstyle;
else
{
- clientErrorValue = newfillstyle;
+ if (client)
+ client->errorValue = newfillstyle;
error = BadValue;
}
break;
@@ -248,29 +238,14 @@ dixChangeGC(ClientPtr client, GC *pGC, BITS32 mask, CARD32 *pC32, ChangeGCValPtr
pGC->fillRule = newfillrule;
else
{
- clientErrorValue = newfillrule;
+ if (client)
+ client->errorValue = newfillrule;
error = BadValue;
}
break;
}
case GCTile:
- if (pUnion)
- {
- NEXT_PTR(PixmapPtr, pPixmap);
- }
- else
- {
- XID newpix;
- NEXTVAL(XID, newpix);
- rc = dixLookupResourceByType((pointer *)&pPixmap, newpix,
- RT_PIXMAP, client, DixReadAccess);
- if (rc != Success)
- {
- clientErrorValue = newpix;
- error = (rc == BadValue) ? BadPixmap : rc;
- break;
- }
- }
+ NEXT_PTR(PixmapPtr, pPixmap);
if ((pPixmap->drawable.depth != pGC->depth) ||
(pPixmap->drawable.pScreen != pGC->pScreen))
{
@@ -286,23 +261,7 @@ dixChangeGC(ClientPtr client, GC *pGC, BITS32 mask, CARD32 *pC32, ChangeGCValPtr
}
break;
case GCStipple:
- if (pUnion)
- {
- NEXT_PTR(PixmapPtr, pPixmap);
- }
- else
- {
- XID newstipple;
- NEXTVAL(XID, newstipple)
- rc = dixLookupResourceByType((pointer *)&pPixmap, newstipple,
- RT_PIXMAP, client, DixReadAccess);
- if (rc != Success)
- {
- clientErrorValue = newstipple;
- error = (rc == BadValue) ? BadPixmap : rc;
- break;
- }
- }
+ NEXT_PTR(PixmapPtr, pPixmap);
if ((pPixmap->drawable.depth != 1) ||
(pPixmap->drawable.pScreen != pGC->pScreen))
{
@@ -325,23 +284,7 @@ dixChangeGC(ClientPtr client, GC *pGC, BITS32 mask, CARD32 *pC32, ChangeGCValPtr
case GCFont:
{
FontPtr pFont;
- if (pUnion)
- {
- NEXT_PTR(FontPtr, pFont);
- }
- else
- {
- XID newfont;
- NEXTVAL(XID, newfont)
- rc = dixLookupResourceByType((pointer *)&pFont, newfont,
- RT_FONT, client, DixUseAccess);
- if (rc != Success)
- {
- clientErrorValue = newfont;
- error = (rc == BadValue) ? BadFont : rc;
- break;
- }
- }
+ NEXT_PTR(FontPtr, pFont);
pFont->refcnt++;
if (pGC->font)
CloseFont(pGC->font, (Font)0);
@@ -356,7 +299,8 @@ dixChangeGC(ClientPtr client, GC *pGC, BITS32 mask, CARD32 *pC32, ChangeGCValPtr
pGC->subWindowMode = newclipmode;
else
{
- clientErrorValue = newclipmode;
+ if (client)
+ client->errorValue = newclipmode;
error = BadValue;
}
break;
@@ -369,7 +313,8 @@ dixChangeGC(ClientPtr client, GC *pGC, BITS32 mask, CARD32 *pC32, ChangeGCValPtr
pGC->graphicsExposures = newge;
else
{
- clientErrorValue = newge;
+ if (client)
+ client->errorValue = newge;
error = BadValue;
}
break;
@@ -381,28 +326,7 @@ dixChangeGC(ClientPtr client, GC *pGC, BITS32 mask, CARD32 *pC32, ChangeGCValPtr
NEXTVAL(INT16, pGC->clipOrg.y);
break;
case GCClipMask:
- if (pUnion)
- {
- NEXT_PTR(PixmapPtr, pPixmap);
- }
- else
- {
- Pixmap pid;
- NEXTVAL(Pixmap, pid)
- if (pid == None)
- pPixmap = NullPixmap;
- else {
- rc = dixLookupResourceByType((pointer *)&pPixmap, pid,
- RT_PIXMAP, client,
- DixReadAccess);
- if (rc != Success) {
- clientErrorValue = pid;
- error = (rc == BadValue) ? BadPixmap : rc;
- break;
- }
- }
- }
-
+ NEXT_PTR(PixmapPtr, pPixmap);
if (pPixmap)
{
if ((pPixmap->drawable.depth != 1) ||
@@ -451,7 +375,8 @@ dixChangeGC(ClientPtr client, GC *pGC, BITS32 mask, CARD32 *pC32, ChangeGCValPtr
}
else
{
- clientErrorValue = newdash;
+ if (client)
+ client->errorValue = newdash;
error = BadValue;
}
break;
@@ -464,13 +389,15 @@ dixChangeGC(ClientPtr client, GC *pGC, BITS32 mask, CARD32 *pC32, ChangeGCValPtr
pGC->arcMode = newarcmode;
else
{
- clientErrorValue = newarcmode;
+ if (client)
+ client->errorValue = newarcmode;
error = BadValue;
}
break;
}
default:
- clientErrorValue = maskQ;
+ if (client)
+ client->errorValue = maskQ;
error = BadValue;
break;
}
@@ -491,6 +418,53 @@ dixChangeGC(ClientPtr client, GC *pGC, BITS32 mask, CARD32 *pC32, ChangeGCValPtr
#undef NEXTVAL
#undef NEXT_PTR
+static const struct {
+ BITS32 mask;
+ RESTYPE type;
+ Mask access_mode;
+} xidfields[] = {
+ { GCTile, RT_PIXMAP, DixReadAccess },
+ { GCStipple, RT_PIXMAP, DixReadAccess },
+ { GCFont, RT_FONT, DixUseAccess },
+ { GCClipMask, RT_PIXMAP, DixReadAccess },
+};
+
+int
+ChangeGCXIDs(ClientPtr client, GC *pGC, BITS32 mask, CARD32 *pC32)
+{
+ ChangeGCVal vals[GCLastBit + 1];
+ int i;
+ if (mask & ~GCAllBits)
+ {
+ client->errorValue = mask;
+ return BadValue;
+ }
+ for (i = Ones(mask); i; --i)
+ vals[i].val = pC32[i];
+ for (i = 0; i < sizeof(xidfields) / sizeof(*xidfields); ++i)
+ {
+ int offset, rc;
+ if (!(mask & xidfields[i].mask))
+ continue;
+ offset = Ones(mask & (xidfields[i].mask - 1));
+ if (xidfields[i].mask == GCClipMask && vals[offset].val == None)
+ {
+ vals[offset].ptr = NullPixmap;
+ continue;
+ }
+ rc = dixLookupResourceByType(&vals[offset].ptr, vals[offset].val,
+ xidfields[i].type, client, xidfields[i].access_mode);
+ if (rc != Success)
+ {
+ client->errorValue = vals[offset].val;
+ if (rc == BadValue)
+ rc = (xidfields[i].type == RT_PIXMAP) ? BadPixmap : BadFont;
+ return rc;
+ }
+ }
+ return ChangeGC(client, pGC, mask, vals);
+}
+
/* CreateGC(pDrawable, mask, pval, pStatus)
creates a default GC for the given drawable, using mask to fill
in any non-default values.
@@ -570,11 +544,11 @@ CreateGC(DrawablePtr pDrawable, BITS32 mask, XID *pval, int *pStatus,
if (*pStatus != Success)
goto out;
- pGC->stateChanges = (1 << (GCLastBit+1)) - 1;
+ pGC->stateChanges = GCAllBits;
if (!(*pGC->pScreen->CreateGC)(pGC))
*pStatus = BadAlloc;
else if (mask)
- *pStatus = dixChangeGC(client, pGC, mask, pval, NULL);
+ *pStatus = ChangeGCXIDs(client, pGC, mask, pval);
else
*pStatus = Success;
@@ -593,7 +567,7 @@ out:
static Bool
CreateDefaultTile (GCPtr pGC)
{
- XID tmpval[3];
+ ChangeGCVal tmpval[3];
PixmapPtr pTile;
GCPtr pgcScratch;
xRectangle rect;
@@ -614,10 +588,10 @@ CreateDefaultTile (GCPtr pGC)
FreeScratchGC(pgcScratch);
return FALSE;
}
- tmpval[0] = GXcopy;
- tmpval[1] = pGC->tile.pixel;
- tmpval[2] = FillSolid;
- (void)dixChangeGC(NullClient, pgcScratch, GCFunction | GCForeground | GCFillStyle, tmpval, NULL);
+ tmpval[0].val = GXcopy;
+ tmpval[1].val = pGC->tile.pixel;
+ tmpval[2].val = FillSolid;
+ (void)ChangeGC(NullClient, pgcScratch, GCFunction | GCForeground | GCFillStyle, tmpval);
ValidateGC((DrawablePtr)pTile, pgcScratch);
rect.x = 0;
rect.y = 0;
@@ -773,9 +747,7 @@ CopyGC(GC *pgcSrc, GC *pgcDst, BITS32 mask)
pgcDst->arcMode = pgcSrc->arcMode;
break;
default:
- clientErrorValue = maskQ;
- error = BadValue;
- break;
+ FatalError ("CopyGC: Unhandled mask!\n");
}
}
if (pgcDst->fillStyle == FillTiled && pgcDst->tileIsPixel)
@@ -873,7 +845,7 @@ CreateScratchGC(ScreenPtr pScreen, unsigned depth)
pGC->lastWinOrg.x = 0;
pGC->lastWinOrg.y = 0;
- pGC->stateChanges = (1 << (GCLastBit+1)) - 1;
+ pGC->stateChanges = GCAllBits;
if (!(*pScreen->CreateGC)(pGC))
{
FreeGC(pGC, (XID)0);
@@ -935,7 +907,7 @@ Bool
CreateDefaultStipple(int screenNum)
{
ScreenPtr pScreen;
- XID tmpval[3];
+ ChangeGCVal tmpval[3];
xRectangle rect;
CARD16 w, h;
GCPtr pgcScratch;
@@ -949,14 +921,16 @@ CreateDefaultStipple(int screenNum)
(*pScreen->CreatePixmap)(pScreen, w, h, 1, 0)))
return FALSE;
/* fill stipple with 1 */
- tmpval[0] = GXcopy; tmpval[1] = 1; tmpval[2] = FillSolid;
+ tmpval[0].val = GXcopy;
+ tmpval[1].val = 1;
+ tmpval[2].val = FillSolid;
pgcScratch = GetScratchGC(1, pScreen);
if (!pgcScratch)
{
(*pScreen->DestroyPixmap)(pScreen->PixmapPerDepth[0]);
return FALSE;
}
- (void)dixChangeGC(NullClient, pgcScratch, GCFunction|GCForeground|GCFillStyle, tmpval, NULL);
+ (void)ChangeGC(NullClient, pgcScratch, GCFunction|GCForeground|GCFillStyle, tmpval);
ValidateGC((DrawablePtr)pScreen->PixmapPerDepth[0], pgcScratch);
rect.x = 0;
rect.y = 0;
@@ -989,7 +963,6 @@ SetDashes(GCPtr pGC, unsigned offset, unsigned ndash, unsigned char *pdash)
if (!*p++)
{
/* dash segment must be > 0 */
- clientErrorValue = 0;
return BadValue;
}
}
@@ -1152,7 +1125,7 @@ GetScratchGC(unsigned depth, ScreenPtr pScreen)
pGC->clipOrg.y = 0;
if (pGC->clientClipType != CT_NONE)
(*pGC->funcs->ChangeClip) (pGC, CT_NONE, NULL, 0);
- pGC->stateChanges = (1 << (GCLastBit+1)) - 1;
+ pGC->stateChanges = GCAllBits;
return pGC;
}
/* if we make it this far, need to roll our own */
diff --git a/dix/glyphcurs.c b/dix/glyphcurs.c
index f10400f7b..fa2aeca26 100644
--- a/dix/glyphcurs.c
+++ b/dix/glyphcurs.c
@@ -118,14 +118,13 @@ ServerBitsFromGlyph(FontPtr pfont, unsigned ch, CursorMetricPtr cm, unsigned cha
gcval[0].val = GXcopy;
gcval[1].val = 0;
gcval[2].ptr = (pointer)pfont;
- dixChangeGC(NullClient, pGC, GCFunction | GCForeground | GCFont,
- NULL, gcval);
+ ChangeGC(NullClient, pGC, GCFunction | GCForeground | GCFont, gcval);
ValidateGC((DrawablePtr)ppix, pGC);
(*pGC->ops->PolyFillRect)((DrawablePtr)ppix, pGC, 1, &rect);
/* draw the glyph */
gcval[0].val = 1;
- dixChangeGC(NullClient, pGC, GCForeground, NULL, gcval);
+ ChangeGC(NullClient, pGC, GCForeground, gcval);
ValidateGC((DrawablePtr)ppix, pGC);
(*pGC->ops->PolyText16)((DrawablePtr)ppix, pGC, cm->xhot, cm->yhot,
1, (unsigned short *)char2b);
diff --git a/dix/property.c b/dix/property.c
index 74d3d7826..03b70efc6 100644
--- a/dix/property.c
+++ b/dix/property.c
@@ -244,7 +244,7 @@ ProcChangeProperty(ClientPtr client)
if (err != Success)
return err;
else
- return client->noClientException;
+ return Success;
}
int
@@ -442,7 +442,7 @@ NullPropertyReply(
reply->propertyType = propertyType;
reply->format = format;
WriteReplyToClient(client, sizeof(xGenericReply), reply);
- return(client->noClientException);
+ return Success;
}
/*****************
@@ -574,7 +574,7 @@ ProcGetProperty(ClientPtr client)
free(pProp->data);
free(pProp);
}
- return(client->noClientException);
+ return Success;
}
int
@@ -620,7 +620,7 @@ ProcListProperties(ClientPtr client)
WriteSwappedDataToClient(client, numProps * sizeof(Atom), pAtoms);
}
free(pAtoms);
- return(client->noClientException);
+ return Success;
}
int
@@ -641,9 +641,5 @@ ProcDeleteProperty(ClientPtr client)
return (BadAtom);
}
- result = DeleteProperty(client, pWin, stuff->property);
- if (client->noClientException != Success)
- return(client->noClientException);
- else
- return(result);
+ return DeleteProperty(client, pWin, stuff->property);
}
diff --git a/dix/selection.c b/dix/selection.c
index 6a13572fb..4f592d123 100644
--- a/dix/selection.c
+++ b/dix/selection.c
@@ -225,7 +225,7 @@ ProcSetSelectionOwner(ClientPtr client)
pSel->client = (pWin ? client : NullClient);
CallSelectionCallback(pSel, client, SelectionSetOwner);
- return client->noClientException;
+ return Success;
}
int
@@ -257,7 +257,7 @@ ProcGetSelectionOwner(ClientPtr client)
return rc;
WriteReplyToClient(client, sizeof(xGetSelectionOwnerReply), &reply);
- return client->noClientException;
+ return Success;
}
int
@@ -298,7 +298,7 @@ ProcConvertSelection(ClientPtr client)
event.u.selectionRequest.property = stuff->property;
if (TryClientEvents(pSel->client, NULL, &event, 1, NoEventMask,
NoEventMask /* CantBeFiltered */, NullGrab))
- return client->noClientException;
+ return Success;
}
event.u.u.type = SelectionNotify;
@@ -309,5 +309,5 @@ ProcConvertSelection(ClientPtr client)
event.u.selectionNotify.property = None;
TryClientEvents(client, NULL, &event, 1, NoEventMask,
NoEventMask /* CantBeFiltered */, NullGrab);
- return client->noClientException;
+ return Success;
}
diff --git a/dix/window.c b/dix/window.c
index 313593b47..20cf45204 100644
--- a/dix/window.c
+++ b/dix/window.c
@@ -323,12 +323,12 @@ MakeRootTile(WindowPtr pWin)
FatalError("could not create root tile");
{
- CARD32 attributes[2];
+ ChangeGCVal attributes[2];
- attributes[0] = pScreen->whitePixel;
- attributes[1] = pScreen->blackPixel;
+ attributes[0].val = pScreen->whitePixel;
+ attributes[1].val = pScreen->blackPixel;
- (void)dixChangeGC(NullClient, pGC, GCForeground | GCBackground, attributes, NULL);
+ (void)ChangeGC(NullClient, pGC, GCForeground | GCBackground, attributes);
}
ValidateGC((DrawablePtr)pWin->background.pixmap, pGC);
@@ -3743,7 +3743,7 @@ DrawLogo(WindowPtr pWin)
querypixels[0] = fore[0].val;
querypixels[1] = pWin->background.pixel;
- QueryColors(cmap, 2, querypixels, rgb);
+ QueryColors(cmap, 2, querypixels, rgb, serverClient);
if ((rgb[0].red == rgb[1].red) &&
(rgb[0].green == rgb[1].green) &&
(rgb[0].blue == rgb[1].blue)) {
@@ -3763,8 +3763,7 @@ DrawLogo(WindowPtr pWin)
} else {
back[0].val = 0;
back[1].val = 0;
- dixChangeGC(NullClient, pGC, GCTileStipXOrigin|GCTileStipYOrigin,
- NULL, back);
+ ChangeGC(NullClient, pGC, GCTileStipXOrigin|GCTileStipYOrigin, back);
back[0].val = FillTiled;
back[1].ptr = pWin->background.pixmap;
bmask = GCFillStyle|GCTile;
@@ -3802,7 +3801,7 @@ DrawLogo(WindowPtr pWin)
poly[1].x = x + size-d31; poly[1].y = y;
poly[2].x = x + 0; poly[2].y = y + size;
poly[3].x = x + d31; poly[3].y = y + size;
- dixChangeGC(NullClient, pGC, fmask, NULL, fore);
+ ChangeGC(NullClient, pGC, fmask, fore);
ValidateGC(pDraw, pGC);
(*pGC->ops->FillPolygon)(pDraw, pGC, Convex, CoordModeOrigin, 4, poly);
@@ -3821,7 +3820,7 @@ DrawLogo(WindowPtr pWin)
poly[1].x = x + size / 2; poly[1].y = y + size/2;
poly[2].x = x + (size/2)+(d31-(d31/2)); poly[2].y = y + size/2;
poly[3].x = x + d31; poly[3].y = y + size;
- dixChangeGC(NullClient, pGC, bmask, NULL, back);
+ ChangeGC(NullClient, pGC, bmask, back);
ValidateGC(pDraw, pGC);
(*pGC->ops->FillPolygon)(pDraw, pGC, Convex, CoordModeOrigin, 4, poly);
@@ -3860,7 +3859,7 @@ DrawLogo(WindowPtr pWin)
poly[1].x = x + size/4; poly[1].y = y;
poly[2].x = x + size; poly[2].y = y + size;
poly[3].x = x + size - size/4; poly[3].y = y + size;
- dixChangeGC(NullClient, pGC, fmask, NULL, fore);
+ ChangeGC(NullClient, pGC, fmask, fore);
ValidateGC(pDraw, pGC);
(*pGC->ops->FillPolygon)(pDraw, pGC, Convex, CoordModeOrigin, 4, poly);
@@ -3878,7 +3877,7 @@ DrawLogo(WindowPtr pWin)
poly[1].x = x + size-( thin+gap); poly[1].y = y;
poly[2].x = x + thin; poly[2].y = y + size;
poly[3].x = x + thin + gap; poly[3].y = y + size;
- dixChangeGC(NullClient, pGC, bmask, NULL, back);
+ ChangeGC(NullClient, pGC, bmask, back);
ValidateGC(pDraw, pGC);
(*pGC->ops->FillPolygon)(pDraw, pGC, Convex, CoordModeOrigin, 4, poly);
diff --git a/fb/fbseg.c b/fb/fbseg.c
index 80dd48092..999be1cda 100644
--- a/fb/fbseg.c
+++ b/fb/fbseg.c
@@ -250,7 +250,9 @@ fbSetFg (DrawablePtr pDrawable,
{
if (fg != pGC->fgPixel)
{
- dixChangeGC (NullClient, pGC, GCForeground, &fg, NULL);
+ ChangeGCVal val;
+ val.val = fg;
+ ChangeGC (NullClient, pGC, GCForeground, &val);
ValidateGC (pDrawable, pGC);
}
}
diff --git a/glx/glxdriswrast.c b/glx/glxdriswrast.c
index a0054515b..ac8fd47c4 100644
--- a/glx/glxdriswrast.c
+++ b/glx/glxdriswrast.c
@@ -292,14 +292,6 @@ __glXDRIscreenCreateContext(__GLXscreen *baseScreen,
return &context->base;
}
-static void
-glxChangeGC(GCPtr gc, BITS32 mask, CARD32 val)
-{
- CARD32 v[1];
- v[0] = val;
- dixChangeGC(NullClient, gc, mask, v, NULL);
-}
-
static __GLXdrawable *
__glXDRIscreenCreateDrawable(ClientPtr client,
__GLXscreen *screen,
@@ -309,6 +301,7 @@ __glXDRIscreenCreateDrawable(ClientPtr client,
XID glxDrawId,
__GLXconfig *glxConfig)
{
+ ChangeGCVal gcvals[2];
__GLXDRIscreen *driScreen = (__GLXDRIscreen *) screen;
__GLXDRIconfig *config = (__GLXDRIconfig *) glxConfig;
__GLXDRIdrawable *private;
@@ -333,9 +326,10 @@ __glXDRIscreenCreateDrawable(ClientPtr client,
private->gc = CreateScratchGC(pScreen, pDraw->depth);
private->swapgc = CreateScratchGC(pScreen, pDraw->depth);
- glxChangeGC(private->gc, GCFunction, GXcopy);
- glxChangeGC(private->swapgc, GCFunction, GXcopy);
- glxChangeGC(private->swapgc, GCGraphicsExposures, FALSE);
+ gcvals[0].val = GXcopy;
+ ChangeGC(NullClient, private->gc, GCFunction, gcvals);
+ gcvals[1].val = FALSE;
+ ChangeGC(NullClient, private->gc, GCFunction | GCGraphicsExposures, gcvals);
private->driDrawable =
(*driScreen->swrast->createNewDrawable)(driScreen->driScreen,
diff --git a/glx/glxext.c b/glx/glxext.c
index 593e05309..b234afcd0 100644
--- a/glx/glxext.c
+++ b/glx/glxext.c
@@ -583,7 +583,7 @@ static int __glXDispatch(ClientPtr client)
ResetCurrentRequest(client);
client->sequence--;
IgnoreClient(client);
- return(client->noClientException);
+ return Success;
}
/*
diff --git a/glx/xfont.c b/glx/xfont.c
index 35fad4d5a..f0b5644b9 100644
--- a/glx/xfont.c
+++ b/glx/xfont.c
@@ -46,8 +46,6 @@
#include <windowstr.h>
#include <dixfontstr.h>
-extern XID clientErrorValue; /* imported kludge from dix layer */
-
/*
** Make a single GL bitmap from a single X glyph
*/
diff --git a/hw/dmx/dmx.c b/hw/dmx/dmx.c
index 95e7adca9..5718b6a59 100644
--- a/hw/dmx/dmx.c
+++ b/hw/dmx/dmx.c
@@ -235,7 +235,7 @@ static int ProcDMXQueryVersion(ClientPtr client)
swapl(&rep.patchVersion, n);
}
WriteToClient(client, sizeof(xDMXQueryVersionReply), (char *)&rep);
- return client->noClientException;
+ return Success;
}
static int ProcDMXSync(ClientPtr client)
@@ -257,7 +257,7 @@ static int ProcDMXSync(ClientPtr client)
swapl(&rep.status, n);
}
WriteToClient(client, sizeof(xDMXSyncReply), (char *)&rep);
- return client->noClientException;
+ return Success;
}
static int ProcDMXForceWindowCreation(ClientPtr client)
@@ -326,7 +326,7 @@ static int ProcDMXGetScreenCount(ClientPtr client)
swapl(&rep.screenCount, n);
}
WriteToClient(client, sizeof(xDMXGetScreenCountReply), (char *)&rep);
- return client->noClientException;
+ return Success;
}
static int ProcDMXGetScreenAttributes(ClientPtr client)
@@ -384,7 +384,7 @@ static int ProcDMXGetScreenAttributes(ClientPtr client)
}
WriteToClient(client, sizeof(xDMXGetScreenAttributesReply), (char *)&rep);
if (length) WriteToClient(client, length, (char *)attr.displayName);
- return client->noClientException;
+ return Success;
}
static int ProcDMXChangeScreensAttributes(ClientPtr client)
@@ -457,7 +457,7 @@ static int ProcDMXChangeScreensAttributes(ClientPtr client)
WriteToClient(client,
sizeof(xDMXChangeScreensAttributesReply),
(char *)&rep);
- return client->noClientException;
+ return Success;
}
static int ProcDMXAddScreen(ClientPtr client)
@@ -508,7 +508,7 @@ static int ProcDMXAddScreen(ClientPtr client)
WriteToClient(client,
sizeof(xDMXAddScreenReply),
(char *)&rep);
- return client->noClientException;
+ return Success;
}
static int ProcDMXRemoveScreen(ClientPtr client)
@@ -534,7 +534,7 @@ static int ProcDMXRemoveScreen(ClientPtr client)
WriteToClient(client,
sizeof(xDMXRemoveScreenReply),
(char *)&rep);
- return client->noClientException;
+ return Success;
}
@@ -678,7 +678,7 @@ static int ProcDMXGetWindowAttributes(ClientPtr client)
free(windows);
free(screens);
- return client->noClientException;
+ return Success;
}
static int ProcDMXGetDesktopAttributes(ClientPtr client)
@@ -709,7 +709,7 @@ static int ProcDMXGetDesktopAttributes(ClientPtr client)
swapl(&rep.shiftY, n);
}
WriteToClient(client, sizeof(xDMXGetDesktopAttributesReply), (char *)&rep);
- return client->noClientException;
+ return Success;
}
static int ProcDMXChangeDesktopAttributes(ClientPtr client)
@@ -752,7 +752,7 @@ static int ProcDMXChangeDesktopAttributes(ClientPtr client)
WriteToClient(client,
sizeof(xDMXChangeDesktopAttributesReply),
(char *)&rep);
- return client->noClientException;
+ return Success;
}
static int ProcDMXGetInputCount(ClientPtr client)
@@ -772,7 +772,7 @@ static int ProcDMXGetInputCount(ClientPtr client)
swapl(&rep.inputCount, n);
}
WriteToClient(client, sizeof(xDMXGetInputCountReply), (char *)&rep);
- return client->noClientException;
+ return Success;
}
static int ProcDMXGetInputAttributes(ClientPtr client)
@@ -810,7 +810,7 @@ static int ProcDMXGetInputAttributes(ClientPtr client)
}
WriteToClient(client, sizeof(xDMXGetInputAttributesReply), (char *)&rep);
if (length) WriteToClient(client, length, (char *)attr.name);
- return client->noClientException;
+ return Success;
}
static int ProcDMXAddInput(ClientPtr client)
@@ -861,7 +861,7 @@ static int ProcDMXAddInput(ClientPtr client)
swapl(&rep.physicalId, n);
}
WriteToClient(client, sizeof(xDMXAddInputReply), (char *)&rep);
- return client->noClientException;
+ return Success;
}
static int ProcDMXRemoveInput(ClientPtr client)
@@ -887,7 +887,7 @@ static int ProcDMXRemoveInput(ClientPtr client)
swapl(&rep.status, n);
}
WriteToClient(client, sizeof(xDMXRemoveInputReply), (char *)&rep);
- return client->noClientException;
+ return Success;
}
static int ProcDMXDispatch(ClientPtr client)
diff --git a/hw/dmx/dmxfont.c b/hw/dmx/dmxfont.c
index b6b2e3111..7a418c813 100644
--- a/hw/dmx/dmxfont.c
+++ b/hw/dmx/dmxfont.c
@@ -208,8 +208,6 @@ static int dmxProcSetFontPath(ClientPtr client)
/* Restore old fontpath in the DMX server */
SetFontPath(client, nOldPaths, oldFontPath);
client->errorValue = error;
- } else {
- result = client->noClientException;
}
}
diff --git a/hw/kdrive/ephyr/ephyr_draw.c b/hw/kdrive/ephyr/ephyr_draw.c
index 672e0e4ea..b1982a5e6 100644
--- a/hw/kdrive/ephyr/ephyr_draw.c
+++ b/hw/kdrive/ephyr/ephyr_draw.c
@@ -97,17 +97,17 @@ ephyrPrepareSolid(PixmapPtr pPix, int alu, Pixel pm, Pixel fg)
KdScreenInfo *screen = pScreenPriv->screen;
EphyrScrPriv *scrpriv = screen->driver;
EphyrFakexaPriv *fakexa = scrpriv->fakexa;
- CARD32 tmpval[3];
+ ChangeGCVal tmpval[3];
ephyrPreparePipelinedAccess(pPix, EXA_PREPARE_DEST);
fakexa->pDst = pPix;
fakexa->pGC = GetScratchGC(pPix->drawable.depth, pScreen);
- tmpval[0] = alu;
- tmpval[1] = pm;
- tmpval[2] = fg;
- dixChangeGC(NullClient, fakexa->pGC, GCFunction | GCPlaneMask | GCForeground, tmpval, NULL);
+ tmpval[0].val = alu;
+ tmpval[1].val = pm;
+ tmpval[2].val = fg;
+ ChangeGC(NullClient, fakexa->pGC, GCFunction | GCPlaneMask | GCForeground, tmpval);
ValidateGC(&pPix->drawable, fakexa->pGC);
@@ -161,7 +161,7 @@ ephyrPrepareCopy(PixmapPtr pSrc, PixmapPtr pDst, int dx, int dy, int alu,
KdScreenInfo *screen = pScreenPriv->screen;
EphyrScrPriv *scrpriv = screen->driver;
EphyrFakexaPriv *fakexa = scrpriv->fakexa;
- CARD32 tmpval[2];
+ ChangeGCVal tmpval[2];
ephyrPreparePipelinedAccess(pDst, EXA_PREPARE_DEST);
ephyrPreparePipelinedAccess(pSrc, EXA_PREPARE_SRC);
@@ -170,9 +170,9 @@ ephyrPrepareCopy(PixmapPtr pSrc, PixmapPtr pDst, int dx, int dy, int alu,
fakexa->pDst = pDst;
fakexa->pGC = GetScratchGC(pDst->drawable.depth, pScreen);
- tmpval[0] = alu;
- tmpval[1] = pm;
- dixChangeGC (NullClient, fakexa->pGC, GCFunction | GCPlaneMask, tmpval, NULL);
+ tmpval[0].val = alu;
+ tmpval[1].val = pm;
+ ChangeGC (NullClient, fakexa->pGC, GCFunction | GCPlaneMask, tmpval);
ValidateGC(&pDst->drawable, fakexa->pGC);
diff --git a/hw/kdrive/ephyr/ephyrdriext.c b/hw/kdrive/ephyr/ephyrdriext.c
index 07733381f..55cc0f128 100644
--- a/hw/kdrive/ephyr/ephyrdriext.c
+++ b/hw/kdrive/ephyr/ephyrdriext.c
@@ -636,7 +636,7 @@ ProcXF86DRIQueryVersion (register ClientPtr client)
}
WriteToClient(client, sizeof(xXF86DRIQueryVersionReply), (char *)&rep);
EPHYR_LOG ("leave\n") ;
- return (client->noClientException);
+ return Success;
}
static int
@@ -674,7 +674,7 @@ ProcXF86DRIQueryDirectRenderingCapable (register ClientPtr client)
WriteToClient(client, sizeof(xXF86DRIQueryDirectRenderingCapableReply), (char *)&rep);
EPHYR_LOG ("leave\n") ;
- return (client->noClientException);
+ return Success;
}
static int
@@ -717,7 +717,7 @@ ProcXF86DRIOpenConnection (register ClientPtr client)
if (rep.busIdStringLength)
WriteToClient(client, rep.busIdStringLength, busIdString);
EPHYR_LOG ("leave\n") ;
- return (client->noClientException);
+ return Success;
}
static int
@@ -744,7 +744,7 @@ ProcXF86DRIAuthConnection (register ClientPtr client)
}
WriteToClient(client, sizeof(xXF86DRIAuthConnectionReply), (char *)&rep);
EPHYR_LOG ("leave\n") ;
- return (client->noClientException);
+ return Success;
}
static int
@@ -763,7 +763,7 @@ ProcXF86DRICloseConnection (register ClientPtr client)
*/
EPHYR_LOG ("leave\n") ;
- return (client->noClientException);
+ return Success;
}
static int
@@ -802,7 +802,7 @@ ProcXF86DRIGetClientDriverName (register ClientPtr client)
rep.clientDriverNameLength,
clientDriverName);
EPHYR_LOG ("leave\n") ;
- return (client->noClientException);
+ return Success;
}
static int
@@ -848,7 +848,7 @@ ProcXF86DRICreateContext (register ClientPtr client)
WriteToClient(client, sizeof(xXF86DRICreateContextReply), (char *)&rep);
EPHYR_LOG ("leave\n") ;
- return (client->noClientException);
+ return Success;
}
static int
@@ -868,7 +868,7 @@ ProcXF86DRIDestroyContext (register ClientPtr client)
}
EPHYR_LOG ("leave\n") ;
- return (client->noClientException);
+ return Success;
}
static Bool
@@ -1079,7 +1079,7 @@ ProcXF86DRICreateDrawable (ClientPtr client)
WriteToClient(client, sizeof(xXF86DRICreateDrawableReply), (char *)&rep);
EPHYR_LOG ("leave\n") ;
- return (client->noClientException);
+ return Success;
}
static int
@@ -1123,7 +1123,7 @@ ProcXF86DRIDestroyDrawable (register ClientPtr client)
pair->remote=0;
EPHYR_LOG ("leave\n") ;
- return (client->noClientException);
+ return Success;
}
static int
@@ -1257,7 +1257,7 @@ ProcXF86DRIGetDrawableInfo (register ClientPtr client)
EPHYR_LOG ("leave\n") ;
- return (client->noClientException);
+ return Success;
}
static int
@@ -1308,7 +1308,7 @@ ProcXF86DRIGetDeviceInfo (register ClientPtr client)
WriteToClient(client, rep.devPrivateSize, (char *)pDevPrivate);
}
EPHYR_LOG ("leave\n") ;
- return (client->noClientException);
+ return Success;
}
static int
diff --git a/hw/kdrive/src/kcmap.c b/hw/kdrive/src/kcmap.c
index 40697e091..9bfdd78b6 100644
--- a/hw/kdrive/src/kcmap.c
+++ b/hw/kdrive/src/kcmap.c
@@ -58,7 +58,7 @@ KdSetColormap (ScreenPtr pScreen)
for (i = 0; i < (1 << pScreenPriv->screen->fb.depth); i++)
pixels[i] = i;
- QueryColors (pCmap, (1 << pScreenPriv->screen->fb.depth), pixels, colors);
+ QueryColors (pCmap, (1 << pScreenPriv->screen->fb.depth), pixels, colors, serverClient);
for (i = 0; i < (1 << pScreenPriv->screen->fb.depth); i++)
{
diff --git a/hw/kdrive/src/kxv.c b/hw/kdrive/src/kxv.c
index bf6600a09..c81d7daaa 100644
--- a/hw/kdrive/src/kxv.c
+++ b/hw/kdrive/src/kxv.c
@@ -1867,7 +1867,7 @@ void
KXVPaintRegion (DrawablePtr pDraw, RegionPtr pRgn, Pixel fg)
{
GCPtr pGC;
- CARD32 val[2];
+ ChangeGCVal val[2];
xRectangle *rects, *r;
BoxPtr pBox = REGION_RECTS (pRgn);
int nBox = REGION_NUM_RECTS (pRgn);
@@ -1890,9 +1890,9 @@ KXVPaintRegion (DrawablePtr pDraw, RegionPtr pRgn, Pixel fg)
if (!pGC)
goto bail1;
- val[0] = fg;
- val[1] = IncludeInferiors;
- dixChangeGC (NullClient, pGC, GCForeground|GCSubwindowMode, val, NULL);
+ val[0].val = fg;
+ val[1].val = IncludeInferiors;
+ ChangeGC (NullClient, pGC, GCForeground|GCSubwindowMode, val);
ValidateGC (pDraw, pGC);
diff --git a/hw/vfb/InitOutput.c b/hw/vfb/InitOutput.c
index 7af5f9335..0f0edb2a9 100644
--- a/hw/vfb/InitOutput.c
+++ b/hw/vfb/InitOutput.c
@@ -445,7 +445,7 @@ vfbInstallColormap(ColormapPtr pmap)
for (i = 0; i < entries; i++) ppix[i] = i;
/* XXX truecolor */
- QueryColors(pmap, entries, ppix, prgb);
+ QueryColors(pmap, entries, ppix, prgb, serverClient);
for (i = 0; i < entries; i++) { /* convert xrgbs to xColorItems */
defs[i].pixel = ppix[i] & 0xff; /* change pixel to index */
diff --git a/hw/xfree86/common/xf86xv.c b/hw/xfree86/common/xf86xv.c
index e2d9c1541..2b33f2585 100644
--- a/hw/xfree86/common/xf86xv.c
+++ b/hw/xfree86/common/xf86xv.c
@@ -1834,7 +1834,6 @@ xf86XVFillKeyHelperDrawable (DrawablePtr pDraw, CARD32 key, RegionPtr clipboxes)
WindowPtr pWin = (WindowPtr)pDraw;
XF86XVWindowPtr pPriv = GET_XF86XV_WINDOW(pWin);
GCPtr pGC = NULL;
- XID pval[2];
BoxPtr pbox = REGION_RECTS(clipboxes);
int i, nbox = REGION_NUM_RECTS(clipboxes);
xRectangle *rects;
@@ -1846,6 +1845,7 @@ xf86XVFillKeyHelperDrawable (DrawablePtr pDraw, CARD32 key, RegionPtr clipboxes)
if(!pGC) {
int status;
+ XID pval[2];
pval[0] = key;
pval[1] = IncludeInferiors;
pGC = CreateGC(pDraw, GCForeground | GCSubwindowMode, pval, &status,
@@ -1854,8 +1854,9 @@ xf86XVFillKeyHelperDrawable (DrawablePtr pDraw, CARD32 key, RegionPtr clipboxes)
ValidateGC(pDraw, pGC);
if (pPriv) pPriv->pGC = pGC;
} else if (key != pGC->fgPixel){
- pval[0] = key;
- dixChangeGC(NullClient, pGC, GCForeground, pval, NULL);
+ ChangeGCVal val;
+ val.val = key;
+ ChangeGC(NullClient, pGC, GCForeground, &val);
ValidateGC(pDraw, pGC);
}
@@ -1881,7 +1882,7 @@ void
xf86XVFillKeyHelper (ScreenPtr pScreen, CARD32 key, RegionPtr clipboxes)
{
DrawablePtr root = &WindowTable[pScreen->myNum]->drawable;
- XID pval[2];
+ ChangeGCVal pval[2];
BoxPtr pbox = REGION_RECTS(clipboxes);
int i, nbox = REGION_NUM_RECTS(clipboxes);
xRectangle *rects;
@@ -1890,9 +1891,9 @@ xf86XVFillKeyHelper (ScreenPtr pScreen, CARD32 key, RegionPtr clipboxes)
if(!xf86Screens[pScreen->myNum]->vtSema) return;
gc = GetScratchGC(root->depth, pScreen);
- pval[0] = key;
- pval[1] = IncludeInferiors;
- (void) dixChangeGC(NullClient, gc, GCForeground|GCSubwindowMode, pval, NULL);
+ pval[0].val = key;
+ pval[1].val = IncludeInferiors;
+ (void) ChangeGC(NullClient, gc, GCForeground|GCSubwindowMode, pval);
ValidateGC(root, gc);
rects = malloc(nbox * sizeof(xRectangle));
diff --git a/hw/xfree86/dixmods/extmod/xf86dga2.c b/hw/xfree86/dixmods/extmod/xf86dga2.c
index 711a9cb75..6587af947 100644
--- a/hw/xfree86/dixmods/extmod/xf86dga2.c
+++ b/hw/xfree86/dixmods/extmod/xf86dga2.c
@@ -129,7 +129,7 @@ ProcXDGAQueryVersion(ClientPtr client)
rep.minorVersion = SERVER_XDGA_MINOR_VERSION;
WriteToClient(client, sizeof(xXDGAQueryVersionReply), (char *)&rep);
- return (client->noClientException);
+ return Success;
}
@@ -166,7 +166,7 @@ ProcXDGAOpenFramebuffer(ClientPtr client)
if(rep.length)
WriteToClient(client, nameSize, deviceName);
- return (client->noClientException);
+ return Success;
}
@@ -185,7 +185,7 @@ ProcXDGACloseFramebuffer(ClientPtr client)
DGACloseFramebuffer(stuff->screen);
- return (client->noClientException);
+ return Success;
}
static int
@@ -210,12 +210,12 @@ ProcXDGAQueryModes(ClientPtr client)
rep.number = 0;
rep.length = 0;
WriteToClient(client, sz_xXDGAQueryModesReply, (char*)&rep);
- return (client->noClientException);
+ return Success;
}
if(!(num = DGAGetModes(stuff->screen))) {
WriteToClient(client, sz_xXDGAQueryModesReply, (char*)&rep);
- return (client->noClientException);
+ return Success;
}
if(!(mode = (XDGAModePtr)malloc(num * sizeof(XDGAModeRec))))
@@ -269,7 +269,7 @@ ProcXDGAQueryModes(ClientPtr client)
free(mode);
- return (client->noClientException);
+ return Success;
}
@@ -342,7 +342,7 @@ ProcXDGASetMode(ClientPtr client)
DGASelectInput(stuff->screen, NULL, 0);
DGASetMode(stuff->screen, 0, &mode, &pPix);
WriteToClient(client, sz_xXDGASetModeReply, (char*)&rep);
- return (client->noClientException);
+ return Success;
}
if(Success != DGASetMode(stuff->screen, stuff->mode, &mode, &pPix))
@@ -397,7 +397,7 @@ ProcXDGASetMode(ClientPtr client)
WriteToClient(client, sz_xXDGAModeInfo, (char*)(&info));
WriteToClient(client, size, mode.name);
- return (client->noClientException);
+ return Success;
}
static int
@@ -415,7 +415,7 @@ ProcXDGASetViewport(ClientPtr client)
DGASetViewport(stuff->screen, stuff->x, stuff->y, stuff->flags);
- return (client->noClientException);
+ return Success;
}
static int
@@ -435,14 +435,10 @@ ProcXDGAInstallColormap(ClientPtr client)
rc = dixLookupResourceByType((pointer *)&cmap, stuff->cmap, RT_COLORMAP,
client, DixInstallAccess);
- if (rc == Success) {
- DGAInstallCmap(cmap);
- return (client->noClientException);
- } else {
+ if (rc != Success)
return (rc == BadValue) ? BadColor : rc;
- }
-
- return (client->noClientException);
+ DGAInstallCmap(cmap);
+ return Success;
}
@@ -462,7 +458,7 @@ ProcXDGASelectInput(ClientPtr client)
if(DGA_GETCLIENT(stuff->screen) == client)
DGASelectInput(stuff->screen, client, stuff->mask);
- return (client->noClientException);
+ return Success;
}
@@ -483,7 +479,7 @@ ProcXDGAFillRectangle(ClientPtr client)
stuff->width, stuff->height, stuff->color))
return BadMatch;
- return (client->noClientException);
+ return Success;
}
static int
@@ -503,7 +499,7 @@ ProcXDGACopyArea(ClientPtr client)
stuff->width, stuff->height, stuff->dstx, stuff->dsty))
return BadMatch;
- return (client->noClientException);
+ return Success;
}
@@ -524,7 +520,7 @@ ProcXDGACopyTransparentArea(ClientPtr client)
stuff->width, stuff->height, stuff->dstx, stuff->dsty, stuff->key))
return BadMatch;
- return (client->noClientException);
+ return Success;
}
@@ -548,7 +544,7 @@ ProcXDGAGetViewportStatus(ClientPtr client)
rep.status = DGAGetViewportStatus(stuff->screen);
WriteToClient(client, sizeof(xXDGAGetViewportStatusReply), (char *)&rep);
- return (client->noClientException);
+ return Success;
}
static int
@@ -571,7 +567,7 @@ ProcXDGASync(ClientPtr client)
DGASync(stuff->screen);
WriteToClient(client, sizeof(xXDGASyncReply), (char *)&rep);
- return (client->noClientException);
+ return Success;
}
static int
@@ -592,7 +588,7 @@ ProcXDGASetClientVersion(ClientPtr client)
pPriv->major = stuff->major;
pPriv->minor = stuff->minor;
- return (client->noClientException);
+ return Success;
}
static int
@@ -623,7 +619,7 @@ ProcXDGAChangePixmapMode(ClientPtr client)
rep.y = y;
WriteToClient(client, sizeof(xXDGAChangePixmapModeReply), (char *)&rep);
- return (client->noClientException);
+ return Success;
}
@@ -649,7 +645,7 @@ ProcXDGACreateColormap(ClientPtr client)
if(result != Success)
return result;
- return (client->noClientException);
+ return Success;
}
/*
@@ -707,7 +703,7 @@ ProcXF86DGAGetVideoLL(ClientPtr client)
rep.ram_size = rep.bank_size >> 10;
WriteToClient(client, SIZEOF(xXF86DGAGetVideoLLReply), (char *)&rep);
- return (client->noClientException);
+ return Success;
}
static int
@@ -762,7 +758,7 @@ ProcXF86DGADirectVideo(ClientPtr client)
DGA_SETCLIENT(stuff->screen, NULL);
}
- return (client->noClientException);
+ return Success;
}
static int
@@ -793,7 +789,7 @@ ProcXF86DGAGetViewPortSize(ClientPtr client)
rep.height = mode.viewportHeight;
WriteToClient(client, SIZEOF(xXF86DGAGetViewPortSizeReply), (char *)&rep);
- return (client->noClientException);
+ return Success;
}
static int
@@ -819,7 +815,7 @@ ProcXF86DGASetViewPort(ClientPtr client)
!= Success)
return DGAErrorBase + XF86DGADirectNotActivated;
- return (client->noClientException);
+ return Success;
}
static int
@@ -838,7 +834,7 @@ ProcXF86DGAGetVidPage(ClientPtr client)
rep.vpage = 0; /* silently fail */
WriteToClient(client, SIZEOF(xXF86DGAGetVidPageReply), (char *)&rep);
- return (client->noClientException);
+ return Success;
}
@@ -854,7 +850,7 @@ ProcXF86DGASetVidPage(ClientPtr client)
/* silently fail */
- return (client->noClientException);
+ return Success;
}
@@ -880,7 +876,7 @@ ProcXF86DGAInstallColormap(ClientPtr client)
client, DixInstallAccess);
if (rc == Success) {
DGAInstallCmap(pcmp);
- return (client->noClientException);
+ return Success;
} else {
return (rc == BadValue) ? BadColor : rc;
}
@@ -905,7 +901,7 @@ ProcXF86DGAQueryDirectVideo(ClientPtr client)
rep.flags = XF86DGADirectPresent;
WriteToClient(client, SIZEOF(xXF86DGAQueryDirectVideoReply), (char *)&rep);
- return (client->noClientException);
+ return Success;
}
static int
@@ -931,7 +927,7 @@ ProcXF86DGAViewPortChanged(ClientPtr client)
rep.result = 1;
WriteToClient(client, SIZEOF(xXF86DGAViewPortChangedReply), (char *)&rep);
- return (client->noClientException);
+ return Success;
}
#endif /* DGA_PROTOCOL_OLD_SUPPORT */
diff --git a/hw/xfree86/dixmods/extmod/xf86vmode.c b/hw/xfree86/dixmods/extmod/xf86vmode.c
index 5bdd88c0a..665f74396 100644
--- a/hw/xfree86/dixmods/extmod/xf86vmode.c
+++ b/hw/xfree86/dixmods/extmod/xf86vmode.c
@@ -394,7 +394,7 @@ ProcXF86VidModeQueryVersion(ClientPtr client)
swaps(&rep.minorVersion, n);
}
WriteToClient(client, sizeof(xXF86VidModeQueryVersionReply), (char *)&rep);
- return (client->noClientException);
+ return Success;
}
static int
@@ -495,7 +495,7 @@ ProcXF86VidModeGetModeLine(ClientPtr client)
WriteToClient(client, sizeof(xXF86VidModeGetModeLineReply),
(char *)&rep);
}
- return (client->noClientException);
+ return Success;
}
static int
@@ -590,7 +590,7 @@ ProcXF86VidModeGetAllModeLines(ClientPtr client)
} while (VidModeGetNextModeline(stuff->screen, &mode, &dotClock));
- return (client->noClientException);
+ return Success;
}
#define MODEMATCH(mode,stuff) \
@@ -761,7 +761,7 @@ ProcXF86VidModeAddModeLine(ClientPtr client)
if (xf86GetVerbosity() > DEFAULT_XF86VIDMODE_VERBOSITY)
ErrorF("AddModeLine - Succeeded\n");
- return client->noClientException;
+ return Success;
}
static int
@@ -874,7 +874,7 @@ ProcXF86VidModeDeleteModeLine(ClientPtr client)
VidModeDeleteModeline(stuff->screen, mode);
if (xf86GetVerbosity() > DEFAULT_XF86VIDMODE_VERBOSITY)
ErrorF("DeleteModeLine - Succeeded\n");
- return(client->noClientException);
+ return Success;
}
} while (VidModeGetNextModeline(stuff->screen, &mode, &dotClock));
@@ -1002,7 +1002,7 @@ ProcXF86VidModeModModeLine(ClientPtr client)
if (xf86GetVerbosity() > DEFAULT_XF86VIDMODE_VERBOSITY)
ErrorF("ModModeLine - Succeeded\n");
- return(client->noClientException);
+ return Success;
}
static int
@@ -1120,7 +1120,7 @@ status_reply:
WriteToClient(client, sizeof(xXF86VidModeValidateModeLineReply), (char *)&rep);
if (xf86GetVerbosity() > DEFAULT_XF86VIDMODE_VERBOSITY)
ErrorF("ValidateModeLine - Succeeded (status = %d)\n", status);
- return(client->noClientException);
+ return Success;
}
static int
@@ -1137,7 +1137,7 @@ ProcXF86VidModeSwitchMode(ClientPtr client)
VidModeZoomViewport(stuff->screen, (short)stuff->zoom);
- return (client->noClientException);
+ return Success;
}
static int
@@ -1201,7 +1201,7 @@ ProcXF86VidModeSwitchToMode(ClientPtr client)
if ((VidModeGetDotClock(stuff->screen, stuff->dotclock) == dotClock)
&& MODEMATCH(mode, stuff))
- return (client->noClientException);
+ return Success;
if (!VidModeGetFirstModeline(stuff->screen, &mode, &dotClock))
return BadValue;
@@ -1230,7 +1230,7 @@ ProcXF86VidModeSwitchToMode(ClientPtr client)
if (xf86GetVerbosity() > DEFAULT_XF86VIDMODE_VERBOSITY)
ErrorF("SwitchToMode - Succeeded\n");
- return(client->noClientException);
+ return Success;
}
} while (VidModeGetNextModeline(stuff->screen, &mode, &dotClock));
@@ -1252,7 +1252,7 @@ ProcXF86VidModeLockModeSwitch(ClientPtr client)
if (!VidModeLockZoom(stuff->screen, (short)stuff->lock))
return VidModeErrorBase + XF86VidModeZoomLocked;
- return (client->noClientException);
+ return Success;
}
static int
@@ -1339,7 +1339,7 @@ ProcXF86VidModeGetMonitor(ClientPtr client)
free(hsyncdata);
free(vsyncdata);
- return (client->noClientException);
+ return Success;
}
static int
@@ -1371,7 +1371,7 @@ ProcXF86VidModeGetViewPort(ClientPtr client)
swapl(&rep.y, n);
}
WriteToClient(client, SIZEOF(xXF86VidModeGetViewPortReply), (char *)&rep);
- return (client->noClientException);
+ return Success;
}
static int
@@ -1389,7 +1389,7 @@ ProcXF86VidModeSetViewPort(ClientPtr client)
if (!VidModeSetViewPort(stuff->screen, stuff->x, stuff->y))
return BadValue;
- return (client->noClientException);
+ return Success;
}
static int
@@ -1453,7 +1453,7 @@ ProcXF86VidModeGetDotClocks(ClientPtr client)
}
free(Clocks);
- return (client->noClientException);
+ return Success;
}
static int
@@ -1472,7 +1472,7 @@ ProcXF86VidModeSetGamma(ClientPtr client)
((float)stuff->green)/10000., ((float)stuff->blue)/10000.))
return BadValue;
- return (client->noClientException);
+ return Success;
}
static int
@@ -1506,7 +1506,7 @@ ProcXF86VidModeGetGamma(ClientPtr client)
swapl(&rep.blue, n);
}
WriteToClient(client, sizeof(xXF86VidModeGetGammaReply), (char *)&rep);
- return (client->noClientException);
+ return Success;
}
static int
@@ -1533,7 +1533,7 @@ ProcXF86VidModeSetGammaRamp(ClientPtr client)
if (!VidModeSetGammaRamp(stuff->screen, stuff->size, r, g, b))
return BadValue;
- return (client->noClientException);
+ return Success;
}
static int
@@ -1584,7 +1584,7 @@ ProcXF86VidModeGetGammaRamp(ClientPtr client)
free(ramp);
}
- return (client->noClientException);
+ return Success;
}
@@ -1611,7 +1611,7 @@ ProcXF86VidModeGetGammaRampSize(ClientPtr client)
}
WriteToClient(client,sizeof(xXF86VidModeGetGammaRampSizeReply),(char*)&rep);
- return (client->noClientException);
+ return Success;
}
static int
@@ -1641,7 +1641,7 @@ ProcXF86VidModeGetPermissions(ClientPtr client)
}
WriteToClient(client,sizeof(xXF86VidModeGetPermissionsReply),(char*)&rep);
- return (client->noClientException);
+ return Success;
}
@@ -1665,7 +1665,7 @@ ProcXF86VidModeSetClientVersion(ClientPtr client)
pPriv->major = stuff->major;
pPriv->minor = stuff->minor;
- return (client->noClientException);
+ return Success;
}
static int
diff --git a/hw/xfree86/dri/xf86dri.c b/hw/xfree86/dri/xf86dri.c
index 4e5a15fca..f32565d3c 100644
--- a/hw/xfree86/dri/xf86dri.c
+++ b/hw/xfree86/dri/xf86dri.c
@@ -146,7 +146,7 @@ ProcXF86DRIQueryVersion(
swapl(&rep.patchVersion, n);
}
WriteToClient(client, sizeof(xXF86DRIQueryVersionReply), (char *)&rep);
- return (client->noClientException);
+ return Success;
}
static int
@@ -185,7 +185,7 @@ ProcXF86DRIQueryDirectRenderingCapable(
WriteToClient(client,
sizeof(xXF86DRIQueryDirectRenderingCapableReply), (char *)&rep);
- return (client->noClientException);
+ return Success;
}
static int
@@ -228,7 +228,7 @@ ProcXF86DRIOpenConnection(
WriteToClient(client, sizeof(xXF86DRIOpenConnectionReply), (char *)&rep);
if (rep.busIdStringLength)
WriteToClient(client, rep.busIdStringLength, busIdString);
- return (client->noClientException);
+ return Success;
}
static int
@@ -255,7 +255,7 @@ ProcXF86DRIAuthConnection(
rep.authenticated = 0;
}
WriteToClient(client, sizeof(xXF86DRIAuthConnectionReply), (char *)&rep);
- return (client->noClientException);
+ return Success;
}
static int
@@ -272,7 +272,7 @@ ProcXF86DRICloseConnection(
DRICloseConnection( screenInfo.screens[stuff->screen]);
- return (client->noClientException);
+ return Success;
}
static int
@@ -311,7 +311,7 @@ ProcXF86DRIGetClientDriverName(
WriteToClient(client,
rep.clientDriverNameLength,
clientDriverName);
- return (client->noClientException);
+ return Success;
}
static int
@@ -343,7 +343,7 @@ ProcXF86DRICreateContext(
}
WriteToClient(client, sizeof(xXF86DRICreateContextReply), (char *)&rep);
- return (client->noClientException);
+ return Success;
}
static int
@@ -363,7 +363,7 @@ ProcXF86DRIDestroyContext(
return BadValue;
}
- return (client->noClientException);
+ return Success;
}
static int
@@ -397,7 +397,7 @@ ProcXF86DRICreateDrawable(
}
WriteToClient(client, sizeof(xXF86DRICreateDrawableReply), (char *)&rep);
- return (client->noClientException);
+ return Success;
}
static int
@@ -425,7 +425,7 @@ ProcXF86DRIDestroyDrawable(
return BadValue;
}
- return (client->noClientException);
+ return Success;
}
static int
@@ -533,7 +533,7 @@ ProcXF86DRIGetDrawableInfo(
(char *)pBackClipRects);
}
- return (client->noClientException);
+ return Success;
}
static int
@@ -584,7 +584,7 @@ ProcXF86DRIGetDeviceInfo(
if (rep.length) {
WriteToClient(client, rep.devPrivateSize, (char *)pDevPrivate);
}
- return (client->noClientException);
+ return Success;
}
static int
diff --git a/hw/xfree86/dri2/dri2ext.c b/hw/xfree86/dri2/dri2ext.c
index 94193266b..602eb6653 100644
--- a/hw/xfree86/dri2/dri2ext.c
+++ b/hw/xfree86/dri2/dri2ext.c
@@ -91,7 +91,7 @@ ProcDRI2QueryVersion(ClientPtr client)
WriteToClient(client, sizeof(xDRI2QueryVersionReply), &rep);
- return client->noClientException;
+ return Success;
}
static int
@@ -129,7 +129,7 @@ ProcDRI2Connect(ClientPtr client)
WriteToClient(client, rep.driverNameLength, driverName);
WriteToClient(client, rep.deviceNameLength, deviceName);
- return client->noClientException;
+ return Success;
}
static int
@@ -151,7 +151,7 @@ ProcDRI2Authenticate(ClientPtr client)
rep.authenticated = DRI2Authenticate(pDraw->pScreen, stuff->magic);
WriteToClient(client, sizeof(xDRI2AuthenticateReply), &rep);
- return client->noClientException;
+ return Success;
}
static void
@@ -188,7 +188,7 @@ ProcDRI2CreateDrawable(ClientPtr client)
if (status != Success)
return status;
- return client->noClientException;
+ return Success;
}
static int
@@ -203,7 +203,7 @@ ProcDRI2DestroyDrawable(ClientPtr client)
&pDrawable, &status))
return status;
- return client->noClientException;
+ return Success;
}
@@ -269,7 +269,7 @@ ProcDRI2GetBuffers(ClientPtr client)
return status;
if (DRI2ThrottleClient(client, pDrawable))
- return client->noClientException;
+ return Success;
attachments = (unsigned int *) &stuff[1];
buffers = DRI2GetBuffers(pDrawable, &width, &height,
@@ -278,7 +278,7 @@ ProcDRI2GetBuffers(ClientPtr client)
send_buffers_reply(client, pDrawable, buffers, count, width, height);
- return client->noClientException;
+ return Success;
}
static int
@@ -296,7 +296,7 @@ ProcDRI2GetBuffersWithFormat(ClientPtr client)
return status;
if (DRI2ThrottleClient(client, pDrawable))
- return client->noClientException;
+ return Success;
attachments = (unsigned int *) &stuff[1];
buffers = DRI2GetBuffersWithFormat(pDrawable, &width, &height,
@@ -304,7 +304,7 @@ ProcDRI2GetBuffersWithFormat(ClientPtr client)
send_buffers_reply(client, pDrawable, buffers, count, width, height);
- return client->noClientException;
+ return Success;
}
static int
@@ -341,7 +341,7 @@ ProcDRI2CopyRegion(ClientPtr client)
WriteToClient(client, sizeof(xDRI2CopyRegionReply), &rep);
- return client->noClientException;
+ return Success;
}
static void
@@ -398,7 +398,7 @@ ProcDRI2SwapBuffers(ClientPtr client)
* also orders swaps.
*/
if (DRI2ThrottleClient(client, pDrawable))
- return client->noClientException;
+ return Success;
target_msc = vals_to_card64(stuff->target_msc_lo, stuff->target_msc_hi);
divisor = vals_to_card64(stuff->divisor_lo, stuff->divisor_hi);
@@ -416,7 +416,7 @@ ProcDRI2SwapBuffers(ClientPtr client)
WriteToClient(client, sizeof(xDRI2SwapBuffersReply), &rep);
- return client->noClientException;
+ return Success;
}
static void
@@ -456,7 +456,7 @@ ProcDRI2GetMSC(ClientPtr client)
WriteToClient(client, sizeof(xDRI2MSCReply), &rep);
- return client->noClientException;
+ return Success;
}
static int
@@ -483,7 +483,7 @@ ProcDRI2WaitMSC(ClientPtr client)
if (status != Success)
return status;
- return client->noClientException;
+ return Success;
}
int
@@ -498,7 +498,7 @@ ProcDRI2WaitMSCReply(ClientPtr client, CARD64 ust, CARD64 msc, CARD64 sbc)
WriteToClient(client, sizeof(xDRI2MSCReply), &rep);
- return client->noClientException;
+ return Success;
}
static int
@@ -518,7 +518,7 @@ ProcDRI2SwapInterval(ClientPtr client)
DRI2SwapInterval(pDrawable, stuff->interval);
- return client->noClientException;
+ return Success;
}
static int
@@ -548,7 +548,7 @@ ProcDRI2WaitSBC(ClientPtr client)
WriteToClient(client, sizeof(xDRI2MSCReply), &rep);
- return client->noClientException;
+ return Success;
}
static int
@@ -613,7 +613,7 @@ SProcDRI2Connect(ClientPtr client)
rep.driverNameLength = 0;
rep.deviceNameLength = 0;
- return client->noClientException;
+ return Success;
}
static int
diff --git a/hw/xfree86/vgahw/vgaCmap.c b/hw/xfree86/vgahw/vgaCmap.c
index dad71b93e..4720f4db8 100644
--- a/hw/xfree86/vgahw/vgaCmap.c
+++ b/hw/xfree86/vgahw/vgaCmap.c
@@ -246,7 +246,7 @@ vgaInstallColormap(pmap)
for ( i=0; i<entries; i++) ppix[i] = i;
- QueryColors( pmap, entries, ppix, prgb);
+ QueryColors(pmap, entries, ppix, prgb, serverClient);
for ( i=0; i<entries; i++) /* convert xrgbs to xColorItems */
{
diff --git a/hw/xfree86/xaa/xaaPCache.c b/hw/xfree86/xaa/xaaPCache.c
index e62f28083..598a1bec8 100644
--- a/hw/xfree86/xaa/xaaPCache.c
+++ b/hw/xfree86/xaa/xaaPCache.c
@@ -1867,7 +1867,7 @@ XAAWriteBitmapToCacheLinear(
){
ScreenPtr pScreen = pScrn->pScreen;
PixmapPtr pScreenPix, pDstPix;
- XID gcvals[2];
+ ChangeGCVal gcvals[2];
GCPtr pGC;
pScreenPix = (*pScreen->GetScreenPixmap)(pScreen);
@@ -1879,9 +1879,9 @@ XAAWriteBitmapToCacheLinear(
pScreenPix->devPrivate.ptr);
pGC = GetScratchGC(pScreenPix->drawable.depth, pScreen);
- gcvals[0] = fg;
- gcvals[1] = bg;
- dixChangeGC(NullClient, pGC, GCForeground | GCBackground, gcvals, NULL);
+ gcvals[0].val = fg;
+ gcvals[1].val = bg;
+ ChangeGC(NullClient, pGC, GCForeground | GCBackground, gcvals);
ValidateGC((DrawablePtr)pDstPix, pGC);
/* We've unwrapped already so these ops miss a sync */
diff --git a/hw/xquartz/applewm.c b/hw/xquartz/applewm.c
index 8750f5d00..53d167e5b 100644
--- a/hw/xquartz/applewm.c
+++ b/hw/xquartz/applewm.c
@@ -192,7 +192,7 @@ ProcAppleWMQueryVersion(
swapl(&rep.length, n);
}
WriteToClient(client, sizeof(xAppleWMQueryVersionReply), (char *)&rep);
- return (client->noClientException);
+ return Success;
}
@@ -383,7 +383,7 @@ ProcAppleWMDisableUpdate(
appleWMProcs->DisableUpdate();
- return (client->noClientException);
+ return Success;
}
static int
@@ -395,7 +395,7 @@ ProcAppleWMReenableUpdate(
appleWMProcs->EnableUpdate();
- return (client->noClientException);
+ return Success;
}
@@ -435,7 +435,7 @@ ProcAppleWMSetWindowMenu(
free(items);
free(shortcuts);
- return (client->noClientException);
+ return Success;
}
static int
@@ -447,7 +447,7 @@ ProcAppleWMSetWindowMenuCheck(
REQUEST_SIZE_MATCH(xAppleWMSetWindowMenuCheckReq);
X11ApplicationSetWindowMenuCheck(stuff->index);
- return (client->noClientException);
+ return Success;
}
static int
@@ -458,7 +458,7 @@ ProcAppleWMSetFrontProcess(
REQUEST_SIZE_MATCH(xAppleWMSetFrontProcessReq);
X11ApplicationSetFrontProcess();
- return (client->noClientException);
+ return Success;
}
static int
@@ -483,7 +483,7 @@ ProcAppleWMSetWindowLevel(register ClientPtr client)
return err;
}
- return (client->noClientException);
+ return Success;
}
static int
@@ -502,7 +502,7 @@ ProcAppleWMSendPSN(register ClientPtr client)
return err;
}
- return (client->noClientException);
+ return Success;
}
static int
@@ -532,7 +532,7 @@ ProcAppleWMAttachTransient(register ClientPtr client)
return err;
}
- return (client->noClientException);
+ return Success;
}
static int
@@ -545,7 +545,7 @@ ProcAppleWMSetCanQuit(
REQUEST_SIZE_MATCH(xAppleWMSetCanQuitReq);
X11ApplicationSetCanQuit(stuff->state);
- return (client->noClientException);
+ return Success;
}
@@ -581,7 +581,7 @@ ProcAppleWMFrameGetRect(
rep.h = rr.y2 - rr.y1;
WriteToClient(client, sizeof(xAppleWMFrameGetRectReply), (char *)&rep);
- return (client->noClientException);
+ return Success;
}
static int
@@ -611,7 +611,7 @@ ProcAppleWMFrameHitTest(
rep.ret = ret;
WriteToClient(client, sizeof(xAppleWMFrameHitTestReply), (char *)&rep);
- return (client->noClientException);
+ return Success;
}
static int
@@ -649,7 +649,7 @@ ProcAppleWMFrameDraw(
return errno;
}
- return (client->noClientException);
+ return Success;
}
diff --git a/hw/xquartz/pseudoramiX.c b/hw/xquartz/pseudoramiX.c
index c3154b948..5868ab129 100644
--- a/hw/xquartz/pseudoramiX.c
+++ b/hw/xquartz/pseudoramiX.c
@@ -202,7 +202,7 @@ static int ProcPseudoramiXGetState(ClientPtr client)
swaps (&rep.state, n);
}
WriteToClient (client, sizeof (xPanoramiXGetStateReply), (char *) &rep);
- return client->noClientException;
+ return Success;
}
@@ -231,7 +231,7 @@ static int ProcPseudoramiXGetScreenCount(ClientPtr client)
swaps (&rep.ScreenCount, n);
}
WriteToClient (client, sizeof(xPanoramiXGetScreenCountReply), (char *)&rep);
- return client->noClientException;
+ return Success;
}
@@ -265,7 +265,7 @@ static int ProcPseudoramiXGetScreenSize(ClientPtr client)
swaps (&rep.height, n);
}
WriteToClient (client, sizeof(xPanoramiXGetScreenSizeReply), (char *)&rep);
- return client->noClientException;
+ return Success;
}
@@ -290,7 +290,7 @@ static int ProcPseudoramiXIsActive(ClientPtr client)
swapl (&rep.state, n);
}
WriteToClient (client, sizeof (xXineramaIsActiveReply), (char *) &rep);
- return client->noClientException;
+ return Success;
}
@@ -337,7 +337,7 @@ static int ProcPseudoramiXQueryScreens(ClientPtr client)
}
}
- return client->noClientException;
+ return Success;
}
diff --git a/hw/xquartz/xpr/appledri.c b/hw/xquartz/xpr/appledri.c
index 74a4ec315..71cfb591b 100644
--- a/hw/xquartz/xpr/appledri.c
+++ b/hw/xquartz/xpr/appledri.c
@@ -128,7 +128,7 @@ ProcAppleDRIQueryVersion(
swapl(&rep.length, n);
}
WriteToClient(client, sizeof(xAppleDRIQueryVersionReply), (char *)&rep);
- return (client->noClientException);
+ return Success;
}
@@ -159,7 +159,7 @@ ProcAppleDRIQueryDirectRenderingCapable(
WriteToClient(client,
sizeof(xAppleDRIQueryDirectRenderingCapableReply), (char *)&rep);
- return (client->noClientException);
+ return Success;
}
static int
@@ -182,7 +182,7 @@ ProcAppleDRIAuthConnection(
rep.authenticated = 0;
}
WriteToClient(client, sizeof(xAppleDRIAuthConnectionReply), (char *)&rep);
- return (client->noClientException);
+ return Success;
}
static void surface_notify(
@@ -247,7 +247,7 @@ ProcAppleDRICreateSurface(
rep.uid = sid;
WriteToClient(client, sizeof(xAppleDRICreateSurfaceReply), (char *)&rep);
- return (client->noClientException);
+ return Success;
}
static int
@@ -271,7 +271,7 @@ ProcAppleDRIDestroySurface(
return BadValue;
}
- return (client->noClientException);
+ return Success;
}
static int
@@ -323,7 +323,7 @@ ProcAppleDRICreatePixmap(ClientPtr client)
WriteReplyToClient(client, sizeof(rep), &rep);
(void)WriteToClient(client, rep.stringLength, path);
- return (client->noClientException);
+ return Success;
}
static int
@@ -342,7 +342,7 @@ ProcAppleDRIDestroyPixmap(ClientPtr client)
DRIDestroyPixmap(pDrawable);
- return (client->noClientException);
+ return Success;
}
/* dispatch */
diff --git a/hw/xwin/winwindowswm.c b/hw/xwin/winwindowswm.c
index a996bc4ec..d09e98352 100755
--- a/hw/xwin/winwindowswm.c
+++ b/hw/xwin/winwindowswm.c
@@ -124,7 +124,7 @@ ProcWindowsWMQueryVersion(register ClientPtr client)
swapl(&rep.length, n);
}
WriteToClient(client, sizeof(xWindowsWMQueryVersionReply), (char *)&rep);
- return (client->noClientException);
+ return Success;
}
@@ -335,7 +335,7 @@ ProcWindowsWMDisableUpdate (register ClientPtr client)
//winDisableUpdate();
- return (client->noClientException);
+ return Success;
}
static int
@@ -345,7 +345,7 @@ ProcWindowsWMReenableUpdate (register ClientPtr client)
//winEnableUpdate();
- return (client->noClientException);
+ return Success;
}
@@ -358,7 +358,7 @@ ProcWindowsWMSetFrontProcess (register ClientPtr client)
//QuartzMessageMainThread(kWindowsSetFrontProcess, NULL, 0);
- return (client->noClientException);
+ return Success;
}
@@ -414,7 +414,7 @@ ProcWindowsWMFrameGetRect (register ClientPtr client)
#endif
WriteToClient(client, sizeof(xWindowsWMFrameGetRectReply), (char *)&rep);
- return (client->noClientException);
+ return Success;
}
@@ -507,7 +507,7 @@ ProcWindowsWMFrameDraw (register ClientPtr client)
ErrorF ("ProcWindowsWMFrameDraw - done\n");
#endif
- return (client->noClientException);
+ return Success;
}
static int
@@ -566,7 +566,7 @@ ProcWindowsWMFrameSetTitle(
ErrorF ("ProcWindowsWMFrameSetTitle - done\n");
#endif
- return (client->noClientException);
+ return Success;
}
diff --git a/include/colormap.h b/include/colormap.h
index de48ce8d8..1b1574839 100644
--- a/include/colormap.h
+++ b/include/colormap.h
@@ -135,7 +135,8 @@ extern _X_EXPORT int QueryColors(
ColormapPtr /*pmap*/,
int /*count*/,
Pixel* /*ppixIn*/,
- xrgb* /*prgbList*/);
+ xrgb* /*prgbList*/,
+ ClientPtr client);
extern _X_EXPORT int FreeClientPixels(
pointer /*pcr*/,
@@ -173,7 +174,8 @@ extern _X_EXPORT int FreeColors(
extern _X_EXPORT int StoreColors(
ColormapPtr /*pmap*/,
int /*count*/,
- xColorItem* /*defs*/);
+ xColorItem* /*defs*/,
+ ClientPtr client);
extern _X_EXPORT int IsMapInstalled(
Colormap /*map*/,
diff --git a/include/gc.h b/include/gc.h
index 3fa953d56..63eecbd66 100644
--- a/include/gc.h
+++ b/include/gc.h
@@ -93,11 +93,16 @@ typedef union {
pointer ptr;
} ChangeGCVal, *ChangeGCValPtr;
-extern _X_EXPORT int dixChangeGC(
+extern int ChangeGCXIDs(
+ ClientPtr /*client*/,
+ GCPtr /*pGC*/,
+ BITS32 /*mask*/,
+ CARD32 * /*pval*/);
+
+extern _X_EXPORT int ChangeGC(
ClientPtr /*client*/,
GCPtr /*pGC*/,
BITS32 /*mask*/,
- CARD32 * /*pval*/,
ChangeGCValPtr /*pCGCV*/);
extern _X_EXPORT GCPtr CreateGC(
diff --git a/include/gcstruct.h b/include/gcstruct.h
index 8d9b05575..b9fc5cace 100644
--- a/include/gcstruct.h
+++ b/include/gcstruct.h
@@ -59,6 +59,8 @@ SOFTWARE.
#include "privates.h"
#include <X11/Xprotostr.h>
+#define GCAllBits ((1 << (GCLastBit + 1)) - 1)
+
/*
* functions which modify the state of the GC
*/
diff --git a/mi/miarc.c b/mi/miarc.c
index 36b71bf80..7e8ec1f50 100644
--- a/mi/miarc.c
+++ b/mi/miarc.c
@@ -213,16 +213,6 @@ typedef struct _miPolyArc {
miArcJoinPtr joins;
} miPolyArcRec, *miPolyArcPtr;
-#define GCValsFunction 0
-#define GCValsForeground 1
-#define GCValsBackground 2
-#define GCValsLineWidth 3
-#define GCValsCapStyle 4
-#define GCValsJoinStyle 5
-#define GCValsMask (GCFunction | GCForeground | GCBackground | \
- GCLineWidth | GCCapStyle | GCJoinStyle)
-static CARD32 gcvals[6];
-
static void fillSpans(DrawablePtr pDrawable, GCPtr pGC);
static void newFinalSpan(int y, int xmin, int xmax);
static void drawArc(xArc *tarc, int l, int a0, int a1, miArcFacePtr right,
@@ -1045,13 +1035,18 @@ miPolyArc(DrawablePtr pDraw, GCPtr pGC, int narcs, xArc *parcs)
pGCTo = GetScratchGC(1, pDraw->pScreen);
if (!pGCTo)
return;
- gcvals[GCValsFunction] = GXcopy;
- gcvals[GCValsForeground] = 1;
- gcvals[GCValsBackground] = 0;
- gcvals[GCValsLineWidth] = pGC->lineWidth;
- gcvals[GCValsCapStyle] = pGC->capStyle;
- gcvals[GCValsJoinStyle] = pGC->joinStyle;
- dixChangeGC(NullClient, pGCTo, GCValsMask, gcvals, NULL);
+ {
+ ChangeGCVal gcvals[6];
+ gcvals[0].val = GXcopy;
+ gcvals[1].val = 1;
+ gcvals[2].val = 0;
+ gcvals[3].val = pGC->lineWidth;
+ gcvals[4].val = pGC->capStyle;
+ gcvals[5].val = pGC->joinStyle;
+ ChangeGC(NullClient, pGCTo, GCFunction |
+ GCForeground | GCBackground | GCLineWidth |
+ GCCapStyle | GCJoinStyle, gcvals);
+ }
/* allocate a 1 bit deep pixmap of the appropriate size, and
* validate it */
@@ -1090,11 +1085,14 @@ miPolyArc(DrawablePtr pDraw, GCPtr pGC, int narcs, xArc *parcs)
iphase >= 0;
iphase--)
{
+ ChangeGCVal gcval;
if (iphase == 1) {
- dixChangeGC (NullClient, pGC, GCForeground, &bg, NULL);
+ gcval.val = bg;
+ ChangeGC (NullClient, pGC, GCForeground, &gcval);
ValidateGC (pDraw, pGC);
} else if (pGC->lineStyle == LineDoubleDash) {
- dixChangeGC (NullClient, pGC, GCForeground, &fg, NULL);
+ gcval.val = fg;
+ ChangeGC (NullClient, pGC, GCForeground, &gcval);
ValidateGC (pDraw, pGC);
}
for (i = 0; i < polyArcs[iphase].narcs; i++) {
diff --git a/mi/mibitblt.c b/mi/mibitblt.c
index f02c04fd4..9c6e03d53 100644
--- a/mi/mibitblt.c
+++ b/mi/mibitblt.c
@@ -426,7 +426,7 @@ miOpqStipDrawable(DrawablePtr pDraw, GCPtr pGC, RegionPtr prgnSrc,
}
/* First set the whole pixmap to 0 */
gcv[0].val = 0;
- dixChangeGC(NullClient, pGCT, GCBackground, NULL, gcv);
+ ChangeGC(NullClient, pGCT, GCBackground, gcv);
ValidateGC((DrawablePtr)pPixmap, pGCT);
miClearDrawable((DrawablePtr)pPixmap, pGCT);
ppt = pptFirst = malloc(h * sizeof(DDXPointRec));
@@ -477,9 +477,9 @@ miOpqStipDrawable(DrawablePtr pDraw, GCPtr pGC, RegionPtr prgnSrc,
gcv[2].val = dstx - srcx;
gcv[3].val = dsty;
- dixChangeGC(NullClient, pGC,
+ ChangeGC(NullClient, pGC,
GCFillStyle | GCStipple | GCTileStipXOrigin | GCTileStipYOrigin,
- NULL, gcv);
+ gcv);
ValidateGC(pDraw, pGC);
/* Fill the drawable with the stipple. This will draw the
@@ -495,7 +495,7 @@ miOpqStipDrawable(DrawablePtr pDraw, GCPtr pGC, RegionPtr prgnSrc,
/* Invert the tiling pixmap. This sets 0s for 1s and 1s for 0s, only
* within the clipping region, the part outside is still all 0s */
gcv[0].val = GXinvert;
- dixChangeGC(NullClient, pGCT, GCFunction, NULL, gcv);
+ ChangeGC(NullClient, pGCT, GCFunction, gcv);
ValidateGC((DrawablePtr)pPixmap, pGCT);
(*pGCT->ops->CopyArea)((DrawablePtr)pPixmap, (DrawablePtr)pPixmap,
pGCT, 0, 0, w + srcx, h, 0, 0);
@@ -507,8 +507,7 @@ miOpqStipDrawable(DrawablePtr pDraw, GCPtr pGC, RegionPtr prgnSrc,
gcv[0].val = pGC->bgPixel;
gcv[1].val = oldfg;
gcv[2].ptr = pPixmap;
- dixChangeGC(NullClient, pGC, GCForeground | GCBackground | GCStipple,
- NULL, gcv);
+ ChangeGC(NullClient, pGC, GCForeground | GCBackground | GCStipple, gcv);
ValidateGC(pDraw, pGC);
/* PolyFillRect might have bashed the rectangle */
rect.x = dstx;
@@ -526,9 +525,9 @@ miOpqStipDrawable(DrawablePtr pDraw, GCPtr pGC, RegionPtr prgnSrc,
gcv[3].ptr = pStipple;
gcv[4].val = oldOrg.x;
gcv[5].val = oldOrg.y;
- dixChangeGC(NullClient, pGC,
+ ChangeGC(NullClient, pGC,
GCForeground | GCBackground | GCFillStyle | GCStipple |
- GCTileStipXOrigin | GCTileStipYOrigin, NULL, gcv);
+ GCTileStipXOrigin | GCTileStipYOrigin, gcv);
ValidateGC(pDraw, pGC);
/* put what we hope is a smaller clip region back in the scratch gc */
@@ -646,7 +645,6 @@ miGetImage( DrawablePtr pDraw, int sx, int sy, int w, int h,
unsigned char depth;
int i, linelength, width, srcx, srcy;
DDXPointRec pt = {0, 0};
- XID gcv[2];
PixmapPtr pPixmap = NULL;
GCPtr pGC = NULL;
@@ -655,6 +653,7 @@ miGetImage( DrawablePtr pDraw, int sx, int sy, int w, int h,
{
if ( (((1<<depth)-1)&planeMask) != (1<<depth)-1 )
{
+ ChangeGCVal gcv;
xPoint pt;
pGC = GetScratchGC(depth, pDraw->pScreen);
@@ -678,8 +677,8 @@ miGetImage( DrawablePtr pDraw, int sx, int sy, int w, int h,
TRUE);
/* alu is already GXCopy */
- gcv[0] = (XID)planeMask;
- dixChangeGC(NullClient, pGC, GCPlaneMask, gcv, NULL);
+ gcv.val = (XID)planeMask;
+ ChangeGC(NullClient, pGC, GCPlaneMask, &gcv);
ValidateGC((DrawablePtr)pPixmap, pGC);
}
@@ -747,7 +746,7 @@ miPutImage( DrawablePtr pDraw, GCPtr pGC, int depth,
RegionPtr prgnSrc;
BoxRec box;
unsigned long oldFg, oldBg;
- XID gcv[3];
+ ChangeGCVal gcv[3];
unsigned long oldPlanemask;
unsigned long i;
long bytesPer;
@@ -774,26 +773,26 @@ miPutImage( DrawablePtr pDraw, GCPtr pGC, int depth,
oldPlanemask = pGC->planemask;
oldFg = pGC->fgPixel;
oldBg = pGC->bgPixel;
- gcv[0] = (XID)~0;
- gcv[1] = (XID)0;
- dixChangeGC(NullClient, pGC, GCForeground | GCBackground, gcv, NULL);
+ gcv[0].val = (XID)~0;
+ gcv[1].val = (XID)0;
+ ChangeGC(NullClient, pGC, GCForeground | GCBackground, gcv);
bytesPer = (long)h * BitmapBytePad(w + leftPad);
for (i = 1 << (depth-1); i != 0; i >>= 1, pImage += bytesPer)
{
if (i & oldPlanemask)
{
- gcv[0] = (XID)i;
- dixChangeGC(NullClient, pGC, GCPlaneMask, gcv, NULL);
+ gcv[0].val = (XID)i;
+ ChangeGC(NullClient, pGC, GCPlaneMask, gcv);
ValidateGC(pDraw, pGC);
(*pGC->ops->PutImage)(pDraw, pGC, 1, x, y, w, h, leftPad,
XYBitmap, (char *)pImage);
}
}
- gcv[0] = (XID)oldPlanemask;
- gcv[1] = (XID)oldFg;
- gcv[2] = (XID)oldBg;
- dixChangeGC(NullClient, pGC, GCPlaneMask | GCForeground | GCBackground, gcv, NULL);
+ gcv[0].val = (XID)oldPlanemask;
+ gcv[1].val = (XID)oldFg;
+ gcv[2].val = (XID)oldBg;
+ ChangeGC(NullClient, pGC, GCPlaneMask | GCForeground | GCBackground, gcv);
ValidateGC(pDraw, pGC);
break;
diff --git a/mi/midispcur.c b/mi/midispcur.c
index 11547dbd9..1acc46933 100644
--- a/mi/midispcur.c
+++ b/mi/midispcur.c
@@ -222,7 +222,7 @@ miDCRealize (ScreenPtr pScreen, CursorPtr pCursor)
{
miDCCursorPtr pPriv;
GCPtr pGC;
- XID gcvals[3];
+ ChangeGCVal gcvals;
pPriv = malloc(sizeof (miDCCursorRec));
if (!pPriv)
@@ -305,22 +305,22 @@ miDCRealize (ScreenPtr pScreen, CursorPtr pCursor)
(*pGC->ops->PutImage) ((DrawablePtr)pPriv->sourceBits, pGC, 1,
0, 0, pCursor->bits->width, pCursor->bits->height,
0, XYPixmap, (char *)pCursor->bits->source);
- gcvals[0] = GXand;
- dixChangeGC (NullClient, pGC, GCFunction, gcvals, NULL);
+ gcvals.val = GXand;
+ ChangeGC (NullClient, pGC, GCFunction, &gcvals);
ValidateGC ((DrawablePtr)pPriv->sourceBits, pGC);
(*pGC->ops->PutImage) ((DrawablePtr)pPriv->sourceBits, pGC, 1,
0, 0, pCursor->bits->width, pCursor->bits->height,
0, XYPixmap, (char *)pCursor->bits->mask);
/* mask bits -- pCursor->mask & ~pCursor->source */
- gcvals[0] = GXcopy;
- dixChangeGC (NullClient, pGC, GCFunction, gcvals, NULL);
+ gcvals.val = GXcopy;
+ ChangeGC (NullClient, pGC, GCFunction, &gcvals);
ValidateGC ((DrawablePtr)pPriv->maskBits, pGC);
(*pGC->ops->PutImage) ((DrawablePtr)pPriv->maskBits, pGC, 1,
0, 0, pCursor->bits->width, pCursor->bits->height,
0, XYPixmap, (char *)pCursor->bits->mask);
- gcvals[0] = GXandInverted;
- dixChangeGC (NullClient, pGC, GCFunction, gcvals, NULL);
+ gcvals.val = GXandInverted;
+ ChangeGC (NullClient, pGC, GCFunction, &gcvals);
ValidateGC ((DrawablePtr)pPriv->maskBits, pGC);
(*pGC->ops->PutImage) ((DrawablePtr)pPriv->maskBits, pGC, 1,
0, 0, pCursor->bits->width, pCursor->bits->height,
@@ -365,13 +365,13 @@ miDCPutBits (
unsigned long source,
unsigned long mask)
{
- XID gcvals[1];
+ ChangeGCVal gcval;
int x, y;
if (sourceGC->fgPixel != source)
{
- gcvals[0] = source;
- dixChangeGC (NullClient, sourceGC, GCForeground, gcvals, NULL);
+ gcval.val = source;
+ ChangeGC (NullClient, sourceGC, GCForeground, &gcval);
}
if (sourceGC->serialNumber != pDrawable->serialNumber)
ValidateGC (pDrawable, sourceGC);
@@ -390,8 +390,8 @@ miDCPutBits (
(*sourceGC->ops->PushPixels) (sourceGC, pPriv->sourceBits, pDrawable, w, h, x, y);
if (maskGC->fgPixel != mask)
{
- gcvals[0] = mask;
- dixChangeGC (NullClient, maskGC, GCForeground, gcvals, NULL);
+ gcval.val = mask;
+ ChangeGC (NullClient, maskGC, GCForeground, &gcval);
}
if (maskGC->serialNumber != pDrawable->serialNumber)
ValidateGC (pDrawable, maskGC);
diff --git a/mi/miexpose.c b/mi/miexpose.c
index b4d489a7d..a99e53008 100644
--- a/mi/miexpose.c
+++ b/mi/miexpose.c
@@ -657,7 +657,7 @@ miPaintWindow(WindowPtr pWin, RegionPtr prgn, int what)
return;
}
- dixChangeGC (NullClient, pGC, gcmask, NULL, gcval);
+ ChangeGC (NullClient, pGC, gcmask, gcval);
ValidateGC (drawable, pGC);
numRects = REGION_NUM_RECTS(prgn);
@@ -683,17 +683,18 @@ miPaintWindow(WindowPtr pWin, RegionPtr prgn, int what)
void
miClearDrawable(DrawablePtr pDraw, GCPtr pGC)
{
- XID fg = pGC->fgPixel;
- XID bg = pGC->bgPixel;
+ ChangeGCVal fg, bg;
xRectangle rect;
+ fg.val = pGC->fgPixel;
+ bg.val = pGC->bgPixel;
rect.x = 0;
rect.y = 0;
rect.width = pDraw->width;
rect.height = pDraw->height;
- dixChangeGC(NullClient, pGC, GCForeground, &bg, NULL);
+ ChangeGC(NullClient, pGC, GCForeground, &bg);
ValidateGC(pDraw, pGC);
(*pGC->ops->PolyFillRect)(pDraw, pGC, 1, &rect);
- dixChangeGC(NullClient, pGC, GCForeground, &fg, NULL);
+ ChangeGC(NullClient, pGC, GCForeground, &fg);
ValidateGC(pDraw, pGC);
}
diff --git a/mi/miglblt.c b/mi/miglblt.c
index 22a170aa0..13efb0ced 100644
--- a/mi/miglblt.c
+++ b/mi/miglblt.c
@@ -107,7 +107,7 @@ miPolyGlyphBlt(
int nbyGlyphWidth; /* bytes per scanline of glyph */
int nbyPadGlyph; /* server padded line of glyph */
- XID gcvals[3];
+ ChangeGCVal gcvals[3];
if (pGC->miTranslate)
{
@@ -134,11 +134,11 @@ miPolyGlyphBlt(
return;
}
- gcvals[0] = GXcopy;
- gcvals[1] = 1;
- gcvals[2] = 0;
+ gcvals[0].val = GXcopy;
+ gcvals[1].val = 1;
+ gcvals[2].val = 0;
- dixChangeGC(NullClient, pGCtmp, GCFunction|GCForeground|GCBackground, gcvals, NULL);
+ ChangeGC(NullClient, pGCtmp, GCFunction|GCForeground|GCBackground, gcvals);
nbyLine = BitmapBytePad(width);
pbits = malloc(height*nbyLine);
@@ -209,7 +209,7 @@ miImageGlyphBlt(
)
{
ExtentInfoRec info; /* used by QueryGlyphExtents() */
- XID gcvals[3];
+ ChangeGCVal gcvals[3];
int oldAlu, oldFS;
unsigned long oldFG;
xRectangle backrect;
@@ -234,25 +234,25 @@ miImageGlyphBlt(
oldFS = pGC->fillStyle;
/* fill in the background */
- gcvals[0] = GXcopy;
- gcvals[1] = pGC->bgPixel;
- gcvals[2] = FillSolid;
- dixChangeGC(NullClient, pGC, GCFunction|GCForeground|GCFillStyle, gcvals, NULL);
+ gcvals[0].val = GXcopy;
+ gcvals[1].val = pGC->bgPixel;
+ gcvals[2].val = FillSolid;
+ ChangeGC(NullClient, pGC, GCFunction|GCForeground|GCFillStyle, gcvals);
ValidateGC(pDrawable, pGC);
(*pGC->ops->PolyFillRect)(pDrawable, pGC, 1, &backrect);
/* put down the glyphs */
- gcvals[0] = oldFG;
- dixChangeGC(NullClient, pGC, GCForeground, gcvals, NULL);
+ gcvals[0].val = oldFG;
+ ChangeGC(NullClient, pGC, GCForeground, gcvals);
ValidateGC(pDrawable, pGC);
(*pGC->ops->PolyGlyphBlt)(pDrawable, pGC, x, y, nglyph, ppci,
pglyphBase);
/* put all the toys away when done playing */
- gcvals[0] = oldAlu;
- gcvals[1] = oldFG;
- gcvals[2] = oldFS;
- dixChangeGC(NullClient, pGC, GCFunction|GCForeground|GCFillStyle, gcvals, NULL);
+ gcvals[0].val = oldAlu;
+ gcvals[1].val = oldFG;
+ gcvals[2].val = oldFS;
+ ChangeGC(NullClient, pGC, GCFunction|GCForeground|GCFillStyle, gcvals);
ValidateGC(pDrawable, pGC);
}
diff --git a/mi/mipolypnt.c b/mi/mipolypnt.c
index b54a9fdbe..3e43a523e 100644
--- a/mi/mipolypnt.c
+++ b/mi/mipolypnt.c
@@ -68,7 +68,7 @@ miPolyPoint(
int xorg;
int yorg;
int nptTmp;
- XID fsOld, fsNew;
+ ChangeGCVal fsOld, fsNew;
int *pwidthInit, *pwidth;
int i;
xPoint *ppt;
@@ -103,11 +103,11 @@ miPolyPoint(
}
}
- fsOld = pGC->fillStyle;
- fsNew = FillSolid;
+ fsOld.val = pGC->fillStyle;
+ fsNew.val = FillSolid;
if(pGC->fillStyle != FillSolid)
{
- dixChangeGC(NullClient, pGC, GCFillStyle, &fsNew, NULL);
+ ChangeGC(NullClient, pGC, GCFillStyle, &fsNew);
ValidateGC(pDrawable, pGC);
}
pwidth = pwidthInit;
@@ -115,9 +115,9 @@ miPolyPoint(
*pwidth++ = 1;
(*pGC->ops->FillSpans)(pDrawable, pGC, npt, pptInit, pwidthInit, FALSE);
- if(fsOld != FillSolid)
+ if(fsOld.val != FillSolid)
{
- dixChangeGC(NullClient, pGC, GCFillStyle, &fsOld, NULL);
+ ChangeGC(NullClient, pGC, GCFillStyle, &fsOld);
ValidateGC(pDrawable, pGC);
}
free(pwidthInit);
diff --git a/mi/miwideline.c b/mi/miwideline.c
index c54e2deb1..5f3d58215 100644
--- a/mi/miwideline.c
+++ b/mi/miwideline.c
@@ -52,6 +52,21 @@ from The Open Group.
#include "miwideline.h"
#include "mi.h"
+static Bool
+InitSpans(Spans *spans, size_t nspans)
+{
+ spans->points = malloc(nspans * sizeof (*spans->points));
+ if (!spans->points)
+ return FALSE;
+ spans->widths = malloc(nspans * sizeof (*spans->widths));
+ if (!spans->widths)
+ {
+ free(spans->points);
+ return FALSE;
+ }
+ return TRUE;
+}
+
/*
* interface data to span-merging polygon filler
*/
@@ -91,6 +106,32 @@ static void miLineArc(DrawablePtr pDraw, GCPtr pGC,
*/
static void
+fillSpans(DrawablePtr pDrawable, GCPtr pGC, unsigned long pixel, Spans *spans, SpanDataPtr spanData)
+{
+ if (!spanData)
+ {
+ ChangeGCVal oldPixel, tmpPixel;
+ oldPixel.val = pGC->fgPixel;
+ if (pixel != oldPixel.val)
+ {
+ tmpPixel.val = (XID)pixel;
+ ChangeGC (NullClient, pGC, GCForeground, &tmpPixel);
+ ValidateGC (pDrawable, pGC);
+ }
+ (*pGC->ops->FillSpans) (pDrawable, pGC, spans->count, spans->points, spans->widths, TRUE);
+ free(spans->widths);
+ free(spans->points);
+ if (pixel != oldPixel.val)
+ {
+ ChangeGC (NullClient, pGC, GCForeground, &oldPixel);
+ ValidateGC (pDrawable, pGC);
+ }
+ }
+ else
+ AppendSpanGroup (pGC, pixel, spans, spanData);
+}
+
+static void
miFillPolyHelper (DrawablePtr pDrawable, GCPtr pGC, unsigned long pixel,
SpanDataPtr spanData, int y, int overall_height,
PolyEdgePtr left, PolyEdgePtr right,
@@ -110,51 +151,14 @@ miFillPolyHelper (DrawablePtr pDrawable, GCPtr pGC, unsigned long pixel,
int left_height = 0, right_height = 0;
DDXPointPtr ppt;
- DDXPointPtr pptInit = NULL;
int *pwidth;
- int *pwidthInit = NULL;
- XID oldPixel;
int xorg;
Spans spanRec;
- left_height = 0;
- right_height = 0;
-
- if (!spanData)
- {
- pptInit = malloc(overall_height * sizeof(*ppt));
- if (!pptInit)
- return;
- pwidthInit = malloc(overall_height * sizeof(*pwidth));
- if (!pwidthInit)
- {
- free(pptInit);
- return;
- }
- ppt = pptInit;
- pwidth = pwidthInit;
- oldPixel = pGC->fgPixel;
- if (pixel != oldPixel)
- {
- XID tmpPixel = (XID)pixel;
- dixChangeGC (NullClient, pGC, GCForeground, &tmpPixel, NULL);
- ValidateGC (pDrawable, pGC);
- }
- }
- else
- {
- spanRec.points = malloc(overall_height * sizeof (*ppt));
- if (!spanRec.points)
- return;
- spanRec.widths = malloc(overall_height * sizeof (int));
- if (!spanRec.widths)
- {
- free(spanRec.points);
- return;
- }
- ppt = spanRec.points;
- pwidth = spanRec.widths;
- }
+ if (!InitSpans(&spanRec, overall_height))
+ return;
+ ppt = spanRec.points;
+ pwidth = spanRec.widths;
xorg = 0;
if (pGC->miTranslate)
@@ -226,22 +230,8 @@ miFillPolyHelper (DrawablePtr pDrawable, GCPtr pGC, unsigned long pixel,
}
}
}
- if (!spanData)
- {
- (*pGC->ops->FillSpans) (pDrawable, pGC, ppt - pptInit, pptInit, pwidthInit, TRUE);
- free(pwidthInit);
- free(pptInit);
- if (pixel != oldPixel)
- {
- dixChangeGC (NullClient, pGC, GCForeground, &oldPixel, NULL);
- ValidateGC (pDrawable, pGC);
- }
- }
- else
- {
- spanRec.count = ppt - spanRec.points;
- AppendSpanGroup (pGC, pixel, &spanRec, spanData);
- }
+ spanRec.count = ppt - spanRec.points;
+ fillSpans (pDrawable, pGC, pixel, &spanRec, spanData);
}
static void
@@ -257,7 +247,7 @@ miFillRectPolyHelper (
{
DDXPointPtr ppt;
int *pwidth;
- XID oldPixel;
+ ChangeGCVal oldPixel, tmpPixel;
Spans spanRec;
xRectangle rect;
@@ -267,31 +257,24 @@ miFillRectPolyHelper (
rect.y = y;
rect.width = w;
rect.height = h;
- oldPixel = pGC->fgPixel;
- if (pixel != oldPixel)
+ oldPixel.val = pGC->fgPixel;
+ if (pixel != oldPixel.val)
{
- XID tmpPixel = (XID)pixel;
- dixChangeGC (NullClient, pGC, GCForeground, &tmpPixel, NULL);
+ tmpPixel.val = (XID)pixel;
+ ChangeGC (NullClient, pGC, GCForeground, &tmpPixel);
ValidateGC (pDrawable, pGC);
}
(*pGC->ops->PolyFillRect) (pDrawable, pGC, 1, &rect);
- if (pixel != oldPixel)
+ if (pixel != oldPixel.val)
{
- dixChangeGC (NullClient, pGC, GCForeground, &oldPixel, NULL);
+ ChangeGC (NullClient, pGC, GCForeground, &oldPixel);
ValidateGC (pDrawable, pGC);
}
}
else
{
- spanRec.points = malloc(h * sizeof (*ppt));
- if (!spanRec.points)
+ if (!InitSpans(&spanRec, h))
return;
- spanRec.widths = malloc(h * sizeof (int));
- if (!spanRec.widths)
- {
- free(spanRec.points);
- return;
- }
ppt = spanRec.points;
pwidth = spanRec.widths;
@@ -1058,10 +1041,7 @@ miLineArc (
double yorg,
Bool isInt)
{
- DDXPointPtr points;
- int *widths;
int xorgi = 0, yorgi = 0;
- XID oldPixel;
Spans spanRec;
int n;
PolyEdgeRec edge1, edge2;
@@ -1105,62 +1085,16 @@ miLineArc (
}
isInt = FALSE;
}
- if (!spanData)
- {
- points = malloc(sizeof(DDXPointRec) * pGC->lineWidth);
- if (!points)
- return;
- widths = malloc(sizeof(int) * pGC->lineWidth);
- if (!widths)
- {
- free(points);
- return;
- }
- oldPixel = pGC->fgPixel;
- if (pixel != oldPixel)
- {
- XID tmpPixel = (XID)pixel;
- dixChangeGC(NullClient, pGC, GCForeground, &tmpPixel, NULL);
- ValidateGC (pDraw, pGC);
- }
- }
- else
- {
- points = malloc(pGC->lineWidth * sizeof (DDXPointRec));
- if (!points)
- return;
- widths = malloc(pGC->lineWidth * sizeof (int));
- if (!widths)
- {
- free(points);
- return;
- }
- spanRec.points = points;
- spanRec.widths = widths;
- }
+ if (!InitSpans(&spanRec, pGC->lineWidth))
+ return;
if (isInt)
- n = miLineArcI(pDraw, pGC, xorgi, yorgi, points, widths);
+ n = miLineArcI(pDraw, pGC, xorgi, yorgi, spanRec.points, spanRec.widths);
else
- n = miLineArcD(pDraw, pGC, xorg, yorg, points, widths,
+ n = miLineArcD(pDraw, pGC, xorg, yorg, spanRec.points, spanRec.widths,
&edge1, edgey1, edgeleft1,
&edge2, edgey2, edgeleft2);
-
- if (!spanData)
- {
- (*pGC->ops->FillSpans)(pDraw, pGC, n, points, widths, TRUE);
- free(widths);
- free(points);
- if (pixel != oldPixel)
- {
- dixChangeGC(NullClient, pGC, GCForeground, &oldPixel, NULL);
- ValidateGC (pDraw, pGC);
- }
- }
- else
- {
- spanRec.count = n;
- AppendSpanGroup (pGC, pixel, &spanRec, spanData);
- }
+ spanRec.count = n;
+ fillSpans (pDraw, pGC, pixel, &spanRec, spanData);
}
static void
@@ -1565,20 +1499,19 @@ miCleanupSpanData (DrawablePtr pDrawable, GCPtr pGC, SpanDataPtr spanData)
{
if (pGC->lineStyle == LineDoubleDash)
{
- XID oldPixel, pixel;
-
- pixel = pGC->bgPixel;
- oldPixel = pGC->fgPixel;
- if (pixel != oldPixel)
+ ChangeGCVal oldPixel, pixel;
+ pixel.val = pGC->bgPixel;
+ oldPixel.val = pGC->fgPixel;
+ if (pixel.val != oldPixel.val)
{
- dixChangeGC (NullClient, pGC, GCForeground, &pixel, NULL);
+ ChangeGC (NullClient, pGC, GCForeground, &pixel);
ValidateGC (pDrawable, pGC);
}
miFillUniqueSpanGroup (pDrawable, pGC, &spanData->bgGroup);
miFreeSpanGroup (&spanData->bgGroup);
- if (pixel != oldPixel)
+ if (pixel.val != oldPixel.val)
{
- dixChangeGC (NullClient, pGC, GCForeground, &oldPixel, NULL);
+ ChangeGC (NullClient, pGC, GCForeground, &oldPixel);
ValidateGC (pDrawable, pGC);
}
}
diff --git a/mi/miwideline.h b/mi/miwideline.h
index 2ff36ed6b..e08aa6833 100644
--- a/mi/miwideline.h
+++ b/mi/miwideline.h
@@ -78,13 +78,17 @@ typedef struct _LineFace {
#define MILINESETPIXEL(pDrawable, pGC, pixel, oldPixel) { \
oldPixel = pGC->fgPixel; \
if (pixel != oldPixel) { \
- dixChangeGC (NullClient, pGC, GCForeground, (XID *) &pixel, NULL); \
+ ChangeGCVal gcval; \
+ gcval.val = pixel; \
+ ChangeGC (NullClient, pGC, GCForeground, &gcval); \
ValidateGC (pDrawable, pGC); \
} \
}
#define MILINERESETPIXEL(pDrawable, pGC, pixel, oldPixel) { \
if (pixel != oldPixel) { \
- dixChangeGC (NullClient, pGC, GCForeground, (XID *) &oldPixel, NULL); \
+ ChangeGCVal gcval; \
+ gcval.val = oldPixel; \
+ ChangeGC (NullClient, pGC, GCForeground, &gcval); \
ValidateGC (pDrawable, pGC); \
} \
}
diff --git a/mi/mizerarc.c b/mi/mizerarc.c
index feaa3cb77..5adf3dd09 100644
--- a/mi/mizerarc.c
+++ b/mi/mizerarc.c
@@ -803,7 +803,9 @@ miZeroPolyArc(DrawablePtr pDraw, GCPtr pGC, int narcs, xArc *parcs)
if ((pGC->fillStyle == FillSolid) ||
(pGC->fillStyle == FillStippled))
{
- dixChangeGC(NullClient, pGC, GCForeground, (XID *)&pGC->bgPixel, NULL);
+ ChangeGCVal gcval;
+ gcval.val = pGC->bgPixel;
+ ChangeGC(NullClient, pGC, GCForeground, &gcval);
ValidateGC(pDraw, pGC);
}
pts = &points[numPts >> 1];
@@ -831,7 +833,9 @@ miZeroPolyArc(DrawablePtr pDraw, GCPtr pGC, int narcs, xArc *parcs)
if ((pGC->fillStyle == FillSolid) ||
(pGC->fillStyle == FillStippled))
{
- dixChangeGC(NullClient, pGC, GCForeground, &fgPixel, NULL);
+ ChangeGCVal gcval;
+ gcval.val = fgPixel;
+ ChangeGC(NullClient, pGC, GCForeground, &gcval);
ValidateGC(pDraw, pGC);
}
}
diff --git a/miext/cw/cw.c b/miext/cw/cw.c
index 1959c8b73..2d8fd12cf 100644
--- a/miext/cw/cw.c
+++ b/miext/cw/cw.c
@@ -129,7 +129,7 @@ cwCreateBackingGC(GCPtr pGC, DrawablePtr pDrawable)
return FALSE;
pPriv->serialNumber = 0;
- pPriv->stateChanges = (1 << (GCLastBit + 1)) - 1;
+ pPriv->stateChanges = GCAllBits;
return TRUE;
}
@@ -188,7 +188,7 @@ cwValidateGC(GCPtr pGC, unsigned long stateChanges, DrawablePtr pDrawable)
if (pDrawable->serialNumber != pPriv->serialNumber ||
(pPriv->stateChanges & (GCClipXOrigin|GCClipYOrigin|GCClipMask)))
{
- XID vals[2];
+ ChangeGCVal vals[2];
RegionPtr pCompositeClip;
pCompositeClip = REGION_CREATE (pScreen, NULL, 0);
@@ -202,10 +202,10 @@ cwValidateGC(GCPtr pGC, unsigned long stateChanges, DrawablePtr pDrawable)
(*pBackingGC->funcs->ChangeClip) (pBackingGC, CT_REGION,
(pointer) pCompositeClip, 0);
- vals[0] = x_off - pDrawable->x;
- vals[1] = y_off - pDrawable->y;
- dixChangeGC(NullClient, pBackingGC,
- (GCClipXOrigin | GCClipYOrigin), vals, NULL);
+ vals[0].val = x_off - pDrawable->x;
+ vals[1].val = y_off - pDrawable->y;
+ ChangeGC(NullClient, pBackingGC,
+ (GCClipXOrigin | GCClipYOrigin), vals);
pPriv->serialNumber = pDrawable->serialNumber;
/*
@@ -223,11 +223,11 @@ cwValidateGC(GCPtr pGC, unsigned long stateChanges, DrawablePtr pDrawable)
if ((pGC->patOrg.x + x_off) != pBackingGC->patOrg.x ||
(pGC->patOrg.y + y_off) != pBackingGC->patOrg.y)
{
- XID vals[2];
- vals[0] = pGC->patOrg.x + x_off;
- vals[1] = pGC->patOrg.y + y_off;
- dixChangeGC(NullClient, pBackingGC,
- (GCTileStipXOrigin | GCTileStipYOrigin), vals, NULL);
+ ChangeGCVal vals[2];
+ vals[0].val = pGC->patOrg.x + x_off;
+ vals[1].val = pGC->patOrg.y + y_off;
+ ChangeGC(NullClient, pBackingGC,
+ (GCTileStipXOrigin | GCTileStipYOrigin), vals);
}
ValidateGC(pBackingDrawable, pBackingGC);
diff --git a/randr/rrcrtc.c b/randr/rrcrtc.c
index f2b30ebaf..854353533 100644
--- a/randr/rrcrtc.c
+++ b/randr/rrcrtc.c
@@ -752,7 +752,7 @@ ProcRRGetCrtcInfo (ClientPtr client)
free(extra);
}
- return client->noClientException;
+ return Success;
}
int
@@ -997,7 +997,7 @@ sendReply:
}
WriteToClient(client, sizeof(xRRSetCrtcConfigReply), (char *)&rep);
- return client->noClientException;
+ return Success;
}
int
@@ -1066,7 +1066,7 @@ ProcRRGetPanning (ClientPtr client)
swaps(&rep.border_bottom, n);
}
WriteToClient(client, sizeof(xRRGetPanningReply), (char *)&rep);
- return client->noClientException;
+ return Success;
}
int
@@ -1145,7 +1145,7 @@ sendReply:
swaps(&rep.newTimestamp, n);
}
WriteToClient(client, sizeof(xRRSetPanningReply), (char *)&rep);
- return client->noClientException;
+ return Success;
}
int
@@ -1173,7 +1173,7 @@ ProcRRGetCrtcGammaSize (ClientPtr client)
swaps (&reply.size, n);
}
WriteToClient (client, sizeof (xRRGetCrtcGammaSizeReply), (char *) &reply);
- return client->noClientException;
+ return Success;
}
int
@@ -1218,7 +1218,7 @@ ProcRRGetCrtcGamma (ClientPtr client)
WriteSwappedDataToClient (client, len, extra);
free(extra);
}
- return client->noClientException;
+ return Success;
}
int
@@ -1383,5 +1383,5 @@ ProcRRGetCrtcTransform (ClientPtr client)
}
WriteToClient (client, sizeof (xRRGetCrtcTransformReply) + nextra, (char *) reply);
free(reply);
- return client->noClientException;
+ return Success;
}
diff --git a/randr/rrdispatch.c b/randr/rrdispatch.c
index ad1439d78..ebfda5717 100644
--- a/randr/rrdispatch.c
+++ b/randr/rrdispatch.c
@@ -65,7 +65,7 @@ ProcRRQueryVersion (ClientPtr client)
swapl(&rep.minorVersion, n);
}
WriteToClient(client, sizeof(xRRQueryVersionReply), (char *)&rep);
- return (client->noClientException);
+ return Success;
}
static int
diff --git a/randr/rrmode.c b/randr/rrmode.c
index 01511e2fd..e73d1acd8 100644
--- a/randr/rrmode.c
+++ b/randr/rrmode.c
@@ -320,7 +320,7 @@ ProcRRCreateMode (ClientPtr client)
WriteToClient(client, sizeof(xRRCreateModeReply), (char *)&rep);
/* Drop out reference to this mode */
RRModeDestroy (mode);
- return client->noClientException;
+ return Success;
}
int
diff --git a/randr/rroutput.c b/randr/rroutput.c
index b1a5dbb6e..e9ab2b904 100644
--- a/randr/rroutput.c
+++ b/randr/rroutput.c
@@ -527,7 +527,7 @@ ProcRRGetOutputInfo (ClientPtr client)
free(extra);
}
- return client->noClientException;
+ return Success;
}
static void
@@ -581,7 +581,7 @@ ProcRRSetOutputPrimary(ClientPtr client)
pScrPriv = rrGetScrPriv(pWin->drawable.pScreen);
RRSetPrimaryOutput(pWin->drawable.pScreen, pScrPriv, output);
- return client->noClientException;
+ return Success;
}
int
@@ -617,5 +617,5 @@ ProcRRGetOutputPrimary(ClientPtr client)
WriteToClient(client, sizeof(xRRGetOutputPrimaryReply), &rep);
- return client->noClientException;
+ return Success;
}
diff --git a/randr/rrproperty.c b/randr/rrproperty.c
index 5fc04a9ea..ff0bca014 100644
--- a/randr/rrproperty.c
+++ b/randr/rrproperty.c
@@ -447,7 +447,7 @@ ProcRRListOutputProperties (ClientPtr client)
WriteSwappedDataToClient(client, numProps * sizeof(Atom), pAtoms);
free(pAtoms);
}
- return(client->noClientException);
+ return Success;
}
int
@@ -493,7 +493,7 @@ ProcRRQueryOutputProperty (ClientPtr client)
extra);
free(extra);
}
- return(client->noClientException);
+ return Success;
}
int
@@ -566,7 +566,7 @@ ProcRRChangeOutputProperty (ClientPtr client)
if (err != Success)
return err;
else
- return client->noClientException;
+ return Success;
}
int
@@ -587,7 +587,7 @@ ProcRRDeleteOutputProperty (ClientPtr client)
RRDeleteOutputProperty(output, stuff->property);
- return client->noClientException;
+ return Success;
}
int
@@ -646,7 +646,7 @@ ProcRRGetOutputProperty (ClientPtr client)
swapl(&reply.nItems, n);
}
WriteToClient(client, sizeof(xRRGetOutputPropertyReply), &reply);
- return(client->noClientException);
+ return Success;
}
if (prop->immutable && stuff->delete)
@@ -678,7 +678,7 @@ ProcRRGetOutputProperty (ClientPtr client)
swapl(&reply.nItems, n);
}
WriteToClient(client, sizeof(xRRGetOutputPropertyReply), &reply);
- return(client->noClientException);
+ return Success;
}
/*
@@ -753,6 +753,6 @@ ProcRRGetOutputProperty (ClientPtr client)
*prev = prop->next;
RRDestroyOutputProperty (prop);
}
- return(client->noClientException);
+ return Success;
}
diff --git a/randr/rrscreen.c b/randr/rrscreen.c
index c372d4669..051d51410 100644
--- a/randr/rrscreen.c
+++ b/randr/rrscreen.c
@@ -244,7 +244,7 @@ ProcRRGetScreenSizeRange (ClientPtr client)
swaps(&rep.maxHeight, n);
}
WriteToClient(client, sizeof(xRRGetScreenSizeRangeReply), (char *)&rep);
- return (client->noClientException);
+ return Success;
}
int
@@ -470,7 +470,7 @@ rrGetScreenResources(ClientPtr client, Bool query)
WriteToClient (client, extraLen, (char *) extra);
free(extra);
}
- return client->noClientException;
+ return Success;
}
int
@@ -740,7 +740,7 @@ ProcRRGetScreenInfo (ClientPtr client)
WriteToClient (client, extraLen, (char *) extra);
free(extra);
}
- return (client->noClientException);
+ return Success;
}
int
@@ -975,7 +975,7 @@ sendReply:
}
WriteToClient(client, sizeof(xRRSetScreenConfigReply), (char *)&rep);
- return (client->noClientException);
+ return Success;
}
static CARD16
diff --git a/randr/rrxinerama.c b/randr/rrxinerama.c
index 94c8e54e5..457b2b40f 100644
--- a/randr/rrxinerama.c
+++ b/randr/rrxinerama.c
@@ -105,7 +105,7 @@ ProcRRXineramaQueryVersion(ClientPtr client)
swaps(&rep.minorVersion, n);
}
WriteToClient(client, sizeof(xPanoramiXQueryVersionReply), (char *)&rep);
- return (client->noClientException);
+ return Success;
}
int
@@ -143,7 +143,7 @@ ProcRRXineramaGetState(ClientPtr client)
swapl (&rep.window, n);
}
WriteToClient(client, sizeof(xPanoramiXGetStateReply), (char *)&rep);
- return client->noClientException;
+ return Success;
}
static Bool
@@ -198,7 +198,7 @@ ProcRRXineramaGetScreenCount(ClientPtr client)
swapl(&rep.window, n);
}
WriteToClient(client, sizeof(xPanoramiXGetScreenCountReply), (char *)&rep);
- return client->noClientException;
+ return Success;
}
int
@@ -234,7 +234,7 @@ ProcRRXineramaGetScreenSize(ClientPtr client)
swapl(&rep.screen, n);
}
WriteToClient(client, sizeof(xPanoramiXGetScreenSizeReply), (char *)&rep);
- return client->noClientException;
+ return Success;
}
int
@@ -256,7 +256,7 @@ ProcRRXineramaIsActive(ClientPtr client)
swapl(&rep.state, n);
}
WriteToClient(client, sizeof(xXineramaIsActiveReply), (char *) &rep);
- return client->noClientException;
+ return Success;
}
static void
@@ -341,7 +341,7 @@ ProcRRXineramaQueryScreens(ClientPtr client)
}
}
- return client->noClientException;
+ return Success;
}
static int
diff --git a/record/record.c b/record/record.c
index 930374001..1b55d6bf0 100644
--- a/record/record.c
+++ b/record/record.c
@@ -1903,7 +1903,7 @@ ProcRecordQueryVersion(ClientPtr client)
}
(void)WriteToClient(client, sizeof(xRecordQueryVersionReply),
(char *)&rep);
- return (client->noClientException);
+ return Success;
} /* ProcRecordQueryVersion */
@@ -2347,7 +2347,7 @@ ProcRecordGetContext(ClientPtr client)
(char *)pri->pRanges);
}
}
- err = client->noClientException;
+ err = Success;
bailout:
for (i = 0; i < nRCAPs; i++)
diff --git a/render/miindex.c b/render/miindex.c
index c42a15b5e..5e2e06c35 100644
--- a/render/miindex.c
+++ b/render/miindex.c
@@ -276,7 +276,7 @@ miInitIndexed (ScreenPtr pScreen,
/*
* Build mapping from pixel value to ARGB
*/
- QueryColors (pColormap, num, pixels, rgb);
+ QueryColors (pColormap, num, pixels, rgb, serverClient);
for (i = 0; i < num; i++)
{
p = pixels[i];
diff --git a/render/mirect.c b/render/mirect.c
index 0030eff62..13d7fa602 100644
--- a/render/mirect.c
+++ b/render/mirect.c
@@ -45,7 +45,7 @@ miColorRects (PicturePtr pDst,
ScreenPtr pScreen = pDst->pDrawable->pScreen;
CARD32 pixel;
GCPtr pGC;
- CARD32 tmpval[5];
+ ChangeGCVal tmpval[5];
RegionPtr pClip;
unsigned long mask;
@@ -54,14 +54,14 @@ miColorRects (PicturePtr pDst,
pGC = GetScratchGC (pDst->pDrawable->depth, pScreen);
if (!pGC)
return;
- tmpval[0] = GXcopy;
- tmpval[1] = pixel;
- tmpval[2] = pDst->subWindowMode;
+ tmpval[0].val = GXcopy;
+ tmpval[1].val = pixel;
+ tmpval[2].val = pDst->subWindowMode;
mask = GCFunction | GCForeground | GCSubwindowMode;
if (pClipPict->clientClipType == CT_REGION)
{
- tmpval[3] = pDst->clipOrigin.x - xoff;
- tmpval[4] = pDst->clipOrigin.y - yoff;
+ tmpval[3].val = pDst->clipOrigin.x - xoff;
+ tmpval[4].val = pDst->clipOrigin.y - yoff;
mask |= GCClipXOrigin|GCClipYOrigin;
pClip = REGION_CREATE (pScreen, NULL, 1);
@@ -70,7 +70,7 @@ miColorRects (PicturePtr pDst,
(*pGC->funcs->ChangeClip) (pGC, CT_REGION, pClip, 0);
}
- dixChangeGC (NullClient, pGC, mask, tmpval, NULL);
+ ChangeGC (NullClient, pGC, mask, tmpval);
ValidateGC (pDst->pDrawable, pGC);
if (xoff || yoff)
{
@@ -129,7 +129,8 @@ miCompositeRects (CARD8 op,
int error;
Pixel pixel;
GCPtr pGC;
- CARD32 tmpval[2];
+ ChangeGCVal gcvals[2];
+ XID tmpval[1];
rgbaFormat = PictureMatchFormat (pScreen, 32, PICT_a8r8g8b8);
if (!rgbaFormat)
@@ -145,10 +146,10 @@ miCompositeRects (CARD8 op,
pGC = GetScratchGC (rgbaFormat->depth, pScreen);
if (!pGC)
goto bail3;
- tmpval[0] = GXcopy;
- tmpval[1] = pixel;
+ gcvals[0].val = GXcopy;
+ gcvals[1].val = pixel;
- dixChangeGC (NullClient, pGC, GCFunction | GCForeground, tmpval, NULL);
+ ChangeGC (NullClient, pGC, GCFunction | GCForeground, gcvals);
ValidateGC (&pPixmap->drawable, pGC);
one.x = 0;
one.y = 0;
diff --git a/render/render.c b/render/render.c
index c9d3e8e8c..bba1ce1e6 100644
--- a/render/render.c
+++ b/render/render.c
@@ -290,7 +290,7 @@ ProcRenderQueryVersion (ClientPtr client)
swapl(&rep.minorVersion, n);
}
WriteToClient(client, sizeof(xRenderQueryVersionReply), (char *)&rep);
- return (client->noClientException);
+ return Success;
}
static VisualPtr
@@ -513,7 +513,7 @@ ProcRenderQueryPictFormats (ClientPtr client)
}
WriteToClient(client, rlength, (char *) reply);
free(reply);
- return client->noClientException;
+ return Success;
}
static int
@@ -572,7 +572,7 @@ ProcRenderQueryPictIndexValues (ClientPtr client)
WriteToClient(client, rlength, (char *) reply);
free(reply);
- return (client->noClientException);
+ return Success;
}
static int
@@ -647,7 +647,6 @@ ProcRenderSetPictureClipRectangles (ClientPtr client)
REQUEST(xRenderSetPictureClipRectanglesReq);
PicturePtr pPicture;
int nr;
- int result;
REQUEST_AT_LEAST_SIZE(xRenderSetPictureClipRectanglesReq);
VERIFY_PICTURE (pPicture, stuff->picture, client, DixSetAttrAccess);
@@ -658,13 +657,9 @@ ProcRenderSetPictureClipRectangles (ClientPtr client)
if (nr & 4)
return BadLength;
nr >>= 3;
- result = SetPictureClipRects (pPicture,
+ return SetPictureClipRects (pPicture,
stuff->xOrigin, stuff->yOrigin,
nr, (xRectangle *) &stuff[1]);
- if (client->noClientException != Success)
- return(client->noClientException);
- else
- return(result);
}
static int
@@ -677,7 +672,7 @@ ProcRenderFreePicture (ClientPtr client)
VERIFY_PICTURE (pPicture, stuff->picture, client, DixDestroyAccess);
FreeResource (stuff->picture, RT_NONE);
- return(client->noClientException);
+ return Success;
}
static Bool
@@ -772,7 +767,7 @@ ProcRenderTrapezoids (ClientPtr client)
CompositeTrapezoids (stuff->op, pSrc, pDst, pFormat,
stuff->xSrc, stuff->ySrc,
ntraps, (xTrapezoid *) &stuff[1]);
- return client->noClientException;
+ return Success;
}
static int
@@ -812,7 +807,7 @@ ProcRenderTriangles (ClientPtr client)
CompositeTriangles (stuff->op, pSrc, pDst, pFormat,
stuff->xSrc, stuff->ySrc,
ntris, (xTriangle *) &stuff[1]);
- return client->noClientException;
+ return Success;
}
static int
@@ -852,7 +847,7 @@ ProcRenderTriStrip (ClientPtr client)
CompositeTriStrip (stuff->op, pSrc, pDst, pFormat,
stuff->xSrc, stuff->ySrc,
npoints, (xPointFixed *) &stuff[1]);
- return client->noClientException;
+ return Success;
}
static int
@@ -892,7 +887,7 @@ ProcRenderTriFan (ClientPtr client)
CompositeTriFan (stuff->op, pSrc, pDst, pFormat,
stuff->xSrc, stuff->ySrc,
npoints, (xPointFixed *) &stuff[1]);
- return client->noClientException;
+ return Success;
}
static int
@@ -984,7 +979,7 @@ ProcRenderReferenceGlyphSet (ClientPtr client)
glyphSet->refcnt++;
if (!AddResource (stuff->gsid, GlyphSetType, (pointer)glyphSet))
return BadAlloc;
- return client->noClientException;
+ return Success;
}
#define NLOCALDELTA 64
@@ -1006,7 +1001,7 @@ ProcRenderFreeGlyphSet (ClientPtr client)
return (rc == BadValue) ? RenderErrBase + BadGlyphSet : rc;
}
FreeResource (stuff->glyphset, RT_NONE);
- return client->noClientException;
+ return Success;
}
typedef struct _GlyphNew {
@@ -1201,7 +1196,7 @@ ProcRenderAddGlyphs (ClientPtr client)
if (glyphsBase != glyphsLocal)
free(glyphsBase);
- return client->noClientException;
+ return Success;
bail:
if (pSrc)
FreePicture ((pointer) pSrc, 0);
@@ -1249,7 +1244,7 @@ ProcRenderFreeGlyphs (ClientPtr client)
return RenderErrBase + BadGlyph;
}
}
- return client->noClientException;
+ return Success;
}
static int
@@ -1426,7 +1421,7 @@ ProcRenderCompositeGlyphs (ClientPtr client)
if (listsBase != listsLocal)
free(listsBase);
- return client->noClientException;
+ return Success;
}
static int
@@ -1457,7 +1452,7 @@ ProcRenderFillRectangles (ClientPtr client)
things,
(xRectangle *) &stuff[1]);
- return client->noClientException;
+ return Success;
}
static void
@@ -1682,7 +1677,7 @@ ProcRenderCreateCursor (ClientPtr client)
if (!AddResource(stuff->cid, RT_CURSOR, (pointer)pCursor))
return BadAlloc;
- return client->noClientException;
+ return Success;
}
static int
@@ -1690,15 +1685,10 @@ ProcRenderSetPictureTransform (ClientPtr client)
{
REQUEST(xRenderSetPictureTransformReq);
PicturePtr pPicture;
- int result;
REQUEST_SIZE_MATCH(xRenderSetPictureTransformReq);
VERIFY_PICTURE (pPicture, stuff->picture, client, DixSetAttrAccess);
- result = SetPictureTransform (pPicture, (PictTransform *) &stuff->transform);
- if (client->noClientException != Success)
- return(client->noClientException);
- else
- return(result);
+ return SetPictureTransform (pPicture, (PictTransform *) &stuff->transform);
}
static int
@@ -1808,7 +1798,7 @@ ProcRenderQueryFilters (ClientPtr client)
WriteToClient(client, total_bytes, (char *) reply);
free(reply);
- return(client->noClientException);
+ return Success;
}
static int
@@ -1871,7 +1861,7 @@ ProcRenderCreateAnimCursor (ClientPtr client)
return ret;
if (AddResource (stuff->cid, RT_CURSOR, (pointer)pCursor))
- return client->noClientException;
+ return Success;
return BadAlloc;
}
@@ -1894,7 +1884,7 @@ ProcRenderAddTraps (ClientPtr client)
AddTraps (pPicture,
stuff->xOff, stuff->yOff,
ntraps, (xTrap *) &stuff[1]);
- return client->noClientException;
+ return Success;
}
static int ProcRenderCreateSolidFill(ClientPtr client)
diff --git a/xfixes/cursor.c b/xfixes/cursor.c
index b7e6c7b8c..d5f8b290b 100644
--- a/xfixes/cursor.c
+++ b/xfixes/cursor.c
@@ -424,7 +424,7 @@ ProcXFixesGetCursorImage (ClientPtr client)
WriteToClient(client, sizeof (xXFixesGetCursorImageReply) +
(npixels << 2), (char *) rep);
free(rep);
- return client->noClientException;
+ return Success;
}
int
@@ -452,7 +452,7 @@ ProcXFixesSetCursorName (ClientPtr client)
return BadAlloc;
pCursor->name = atom;
- return(client->noClientException);
+ return Success;
}
int
@@ -501,7 +501,7 @@ ProcXFixesGetCursorName (ClientPtr client)
WriteReplyToClient(client, sizeof(xXFixesGetCursorNameReply), &reply);
WriteToClient(client, len, str);
- return(client->noClientException);
+ return Success;
}
int
@@ -584,7 +584,7 @@ ProcXFixesGetCursorImageAndName (ClientPtr client)
WriteToClient(client, sizeof (xXFixesGetCursorImageAndNameReply) +
(npixels << 2) + nbytesRound, (char *) rep);
free(rep);
- return client->noClientException;
+ return Success;
}
int
@@ -719,7 +719,7 @@ ProcXFixesChangeCursor (ClientPtr client)
DixWriteAccess|DixSetAttrAccess);
ReplaceCursor (pSource, TestForCursor, (pointer) pDestination);
- return (client->noClientException);
+ return Success;
}
int
@@ -757,7 +757,7 @@ ProcXFixesChangeCursorByName (ClientPtr client)
name = MakeAtom (tchar, stuff->nbytes, FALSE);
if (name)
ReplaceCursor (pSource, TestForCursorName, &name);
- return (client->noClientException);
+ return Success;
}
int
@@ -895,7 +895,7 @@ ProcXFixesHideCursor (ClientPtr client)
pChc = findCursorHideCount(client, pWin->drawable.pScreen);
if (pChc != NULL) {
pChc->hideCount++;
- return client->noClientException;
+ return Success;
}
/*
@@ -969,7 +969,7 @@ ProcXFixesShowCursor (ClientPtr client)
FreeResource(pChc->resource, 0);
}
- return (client->noClientException);
+ return Success;
}
int
diff --git a/xfixes/region.c b/xfixes/region.c
index 5e1636962..5f0c2c432 100644
--- a/xfixes/region.c
+++ b/xfixes/region.c
@@ -87,7 +87,7 @@ ProcXFixesCreateRegion (ClientPtr client)
if (!AddResource (stuff->region, RegionResType, (pointer) pRegion))
return BadAlloc;
- return(client->noClientException);
+ return Success;
}
int
@@ -132,7 +132,7 @@ ProcXFixesCreateRegionFromBitmap (ClientPtr client)
if (!AddResource (stuff->region, RegionResType, (pointer) pRegion))
return BadAlloc;
- return(client->noClientException);
+ return Success;
}
int
@@ -194,7 +194,7 @@ ProcXFixesCreateRegionFromWindow (ClientPtr client)
if (!AddResource (stuff->region, RegionResType, (pointer) pRegion))
return BadAlloc;
- return(client->noClientException);
+ return Success;
}
int
@@ -244,7 +244,7 @@ ProcXFixesCreateRegionFromGC (ClientPtr client)
if (!AddResource (stuff->region, RegionResType, (pointer) pRegion))
return BadAlloc;
- return(client->noClientException);
+ return Success;
}
int
@@ -291,7 +291,7 @@ ProcXFixesCreateRegionFromPicture (ClientPtr client)
if (!AddResource (stuff->region, RegionResType, (pointer) pRegion))
return BadAlloc;
- return(client->noClientException);
+ return Success;
}
int
@@ -316,7 +316,7 @@ ProcXFixesDestroyRegion (ClientPtr client)
REQUEST_SIZE_MATCH(xXFixesDestroyRegionReq);
VERIFY_REGION(pRegion, stuff->region, client, DixWriteAccess);
FreeResource (stuff->region, RT_NONE);
- return(client->noClientException);
+ return Success;
}
int
@@ -355,7 +355,7 @@ ProcXFixesSetRegion (ClientPtr client)
return BadAlloc;
}
REGION_DESTROY (0, pNew);
- return(client->noClientException);
+ return Success;
}
int
@@ -383,7 +383,7 @@ ProcXFixesCopyRegion (ClientPtr client)
if (!REGION_COPY(pScreen, pDestination, pSource))
return BadAlloc;
- return(client->noClientException);
+ return Success;
}
int
@@ -403,7 +403,6 @@ int
ProcXFixesCombineRegion (ClientPtr client)
{
RegionPtr pSource1, pSource2, pDestination;
- int ret = Success;
REQUEST (xXFixesCombineRegionReq);
REQUEST_SIZE_MATCH (xXFixesCombineRegionReq);
@@ -414,21 +413,19 @@ ProcXFixesCombineRegion (ClientPtr client)
switch (stuff->xfixesReqType) {
case X_XFixesUnionRegion:
if (!REGION_UNION (0, pDestination, pSource1, pSource2))
- ret = BadAlloc;
+ return BadAlloc;
break;
case X_XFixesIntersectRegion:
if (!REGION_INTERSECT (0, pDestination, pSource1, pSource2))
- ret = BadAlloc;
+ return BadAlloc;
break;
case X_XFixesSubtractRegion:
if (!REGION_SUBTRACT (0, pDestination, pSource1, pSource2))
- ret = BadAlloc;
+ return BadAlloc;
break;
}
- if (ret == Success)
- ret = client->noClientException;
- return ret;
+ return Success;
}
int
@@ -450,7 +447,6 @@ ProcXFixesInvertRegion (ClientPtr client)
{
RegionPtr pSource, pDestination;
BoxRec bounds;
- int ret = Success;
REQUEST(xXFixesInvertRegionReq);
REQUEST_SIZE_MATCH(xXFixesInvertRegionReq);
@@ -471,11 +467,9 @@ ProcXFixesInvertRegion (ClientPtr client)
bounds.y2 = stuff->y + stuff->height;
if (!REGION_INVERSE(0, pDestination, pSource, &bounds))
- ret = BadAlloc;
+ return BadAlloc;
- if (ret == Success)
- ret = client->noClientException;
- return ret;
+ return Success;
}
int
@@ -505,7 +499,7 @@ ProcXFixesTranslateRegion (ClientPtr client)
VERIFY_REGION(pRegion, stuff->region, client, DixWriteAccess);
REGION_TRANSLATE(pScreen, pRegion, stuff->dx, stuff->dy);
- return (client->noClientException);
+ return Success;
}
int
@@ -534,7 +528,7 @@ ProcXFixesRegionExtents (ClientPtr client)
REGION_RESET (0, pDestination, REGION_EXTENTS (0, pSource));
- return (client->noClientException);
+ return Success;
}
int
@@ -602,7 +596,7 @@ ProcXFixesFetchRegion (ClientPtr client)
(void) WriteToClient(client, sizeof (xXFixesFetchRegionReply) +
nBox * sizeof (xRectangle), (char *) reply);
free(reply);
- return (client->noClientException);
+ return Success;
}
int
@@ -622,7 +616,7 @@ ProcXFixesSetGCClipRegion (ClientPtr client)
{
GCPtr pGC;
RegionPtr pRegion;
- XID vals[2];
+ ChangeGCVal vals[2];
int rc;
REQUEST(xXFixesSetGCClipRegionReq);
REQUEST_SIZE_MATCH(xXFixesSetGCClipRegionReq);
@@ -640,12 +634,12 @@ ProcXFixesSetGCClipRegion (ClientPtr client)
return BadAlloc;
}
- vals[0] = stuff->xOrigin;
- vals[1] = stuff->yOrigin;
- dixChangeGC (NullClient, pGC, GCClipXOrigin|GCClipYOrigin, vals, NULL);
+ vals[0].val = stuff->xOrigin;
+ vals[1].val = stuff->yOrigin;
+ ChangeGC (NullClient, pGC, GCClipXOrigin|GCClipYOrigin, vals);
(*pGC->funcs->ChangeClip)(pGC, pRegion ? CT_REGION : CT_NONE, (pointer)pRegion, 0);
- return (client->noClientException);
+ return Success;
}
int
@@ -741,7 +735,7 @@ ProcXFixesSetWindowShapeRegion (ClientPtr client)
*pDestRegion = pRegion;
(*pScreen->SetShape) (pWin);
SendShapeNotify (pWin, stuff->destKind);
- return (client->noClientException);
+ return Success;
}
int
@@ -797,7 +791,6 @@ int
ProcXFixesExpandRegion (ClientPtr client)
{
RegionPtr pSource, pDestination;
- int ret = Success;
REQUEST (xXFixesExpandRegionReq);
BoxPtr pTmp;
BoxPtr pSrc;
@@ -831,9 +824,7 @@ ProcXFixesExpandRegion (ClientPtr client)
}
free(pTmp);
}
- if (ret == Success)
- ret = client->noClientException;
- return ret;
+ return Success;
}
int
diff --git a/xfixes/saveset.c b/xfixes/saveset.c
index 29de0d8f2..3c0504f7f 100644
--- a/xfixes/saveset.c
+++ b/xfixes/saveset.c
@@ -57,11 +57,7 @@ ProcXFixesChangeSaveSet(ClientPtr client)
}
toRoot = (stuff->target == SaveSetRoot);
map = (stuff->map == SaveSetMap);
- result = AlterSaveSetForClient(client, pWin, stuff->mode, toRoot, map);
- if (client->noClientException != Success)
- return(client->noClientException);
- else
- return(result);
+ return AlterSaveSetForClient(client, pWin, stuff->mode, toRoot, map);
}
int
diff --git a/xfixes/xfixes.c b/xfixes/xfixes.c
index 5163dc11e..49ed5a0d5 100644
--- a/xfixes/xfixes.c
+++ b/xfixes/xfixes.c
@@ -92,7 +92,7 @@ ProcXFixesQueryVersion(ClientPtr client)
swapl(&rep.minorVersion, n);
}
WriteToClient(client, sizeof(xXFixesQueryVersionReply), (char *)&rep);
- return(client->noClientException);
+ return Success;
}
/* Major version controls available requests */
diff --git a/xkb/xkb.c b/xkb/xkb.c
index e354b7448..5a425bd73 100644
--- a/xkb/xkb.c
+++ b/xkb/xkb.c
@@ -194,7 +194,7 @@ ProcXkbUseExtension(ClientPtr client)
swaps(&rep.serverMinor, n);
}
WriteToClient(client,SIZEOF(xkbUseExtensionReply), (char *)&rep);
- return client->noClientException;
+ return Success;
}
/***====================================================================***/
@@ -219,7 +219,7 @@ ProcXkbSelectEvents(ClientPtr client)
client->mapNotifyMask|= (stuff->affectMap&stuff->map);
}
if ((stuff->affectWhich&(~XkbMapNotifyMask))==0)
- return client->noClientException;
+ return Success;
masks = XkbFindClientResource((DevicePtr)dev,client);
if (!masks){
@@ -343,7 +343,7 @@ ProcXkbSelectEvents(ClientPtr client)
ErrorF("[xkb] Extra data (%d bytes) after SelectEvents\n",dataLeft);
return BadLength;
}
- return client->noClientException;
+ return Success;
}
return BadAlloc;
}
@@ -578,7 +578,7 @@ ProcXkbGetState(ClientPtr client)
swaps(&rep.ptrBtnState,n);
}
WriteToClient(client, SIZEOF(xkbGetStateReply), (char *)&rep);
- return client->noClientException;
+ return Success;
}
/***====================================================================***/
@@ -646,7 +646,7 @@ ProcXkbLatchLockState(ClientPtr client)
}
}
- return client->noClientException;
+ return Success;
}
/***====================================================================***/
@@ -722,7 +722,7 @@ ProcXkbGetControls(ClientPtr client)
swaps(&rep.axOptions, n);
}
WriteToClient(client, SIZEOF(xkbGetControlsReply), (char *)&rep);
- return(client->noClientException);
+ return Success;
}
int
@@ -942,7 +942,7 @@ ProcXkbSetControls(ClientPtr client)
}
}
- return client->noClientException;
+ return Success;
}
/***====================================================================***/
@@ -1406,7 +1406,7 @@ char *desc,*start;
WriteToClient(client, (i=SIZEOF(xkbGetMapReply)), (char *)rep);
WriteToClient(client, len, start);
free((char *)start);
- return client->noClientException;
+ return Success;
}
int
@@ -2594,7 +2594,7 @@ ProcXkbSetMap(ClientPtr client)
}
}
- return client->noClientException;
+ return Success;
}
/***====================================================================***/
@@ -2682,7 +2682,7 @@ int size;
WriteToClient(client, size, data);
free((char *)data);
}
- return client->noClientException;
+ return Success;
}
int
@@ -2923,7 +2923,7 @@ ProcXkbSetCompatMap(ClientPtr client)
}
}
- return client->noClientException;
+ return Success;
}
/***====================================================================***/
@@ -2960,7 +2960,7 @@ ProcXkbGetIndicatorState(ClientPtr client)
swapl(&rep.state,i);
}
WriteToClient(client, SIZEOF(xkbGetIndicatorStateReply), (char *)&rep);
- return client->noClientException;
+ return Success;
}
/***====================================================================***/
@@ -3036,7 +3036,7 @@ register unsigned bit;
WriteToClient(client, length, (char *)map);
free((char *)map);
}
- return client->noClientException;
+ return Success;
}
int
@@ -3130,7 +3130,7 @@ ProcXkbSetIndicatorMap(ClientPtr client)
CHK_KBD_DEVICE(dev, stuff->deviceSpec, client, DixSetAttrAccess);
if (stuff->which==0)
- return client->noClientException;
+ return Success;
for (nIndicators=i=0,bit=1;i<XkbNumIndicators;i++,bit<<=1) {
if (stuff->which&bit)
@@ -3257,7 +3257,7 @@ ProcXkbGetNamedIndicator(ClientPtr client)
}
WriteToClient(client,SIZEOF(xkbGetNamedIndicatorReply), (char *)&rep);
- return client->noClientException;
+ return Success;
}
@@ -3467,7 +3467,7 @@ ProcXkbSetNamedIndicator(ClientPtr client)
}
}
- return client->noClientException;
+ return Success;
}
/***====================================================================***/
@@ -3757,7 +3757,7 @@ register int n;
WriteToClient(client, SIZEOF(xkbGetNamesReply), (char *)rep);
WriteToClient(client, length, start);
free((char *)start);
- return client->noClientException;
+ return Success;
}
int
@@ -4286,7 +4286,7 @@ ProcXkbSetNames(ClientPtr client)
/* everything is okay -- update names */
- return client->noClientException;
+ return Success;
}
/***====================================================================***/
@@ -4787,7 +4787,7 @@ XkbSendGeometry( ClientPtr client,
free((char *)start);
if (freeGeom)
XkbFreeGeometry(geom,XkbGeomAllMask,TRUE);
- return client->noClientException;
+ return Success;
}
int
@@ -5414,7 +5414,7 @@ ProcXkbPerClientFlags(ClientPtr client)
swapl(&rep.autoCtrlValues,n);
}
WriteToClient(client,SIZEOF(xkbPerClientFlagsReply), (char *)&rep);
- return client->noClientException;
+ return Success;
}
/***====================================================================***/
@@ -5548,7 +5548,7 @@ ProcXkbListComponents(ClientPtr client)
free(list.pool);
list.pool= NULL;
}
- return client->noClientException;
+ return Success;
}
/***====================================================================***/
@@ -5891,7 +5891,7 @@ ProcXkbGetKbdByName(ClientPtr client)
if (names.compat) { free(names.compat); names.compat= NULL; }
if (names.symbols) { free(names.symbols); names.symbols= NULL; }
if (names.geometry) { free(names.geometry); names.geometry= NULL; }
- return client->noClientException;
+ return Success;
}
/***====================================================================***/
@@ -6231,7 +6231,7 @@ char * str;
ErrorF("[xkb] Wrote %d fewer bytes than expected\n",length);
return BadLength;
}
- return client->noClientException;
+ return Success;
}
static char *
@@ -6556,7 +6556,7 @@ ProcXkbSetDeviceInfo(ClientPtr client)
}
}
- return client->noClientException;
+ return Success;
}
/***====================================================================***/
@@ -6619,7 +6619,7 @@ int rc;
swapl(&rep.supportedCtrls, n);
}
WriteToClient(client,SIZEOF(xkbSetDebuggingFlagsReply), (char *)&rep);
- return client->noClientException;
+ return Success;
}
/***====================================================================***/