xserver/xfixes region.c,1.7,1.8
Keith Packard
xserver-commit at pdx.freedesktop.org
Tue Feb 8 13:51:43 PST 2005
Committed by: keithp
Update of /cvs/xserver/xserver/xfixes
In directory gabe:/tmp/cvs-serv14618/xfixes
Modified Files:
region.c
Log Message:
2005-02-08 Keith Packard <keithp at keithp.com>
* Xext/shape.c: (SendShapeNotify):
* dix/dispatch.c:
* dix/events.c: (XYToWindow), (XineramaPointInWindowIsVisible):
* dix/window.c: (FreeWindowResources):
* xfixes/region.c: (ProcXFixesSetWindowShapeRegion):
Add ShapeInput support
Index: region.c
===================================================================
RCS file: /cvs/xserver/xserver/xfixes/region.c,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- region.c 26 Jul 2004 17:14:27 -0000 1.7
+++ region.c 8 Feb 2005 21:51:41 -0000 1.8
@@ -668,7 +668,6 @@
ScreenPtr pScreen;
RegionPtr pRegion;
RegionPtr *pDestRegion;
- int destBounding;
REQUEST(xXFixesSetWindowShapeRegionReq);
REQUEST_SIZE_MATCH(xXFixesSetWindowShapeRegionReq);
@@ -679,18 +678,16 @@
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);
@@ -698,10 +695,18 @@
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);
}
@@ -709,10 +714,18 @@
{
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 */
More information about the xserver-commit
mailing list