summaryrefslogtreecommitdiff
path: root/randr
diff options
context:
space:
mode:
authorJamey Sharp <jamey@minilop.net>2010-04-24 23:56:36 -0700
committerJamey Sharp <jamey@minilop.net>2010-05-19 12:32:48 -0700
commitc38552d115e3bc71ad6179a8ad0d68778e943793 (patch)
treeaf6a02d6e34896c2a91b49ba568dab6bbad8b7d8 /randr
parente291c561821ae86b7dd74269d5cd29bc31703962 (diff)
Add typed resource-lookup errors for non-core resource types.
Signed-off-by: Jamey Sharp <jamey@minilop.net> Reviewed-by: Adam Jackson <ajax@redhat.com>
Diffstat (limited to 'randr')
-rw-r--r--randr/randrstr.h6
-rw-r--r--randr/rrcrtc.c3
-rw-r--r--randr/rrmode.c1
-rw-r--r--randr/rroutput.c1
4 files changed, 7 insertions, 4 deletions
diff --git a/randr/randrstr.h b/randr/randrstr.h
index b163a73da..a18c834e9 100644
--- a/randr/randrstr.h
+++ b/randr/randrstr.h
@@ -344,7 +344,7 @@ extern _X_EXPORT RESTYPE RRCrtcType, RRModeType, RROutputType;
RROutputType, client, a);\
if (rc != Success) {\
client->errorValue = id;\
- return (rc == BadValue) ? RRErrorBase + BadRROutput : rc;\
+ return rc;\
}\
}
@@ -354,7 +354,7 @@ extern _X_EXPORT RESTYPE RRCrtcType, RRModeType, RROutputType;
RRCrtcType, client, a);\
if (rc != Success) {\
client->errorValue = id;\
- return (rc == BadValue) ? RRErrorBase + BadRRCrtc : rc;\
+ return rc;\
}\
}
@@ -364,7 +364,7 @@ extern _X_EXPORT RESTYPE RRCrtcType, RRModeType, RROutputType;
RRModeType, client, a);\
if (rc != Success) {\
client->errorValue = id;\
- return (rc == BadValue) ? RRErrorBase + BadRRMode : rc;\
+ return rc;\
}\
}
diff --git a/randr/rrcrtc.c b/randr/rrcrtc.c
index 95e74c5d8..987f77233 100644
--- a/randr/rrcrtc.c
+++ b/randr/rrcrtc.c
@@ -634,6 +634,7 @@ RRCrtcInit (void)
RRCrtcType = CreateNewResourceType (RRCrtcDestroyResource, "CRTC");
if (!RRCrtcType)
return FALSE;
+ SetResourceTypeErrorValue(RRCrtcType, RRErrorBase + BadRRCrtc);
return TRUE;
}
@@ -806,7 +807,7 @@ ProcRRSetCrtcConfig (ClientPtr client)
{
if (outputs)
free(outputs);
- return (rc == BadValue) ? RRErrorBase + BadRROutput : rc;
+ return rc;
}
/* validate crtc for this output */
for (j = 0; j < outputs[i]->numCrtcs; j++)
diff --git a/randr/rrmode.c b/randr/rrmode.c
index e73d1acd8..deddd3c0c 100644
--- a/randr/rrmode.c
+++ b/randr/rrmode.c
@@ -268,6 +268,7 @@ RRModeInit (void)
RRModeType = CreateNewResourceType (RRModeDestroyResource, "MODE");
if (!RRModeType)
return FALSE;
+ SetResourceTypeErrorValue(RRModeType, RRErrorBase + BadRRMode);
return TRUE;
}
diff --git a/randr/rroutput.c b/randr/rroutput.c
index 445c31827..7822c0dc3 100644
--- a/randr/rroutput.c
+++ b/randr/rroutput.c
@@ -423,6 +423,7 @@ RROutputInit (void)
RROutputType = CreateNewResourceType (RROutputDestroyResource, "OUTPUT");
if (!RROutputType)
return FALSE;
+ SetResourceTypeErrorValue(RROutputType, RRErrorBase + BadRROutput);
return TRUE;
}