aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/dix/dispatch.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2010-05-20 07:07:37 +0000
committermarha <marha@users.sourceforge.net>2010-05-20 07:07:37 +0000
commit3319741e6f9fc3232eb40462a261271b9af2dcb2 (patch)
treeffe7fbae59390aafa850dcdbd3ea48d2cb59bda0 /xorg-server/dix/dispatch.c
parent153f5cafa19da4e4c0cf21e9c909958359ed8ebd (diff)
downloadvcxsrv-3319741e6f9fc3232eb40462a261271b9af2dcb2.tar.gz
vcxsrv-3319741e6f9fc3232eb40462a261271b9af2dcb2.tar.bz2
vcxsrv-3319741e6f9fc3232eb40462a261271b9af2dcb2.zip
xserver git update 20/5/2010
Diffstat (limited to 'xorg-server/dix/dispatch.c')
-rw-r--r--xorg-server/dix/dispatch.c47
1 files changed, 26 insertions, 21 deletions
diff --git a/xorg-server/dix/dispatch.c b/xorg-server/dix/dispatch.c
index fa11155cc..181fafa77 100644
--- a/xorg-server/dix/dispatch.c
+++ b/xorg-server/dix/dispatch.c
@@ -1240,7 +1240,7 @@ ProcCloseFont(ClientPtr client)
else
{
client->errorValue = stuff->id;
- return (rc == BadValue) ? BadFont : rc;
+ return rc;
}
}
@@ -1453,7 +1453,7 @@ ProcFreePixmap(ClientPtr client)
else
{
client->errorValue = stuff->id;
- return (rc == BadValue) ? BadPixmap : rc;
+ return rc;
}
}
@@ -2407,7 +2407,7 @@ ProcFreeColormap(ClientPtr client)
else
{
client->errorValue = stuff->id;
- return (rc == BadValue) ? BadColor : rc;
+ return rc;
}
}
@@ -2428,7 +2428,7 @@ ProcCopyColormapAndFree(ClientPtr client)
if (rc == Success)
return CopyColormapAndFree(mid, pSrcMap, client->index);
client->errorValue = stuff->srcCmap;
- return (rc == BadValue) ? BadColor : rc;
+ return rc;
}
int
@@ -2445,15 +2445,18 @@ ProcInstallColormap(ClientPtr client)
goto out;
rc = XaceHook(XACE_SCREEN_ACCESS, client, pcmp->pScreen, DixSetAttrAccess);
- if (rc != Success)
+ if (rc != Success) {
+ if (rc == BadValue)
+ rc = BadColor;
goto out;
+ }
(*(pcmp->pScreen->InstallColormap)) (pcmp);
return Success;
out:
client->errorValue = stuff->id;
- return (rc == BadValue) ? BadColor : rc;
+ return rc;
}
int
@@ -2470,8 +2473,11 @@ ProcUninstallColormap(ClientPtr client)
goto out;
rc = XaceHook(XACE_SCREEN_ACCESS, client, pcmp->pScreen, DixSetAttrAccess);
- if (rc != Success)
+ if (rc != Success) {
+ if (rc == BadValue)
+ rc = BadColor;
goto out;
+ }
if(pcmp->mid != pcmp->pScreen->defColormap)
(*(pcmp->pScreen->UninstallColormap)) (pcmp);
@@ -2479,7 +2485,7 @@ ProcUninstallColormap(ClientPtr client)
out:
client->errorValue = stuff->id;
- return (rc == BadValue) ? BadColor : rc;
+ return rc;
}
int
@@ -2552,7 +2558,7 @@ ProcAllocColor (ClientPtr client)
else
{
client->errorValue = stuff->cmap;
- return (rc == BadValue) ? BadColor : rc;
+ return rc;
}
}
@@ -2598,7 +2604,7 @@ ProcAllocNamedColor (ClientPtr client)
else
{
client->errorValue = stuff->cmap;
- return (rc == BadValue) ? BadColor : rc;
+ return rc;
}
}
@@ -2662,7 +2668,7 @@ ProcAllocColorCells (ClientPtr client)
else
{
client->errorValue = stuff->cmap;
- return (rc == BadValue) ? BadColor : rc;
+ return rc;
}
}
@@ -2724,7 +2730,7 @@ ProcAllocColorPlanes(ClientPtr client)
else
{
client->errorValue = stuff->cmap;
- return (rc == BadValue) ? BadColor : rc;
+ return rc;
}
}
@@ -2751,7 +2757,7 @@ ProcFreeColors(ClientPtr client)
else
{
client->errorValue = stuff->cmap;
- return (rc == BadValue) ? BadColor : rc;
+ return rc;
}
}
@@ -2778,7 +2784,7 @@ ProcStoreColors (ClientPtr client)
else
{
client->errorValue = stuff->cmap;
- return (rc == BadValue) ? BadColor : rc;
+ return rc;
}
}
@@ -2808,7 +2814,7 @@ ProcStoreNamedColor (ClientPtr client)
else
{
client->errorValue = stuff->cmap;
- return (rc == BadValue) ? BadColor : rc;
+ return rc;
}
}
@@ -2855,7 +2861,7 @@ ProcQueryColors(ClientPtr client)
else
{
client->errorValue = stuff->cmap;
- return (rc == BadValue) ? BadColor : rc;
+ return rc;
}
}
@@ -2894,7 +2900,7 @@ ProcLookupColor(ClientPtr client)
else
{
client->errorValue = stuff->cmap;
- return (rc == BadValue) ? BadColor : rc;
+ return rc;
}
}
@@ -2920,7 +2926,7 @@ ProcCreateCursor (ClientPtr client)
DixReadAccess);
if (rc != Success) {
client->errorValue = stuff->source;
- return (rc == BadValue) ? BadPixmap : rc;
+ return rc;
}
rc = dixLookupResourceByType((pointer *)&msk, stuff->mask, RT_PIXMAP, client,
@@ -2930,7 +2936,7 @@ ProcCreateCursor (ClientPtr client)
if (stuff->mask != None)
{
client->errorValue = stuff->mask;
- return (rc == BadValue) ? BadPixmap : rc;
+ return rc;
}
}
else if ( src->drawable.width != msk->drawable.width
@@ -3031,7 +3037,7 @@ ProcFreeCursor (ClientPtr client)
else
{
client->errorValue = stuff->id;
- return (rc == BadValue) ? BadCursor : rc;
+ return rc;
}
}
@@ -3741,7 +3747,6 @@ SendErrorToClient(ClientPtr client, unsigned majorCode, unsigned minorCode,
memset(&rep, 0, sizeof(xError));
rep.type = X_Error;
- rep.sequenceNumber = client->sequence;
rep.errorCode = errorCode;
rep.majorCode = majorCode;
rep.minorCode = minorCode;