diff options
author | Adam Jackson <ajax@redhat.com> | 2014-06-20 13:31:20 -0400 |
---|---|---|
committer | Adam Jackson <ajax@redhat.com> | 2014-10-27 15:46:05 -0400 |
commit | 73e2383b7350723256894c5076d0c731aec5cd1f (patch) | |
tree | 1ceac2d3dbec5820802ce3be12fac72b754cce20 /xfixes/region.c | |
parent | e7b9295551d55b42b416ba70cce11dae79ece5e7 (diff) |
dix: Always store GC client clip as a region (v2)
Again, this changes FixesCreateRegionFromGC to throw BadMatch when fed a
GC with no client clip.
v2: Fix Xnest and some variable names (Keith)
Reviewed-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Adam Jackson <ajax@redhat.com>
Diffstat (limited to 'xfixes/region.c')
-rw-r--r-- | xfixes/region.c | 13 |
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)) |