aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/dbe/dbe.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2009-09-09 05:23:48 +0000
committermarha <marha@users.sourceforge.net>2009-09-09 05:23:48 +0000
commit81f91c615982e50bb62708201569c33a3cd3d973 (patch)
tree4f32ecc48a3b7b5e76642f3792338263c53879bd /xorg-server/dbe/dbe.c
parentb571a562410f565af2bdde52d9f7f9a23ffae04f (diff)
parenta915739887477b28d924ecc8417ee107d125bd6c (diff)
downloadvcxsrv-81f91c615982e50bb62708201569c33a3cd3d973.tar.gz
vcxsrv-81f91c615982e50bb62708201569c33a3cd3d973.tar.bz2
vcxsrv-81f91c615982e50bb62708201569c33a3cd3d973.zip
svn merge https://vcxsrv.svn.sourceforge.net/svnroot/vcxsrv/branches/released .
Diffstat (limited to 'xorg-server/dbe/dbe.c')
-rw-r--r--xorg-server/dbe/dbe.c36
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;