summaryrefslogtreecommitdiff
path: root/Xext/xvdisp.c
diff options
context:
space:
mode:
Diffstat (limited to 'Xext/xvdisp.c')
-rw-r--r--Xext/xvdisp.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/Xext/xvdisp.c b/Xext/xvdisp.c
index 250a9949a..d7338ad87 100644
--- a/Xext/xvdisp.c
+++ b/Xext/xvdisp.c
@@ -1025,7 +1025,6 @@ typedef struct _ShmDesc {
} ShmDescRec, *ShmDescPtr;
extern RESTYPE ShmSegType;
-extern int BadShmSegCode;
extern int ShmCompletionCode;
static int
@@ -1077,7 +1076,7 @@ ProcXvShmPutImage(ClientPtr client)
status = dixLookupResourceByType((pointer *)&shmdesc, stuff->shmseg,
ShmSegType, serverClient, DixReadAccess);
if (status != Success)
- return (status == BadValue) ? BadShmSegCode : status;
+ return status;
width = stuff->width;
height = stuff->height;
@@ -1615,7 +1614,7 @@ XineramaXvStopVideo(ClientPtr client)
result = dixLookupResourceByType((pointer *)&port, stuff->port,
XvXRTPort, client, DixReadAccess);
if (result != Success)
- return (result == BadValue) ? _XvBadPort : result;
+ return result;
FOR_NSCREENS_BACKWARD(i) {
if(port->info[i].id) {
@@ -1640,7 +1639,7 @@ XineramaXvSetPortAttribute(ClientPtr client)
result = dixLookupResourceByType((pointer *)&port, stuff->port,
XvXRTPort, client, DixReadAccess);
if (result != Success)
- return (result == BadValue) ? _XvBadPort : result;
+ return result;
FOR_NSCREENS_BACKWARD(i) {
if(port->info[i].id) {
@@ -1671,12 +1670,12 @@ XineramaXvShmPutImage(ClientPtr client)
result = dixLookupResourceByType((pointer *)&gc, stuff->gc,
XRT_GC, client, DixReadAccess);
if (result != Success)
- return (result == BadValue) ? BadGC : result;
+ return result;
result = dixLookupResourceByType((pointer *)&port, stuff->port,
XvXRTPort, client, DixReadAccess);
if (result != Success)
- return (result == BadValue) ? _XvBadPort : result;
+ return result;
isRoot = (draw->type == XRT_WINDOW) && draw->u.win.root;
@@ -1723,12 +1722,12 @@ XineramaXvPutImage(ClientPtr client)
result = dixLookupResourceByType((pointer *)&gc, stuff->gc,
XRT_GC, client, DixReadAccess);
if (result != Success)
- return (result == BadValue) ? BadGC : result;
+ return result;
result = dixLookupResourceByType((pointer *)&port, stuff->port,
XvXRTPort, client, DixReadAccess);
if (result != Success)
- return (result == BadValue) ? _XvBadPort : result;
+ return result;
isRoot = (draw->type == XRT_WINDOW) && draw->u.win.root;
@@ -1771,12 +1770,12 @@ XineramaXvPutVideo(ClientPtr client)
result = dixLookupResourceByType((pointer *)&gc, stuff->gc,
XRT_GC, client, DixReadAccess);
if (result != Success)
- return (result == BadValue) ? BadGC : result;
+ return result;
result = dixLookupResourceByType((pointer *)&port, stuff->port,
XvXRTPort, client, DixReadAccess);
if (result != Success)
- return (result == BadValue) ? _XvBadPort : result;
+ return result;
isRoot = (draw->type == XRT_WINDOW) && draw->u.win.root;
@@ -1819,12 +1818,12 @@ XineramaXvPutStill(ClientPtr client)
result = dixLookupResourceByType((pointer *)&gc, stuff->gc,
XRT_GC, client, DixReadAccess);
if (result != Success)
- return (result == BadValue) ? BadGC : result;
+ return result;
result = dixLookupResourceByType((pointer *)&port, stuff->port,
XvXRTPort, client, DixReadAccess);
if (result != Success)
- return (result == BadValue) ? _XvBadPort : result;
+ return result;
isRoot = (draw->type == XRT_WINDOW) && draw->u.win.root;
@@ -1910,6 +1909,7 @@ void XineramifyXv(void)
XvXRTPort = CreateNewResourceType(XineramaDeleteResource, "XvXRTPort");
if (!xvsp0 || !XvXRTPort) return;
+ SetResourceTypeErrorValue(XvXRTPort, _XvBadPort);
for(i = 0; i < xvsp0->nAdaptors; i++) {
Bool isOverlay;