From 988ffddfe082fb27fadf9aa60ab22dce6855508c Mon Sep 17 00:00:00 2001 From: Adam Jackson Date: Fri, 10 Jun 2005 04:01:14 +0000 Subject: Bug #2799: Input shape. (Keith Packard) --- xfixes/region.c | 31 ++++++++++++++++++++++--------- 1 file changed, 22 insertions(+), 9 deletions(-) (limited to 'xfixes/region.c') 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 */ -- cgit v1.2.3