summaryrefslogtreecommitdiff
path: root/xfixes
diff options
context:
space:
mode:
authorAdam Jackson <ajax@nwnk.net>2005-06-10 04:01:14 +0000
committerAdam Jackson <ajax@nwnk.net>2005-06-10 04:01:14 +0000
commit988ffddfe082fb27fadf9aa60ab22dce6855508c (patch)
tree59390df386beab4f68b7e6ee98aba6f81f006b70 /xfixes
parentd24ed90547122832d4168ad761f68e107bb1a2db (diff)
Bug #2799: Input shape. (Keith Packard)XORG-6_8_99_11
Diffstat (limited to 'xfixes')
-rwxr-xr-xxfixes/region.c31
1 files changed, 22 insertions, 9 deletions
diff --git a/xfixes/region.c b/xfixes/region.c
index d80776d8c..b0073f5b3 100755
--- a/xfixes/region.c
+++ b/xfixes/region.c
@@ -675,7 +675,6 @@ ProcXFixesSetWindowShapeRegion (ClientPtr client)
ScreenPtr pScreen;
RegionPtr pRegion;
RegionPtr *pDestRegion;
- int destBounding;
REQUEST(xXFixesSetWindowShapeRegionReq);
REQUEST_SIZE_MATCH(xXFixesSetWindowShapeRegionReq);
@@ -686,18 +685,16 @@ ProcXFixesSetWindowShapeRegion (ClientPtr client)
return BadWindow;
}
VERIFY_REGION_OR_NONE(pRegion, stuff->region, client, SecurityWriteAccess);
+ pScreen = pWin->drawable.pScreen;
switch (stuff->destKind) {
case ShapeBounding:
- destBounding = 1;
- break;
case ShapeClip:
- destBounding = 0;
+ case ShapeInput:
break;
default:
client->errorValue = stuff->destKind;
return BadValue;
}
- pScreen = pWin->drawable.pScreen;
if (pRegion)
{
pRegion = XFixesRegionCopy (pRegion);
@@ -705,10 +702,18 @@ ProcXFixesSetWindowShapeRegion (ClientPtr client)
return BadAlloc;
if (!pWin->optional)
MakeWindowOptional (pWin);
- if (destBounding)
+ switch (stuff->destKind) {
+ default:
+ case ShapeBounding:
pDestRegion = &pWin->optional->boundingShape;
- else
+ break;
+ case ShapeClip:
pDestRegion = &pWin->optional->clipShape;
+ break;
+ case ShapeInput:
+ pDestRegion = &pWin->optional->inputShape;
+ break;
+ }
if (stuff->xOff || stuff->yOff)
REGION_TRANSLATE (0, pRegion, stuff->xOff, stuff->yOff);
}
@@ -716,10 +721,18 @@ ProcXFixesSetWindowShapeRegion (ClientPtr client)
{
if (pWin->optional)
{
- if (destBounding)
+ switch (stuff->destKind) {
+ default:
+ case ShapeBounding:
pDestRegion = &pWin->optional->boundingShape;
- else
+ break;
+ case ShapeClip:
pDestRegion = &pWin->optional->clipShape;
+ break;
+ case ShapeInput:
+ pDestRegion = &pWin->optional->inputShape;
+ break;
+ }
}
else
pDestRegion = &pRegion; /* a NULL region pointer */