summaryrefslogtreecommitdiff
path: root/xfixes
diff options
context:
space:
mode:
Diffstat (limited to 'xfixes')
-rw-r--r--xfixes/region.c13
1 files changed, 3 insertions, 10 deletions
diff --git a/xfixes/region.c b/xfixes/region.c
index 4cfeee1a1..4492f1267 100644
--- a/xfixes/region.c
+++ b/xfixes/region.c
@@ -222,20 +222,13 @@ ProcXFixesCreateRegionFromGC(ClientPtr client)
if (rc != Success)
return rc;
- switch (pGC->clientClipType) {
- case CT_PIXMAP:
- pRegion = BitmapToRegion(pGC->pScreen, (PixmapPtr) pGC->clientClip);
- if (!pRegion)
- return BadAlloc;
- break;
- case CT_REGION:
+ if (pGC->clientClip) {
pClip = (RegionPtr) pGC->clientClip;
pRegion = XFixesRegionCopy(pClip);
if (!pRegion)
return BadAlloc;
- break;
- default:
- return BadImplementation; /* assume sane server bits */
+ } else {
+ return BadMatch;
}
if (!AddResource(stuff->region, RegionResType, (void *) pRegion))