diff options
author | marha <marha@users.sourceforge.net> | 2009-09-06 18:48:27 +0000 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2009-09-06 18:48:27 +0000 |
commit | a915739887477b28d924ecc8417ee107d125bd6c (patch) | |
tree | c02f315476b61892d1fd89182e18943dce8d6277 /xorg-server/dbe/dbe.c | |
parent | 6f25a23db1df27e992c34f6fd4c82e83c44fc2e2 (diff) | |
download | vcxsrv-a915739887477b28d924ecc8417ee107d125bd6c.tar.gz vcxsrv-a915739887477b28d924ecc8417ee107d125bd6c.tar.bz2 vcxsrv-a915739887477b28d924ecc8417ee107d125bd6c.zip |
Switched to xorg-server-1.6.99.900.tar.gz
Diffstat (limited to 'xorg-server/dbe/dbe.c')
-rw-r--r-- | xorg-server/dbe/dbe.c | 36 |
1 files changed, 20 insertions, 16 deletions
diff --git a/xorg-server/dbe/dbe.c b/xorg-server/dbe/dbe.c index ff9df7f9f..a4f853d80 100644 --- a/xorg-server/dbe/dbe.c +++ b/xorg-server/dbe/dbe.c @@ -33,7 +33,6 @@ /* INCLUDES */ -#define NEED_EVENTS #ifdef HAVE_DIX_CONFIG_H #include <dix-config.h> #endif @@ -412,20 +411,23 @@ ProcDbeDeallocateBackBufferName(ClientPtr client) { REQUEST(xDbeDeallocateBackBufferNameReq); DbeWindowPrivPtr pDbeWindowPriv; - int i; + int rc, i; + pointer val; REQUEST_SIZE_MATCH(xDbeDeallocateBackBufferNameReq); /* Buffer name must be valid */ - if (!(pDbeWindowPriv = (DbeWindowPrivPtr)SecurityLookupIDByType(client, - stuff->buffer, dbeWindowPrivResType, DixDestroyAccess)) || - !(SecurityLookupIDByType(client, stuff->buffer, dbeDrawableResType, - DixDestroyAccess))) - { - client->errorValue = stuff->buffer; - return(dbeErrorBase + DbeBadBuffer); - } + rc = dixLookupResourceByType((pointer *)&pDbeWindowPriv, stuff->buffer, + dbeWindowPrivResType, client, + DixDestroyAccess); + if (rc != Success) + return (rc == BadValue) ? dbeErrorBase + DbeBadBuffer : rc; + + rc = dixLookupResourceByType(&val, stuff->buffer, dbeDrawableResType, + client, DixDestroyAccess); + if (rc != Success) + return (rc == BadValue) ? dbeErrorBase + DbeBadBuffer : rc; /* Make sure that the id is valid for the window. * This is paranoid code since we already looked up the ID by type @@ -739,7 +741,7 @@ ProcDbeGetVisualInfo(ClientPtr client) rep.type = X_Reply; rep.sequenceNumber = client->sequence; - rep.length = length >> 2; + rep.length = bytes_to_int32(length); rep.m = count; if (client->swapped) @@ -834,19 +836,21 @@ ProcDbeGetBackBufferAttributes(ClientPtr client) REQUEST(xDbeGetBackBufferAttributesReq); xDbeGetBackBufferAttributesReply rep; DbeWindowPrivPtr pDbeWindowPriv; - int n; + int rc, n; REQUEST_SIZE_MATCH(xDbeGetBackBufferAttributesReq); - if (!(pDbeWindowPriv = (DbeWindowPrivPtr)SecurityLookupIDByType(client, - stuff->buffer, dbeWindowPrivResType, DixGetAttrAccess))) + rc = dixLookupResourceByType((pointer *)&pDbeWindowPriv, stuff->buffer, + dbeWindowPrivResType, client, + DixGetAttrAccess); + if (rc == Success) { - rep.attributes = None; + rep.attributes = pDbeWindowPriv->pWindow->drawable.id; } else { - rep.attributes = pDbeWindowPriv->pWindow->drawable.id; + rep.attributes = None; } rep.type = X_Reply; |