mirror of
https://github.com/X11Libre/xserver.git
synced 2026-10-01 22:03:09 +00:00
Kill ChangeGC in favor of dixChangeGC.
This doesn't change any behavior, but it isn't clear whether NullClient is correct in all cases. As ajax says, > For most of these changes, I think it's correct to use NullClient, > since they are server-initiated changes and should not fail for (eg) > xace reasons. ... At any rate, you're certainly not changing any > semantics by leaving them all as NullClient, so this patch can't be > more wrong than before. The call in CreateGC is particularly questionable. Signed-off-by: Jamey Sharp <jamey@minilop.net> Reviewed-by: Adam Jackson <ajax@redhat.com>
This commit is contained in:
parent
65cedf3905
commit
04bad1b8a1
9 changed files with 18 additions and 33 deletions
15
dix/gc.c
15
dix/gc.c
|
|
@ -491,14 +491,6 @@ dixChangeGC(ClientPtr client, GC *pGC, BITS32 mask, CARD32 *pC32, ChangeGCValPtr
|
|||
#undef NEXTVAL
|
||||
#undef NEXT_PTR
|
||||
|
||||
/* Publically defined entry to ChangeGC. Just calls dixChangeGC and tells
|
||||
* it that all of the entries are constants or IDs */
|
||||
int
|
||||
ChangeGC(GC *pGC, BITS32 mask, XID *pval)
|
||||
{
|
||||
return (dixChangeGC(NullClient, pGC, mask, pval, NULL));
|
||||
}
|
||||
|
||||
/* CreateGC(pDrawable, mask, pval, pStatus)
|
||||
creates a default GC for the given drawable, using mask to fill
|
||||
in any non-default values.
|
||||
|
|
@ -582,7 +574,7 @@ CreateGC(DrawablePtr pDrawable, BITS32 mask, XID *pval, int *pStatus,
|
|||
if (!(*pGC->pScreen->CreateGC)(pGC))
|
||||
*pStatus = BadAlloc;
|
||||
else if (mask)
|
||||
*pStatus = ChangeGC(pGC, mask, pval);
|
||||
*pStatus = dixChangeGC(NullClient, pGC, mask, pval, NULL);
|
||||
else
|
||||
*pStatus = Success;
|
||||
|
||||
|
|
@ -625,8 +617,7 @@ CreateDefaultTile (GCPtr pGC)
|
|||
tmpval[0] = GXcopy;
|
||||
tmpval[1] = pGC->tile.pixel;
|
||||
tmpval[2] = FillSolid;
|
||||
(void)ChangeGC(pgcScratch, GCFunction | GCForeground | GCFillStyle,
|
||||
tmpval);
|
||||
(void)dixChangeGC(NullClient, pgcScratch, GCFunction | GCForeground | GCFillStyle, tmpval, NULL);
|
||||
ValidateGC((DrawablePtr)pTile, pgcScratch);
|
||||
rect.x = 0;
|
||||
rect.y = 0;
|
||||
|
|
@ -965,7 +956,7 @@ CreateDefaultStipple(int screenNum)
|
|||
(*pScreen->DestroyPixmap)(pScreen->PixmapPerDepth[0]);
|
||||
return FALSE;
|
||||
}
|
||||
(void)ChangeGC(pgcScratch, GCFunction|GCForeground|GCFillStyle, tmpval);
|
||||
(void)dixChangeGC(NullClient, pgcScratch, GCFunction|GCForeground|GCFillStyle, tmpval, NULL);
|
||||
ValidateGC((DrawablePtr)pScreen->PixmapPerDepth[0], pgcScratch);
|
||||
rect.x = 0;
|
||||
rect.y = 0;
|
||||
|
|
|
|||
Loading…
Reference in a new issue