diff options
Diffstat (limited to 'xorg-server/xfixes/region.c')
-rw-r--r-- | xorg-server/xfixes/region.c | 14 |
1 files changed, 3 insertions, 11 deletions
diff --git a/xorg-server/xfixes/region.c b/xorg-server/xfixes/region.c index f9de52542..4cfeee1a1 100644 --- a/xorg-server/xfixes/region.c +++ b/xorg-server/xfixes/region.c @@ -272,20 +272,12 @@ ProcXFixesCreateRegionFromPicture(ClientPtr client) if (!pPicture->pDrawable) return RenderErrBase + BadPicture; - switch (pPicture->clientClipType) { - case CT_PIXMAP: - pRegion = BitmapToRegion(pPicture->pDrawable->pScreen, - (PixmapPtr) pPicture->clientClip); - if (!pRegion) - return BadAlloc; - break; - case CT_REGION: + if (pPicture->clientClip) { pRegion = XFixesRegionCopy((RegionPtr) pPicture->clientClip); if (!pRegion) return BadAlloc; - break; - default: - return BadImplementation; /* assume sane server bits */ + } else { + return BadMatch; } if (!AddResource(stuff->region, RegionResType, (void *) pRegion)) |