summaryrefslogtreecommitdiff
path: root/Xext/shape.c
diff options
context:
space:
mode:
Diffstat (limited to 'Xext/shape.c')
-rw-r--r--Xext/shape.c32
1 files changed, 13 insertions, 19 deletions
diff --git a/Xext/shape.c b/Xext/shape.c
index 2425eeb3b..6857c2865 100644
--- a/Xext/shape.c
+++ b/Xext/shape.c
@@ -111,9 +111,6 @@ static DISPATCH_PROC(SProcShapeSelectInput);
#include "panoramiXsrv.h"
#endif
-#if 0
-static unsigned char ShapeReqCode = 0;
-#endif
static int ShapeEventBase = 0;
static RESTYPE ClientType, EventType; /* resource types for event masks */
@@ -154,9 +151,6 @@ ShapeExtensionInit(void)
ProcShapeDispatch, SProcShapeDispatch,
ShapeResetProc, StandardMinorOpcode)))
{
-#if 0
- ShapeReqCode = (unsigned char)extEntry->base;
-#endif
ShapeEventBase = extEntry->eventBase;
EventSwapVector[ShapeEventBase] = (EventSwapPtr) SShapeNotifyEvent;
}
@@ -323,7 +317,7 @@ ProcShapeRectangles (client)
REQUEST_AT_LEAST_SIZE (xShapeRectanglesReq);
UpdateCurrentTime();
- rc = dixLookupWindow(&pWin, stuff->dest, client, DixUnknownAccess);
+ rc = dixLookupWindow(&pWin, stuff->dest, client, DixSetAttrAccess);
if (rc != Success)
return rc;
switch (stuff->destKind) {
@@ -423,7 +417,7 @@ ProcShapeMask (client)
REQUEST_SIZE_MATCH (xShapeMaskReq);
UpdateCurrentTime();
- rc = dixLookupWindow(&pWin, stuff->dest, client, DixWriteAccess);
+ rc = dixLookupWindow(&pWin, stuff->dest, client, DixSetAttrAccess);
if (rc != Success)
return rc;
switch (stuff->destKind) {
@@ -444,10 +438,10 @@ ProcShapeMask (client)
if (stuff->src == None)
srcRgn = 0;
else {
- pPixmap = (PixmapPtr) SecurityLookupIDByType(client, stuff->src,
- RT_PIXMAP, DixReadAccess);
- if (!pPixmap)
- return BadPixmap;
+ rc = dixLookupResource((pointer *)&pPixmap, stuff->src, RT_PIXMAP,
+ client, DixReadAccess);
+ if (rc != Success)
+ return (rc == BadValue) ? BadPixmap : rc;
if (pPixmap->drawable.pScreen != pScreen ||
pPixmap->drawable.depth != 1)
return BadMatch;
@@ -531,7 +525,7 @@ ProcShapeCombine (client)
REQUEST_SIZE_MATCH (xShapeCombineReq);
UpdateCurrentTime();
- rc = dixLookupWindow(&pDestWin, stuff->dest, client, DixUnknownAccess);
+ rc = dixLookupWindow(&pDestWin, stuff->dest, client, DixSetAttrAccess);
if (rc != Success)
return rc;
if (!pDestWin->optional)
@@ -552,7 +546,7 @@ ProcShapeCombine (client)
}
pScreen = pDestWin->drawable.pScreen;
- rc = dixLookupWindow(&pSrcWin, stuff->src, client, DixUnknownAccess);
+ rc = dixLookupWindow(&pSrcWin, stuff->src, client, DixGetAttrAccess);
if (rc != Success)
return rc;
switch (stuff->srcKind) {
@@ -651,7 +645,7 @@ ProcShapeOffset (client)
REQUEST_SIZE_MATCH (xShapeOffsetReq);
UpdateCurrentTime();
- rc = dixLookupWindow(&pWin, stuff->dest, client, DixUnknownAccess);
+ rc = dixLookupWindow(&pWin, stuff->dest, client, DixSetAttrAccess);
if (rc != Success)
return rc;
switch (stuff->destKind) {
@@ -716,7 +710,7 @@ ProcShapeQueryExtents (client)
RegionPtr region;
REQUEST_SIZE_MATCH (xShapeQueryExtentsReq);
- rc = dixLookupWindow(&pWin, stuff->window, client, DixUnknownAccess);
+ rc = dixLookupWindow(&pWin, stuff->window, client, DixGetAttrAccess);
if (rc != Success)
return rc;
rep.type = X_Reply;
@@ -826,7 +820,7 @@ ProcShapeSelectInput (client)
int rc;
REQUEST_SIZE_MATCH (xShapeSelectInputReq);
- rc = dixLookupWindow(&pWin, stuff->window, client, DixWriteAccess);
+ rc = dixLookupWindow(&pWin, stuff->window, client, DixReceiveAccess);
if (rc != Success)
return rc;
pHead = (ShapeEventPtr *)SecurityLookupIDByType(client,
@@ -999,7 +993,7 @@ ProcShapeInputSelected (client)
int n;
REQUEST_SIZE_MATCH (xShapeInputSelectedReq);
- rc = dixLookupWindow(&pWin, stuff->window, client, DixUnknownAccess);
+ rc = dixLookupWindow(&pWin, stuff->window, client, DixGetAttrAccess);
if (rc != Success)
return rc;
pHead = (ShapeEventPtr *) SecurityLookupIDByType(client,
@@ -1041,7 +1035,7 @@ ProcShapeGetRectangles (client)
int n;
REQUEST_SIZE_MATCH(xShapeGetRectanglesReq);
- rc = dixLookupWindow(&pWin, stuff->window, client, DixUnknownAccess);
+ rc = dixLookupWindow(&pWin, stuff->window, client, DixGetAttrAccess);
if (rc != Success)
return rc;
switch (stuff->kind) {