diff options
author | Jamey Sharp <jamey@minilop.net> | 2010-05-06 21:56:10 -0700 |
---|---|---|
committer | Jamey Sharp <jamey@minilop.net> | 2010-05-12 18:10:01 -0700 |
commit | 04bad1b8a118a83064316d6e4327234aee19361e (patch) | |
tree | db53939c7cf34aa3eb3b31e6af7d32c0b31af64c /dix/gc.c | |
parent | 65cedf39054cf3a1e695e84ac228cce9e8d48097 (diff) |
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>
Diffstat (limited to 'dix/gc.c')
-rw-r--r-- | dix/gc.c | 15 |
1 files changed, 3 insertions, 12 deletions
@@ -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; |