summaryrefslogtreecommitdiff
path: root/Xext/shape.c
diff options
context:
space:
mode:
authorPeter Hutterer <peter@cs.unisa.edu.au>2008-01-03 17:04:54 +1030
committerPeter Hutterer <peter@cs.unisa.edu.au>2008-01-03 17:04:54 +1030
commit8da83836b60f7cdb75d08482f4311fa0e2ab4e1d (patch)
tree092efcfc39e3e293baaf04c4c84027ee453d3e13 /Xext/shape.c
parenteace88989c3b65d5c20e9f37ea9b23c7c8e19335 (diff)
parentae869fc7669764729e13fdd70149ed636753f2a3 (diff)
Merge branch 'master' into mpx
Conflicts: XTrap/xtrapddmi.c Xext/security.c Xext/xprint.c Xext/xtest.c Xext/xvdisp.c Xi/exevents.c Xi/grabdevb.c Xi/grabdevk.c Xi/opendev.c Xi/ungrdev.c Xi/ungrdevb.c Xi/ungrdevk.c dix/cursor.c dix/devices.c dix/dixutils.c dix/events.c dix/getevents.c dix/main.c dix/window.c hw/xfree86/ramdac/xf86Cursor.c include/dix.h include/input.h include/inputstr.h mi/midispcur.c mi/miinitext.c mi/misprite.c render/animcur.c xfixes/cursor.c xkb/xkbAccessX.c
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) {