mirror of
https://github.com/X11Libre/xserver.git
synced 2026-09-18 19:52:21 +00:00
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>
This commit is contained in:
parent
e7b9295551
commit
73e2383b73
15 changed files with 53 additions and 133 deletions
|
|
@ -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))
|
||||
|
|
|
|||
Loading…
Reference in a new issue