mirror of
https://github.com/X11Libre/xserver.git
synced 2026-10-14 00:01:20 +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
|
|
@ -1261,7 +1261,7 @@ doPolyText(ClientPtr client, PTclosurePtr c)
|
|||
{
|
||||
if (pFont != c->pGC->font && c->pDraw)
|
||||
{
|
||||
ChangeGC( c->pGC, GCFont, &fid);
|
||||
dixChangeGC(NullClient, c->pGC, GCFont, &fid, NULL);
|
||||
ValidateGC(c->pDraw, c->pGC);
|
||||
if (c->reqType == X_PolyText8)
|
||||
c->polyText = (PolyTextPtr) c->pGC->ops->PolyText8;
|
||||
|
|
@ -1404,7 +1404,7 @@ bail:
|
|||
/* Step 4 */
|
||||
if (pFont != origGC->font)
|
||||
{
|
||||
ChangeGC(origGC, GCFont, &fid);
|
||||
dixChangeGC(NullClient, origGC, GCFont, &fid, NULL);
|
||||
ValidateGC(c->pDraw, origGC);
|
||||
}
|
||||
|
||||
|
|
@ -1423,7 +1423,7 @@ bail:
|
|||
if (c->slept)
|
||||
{
|
||||
ClientWakeup(c->client);
|
||||
ChangeGC(c->pGC, clearGCmask, clearGC);
|
||||
dixChangeGC(NullClient, c->pGC, clearGCmask, clearGC, NULL);
|
||||
|
||||
/* Unreference the font from the scratch GC */
|
||||
CloseFont(c->pGC->font, (Font)0);
|
||||
|
|
@ -1580,7 +1580,7 @@ bail:
|
|||
if (c->slept)
|
||||
{
|
||||
ClientWakeup(c->client);
|
||||
ChangeGC(c->pGC, clearGCmask, clearGC);
|
||||
dixChangeGC(NullClient, c->pGC, clearGCmask, clearGC, NULL);
|
||||
|
||||
/* Unreference the font from the scratch GC */
|
||||
CloseFont(c->pGC->font, (Font)0);
|
||||
|
|
|
|||
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;
|
||||
|
|
|
|||
|
|
@ -328,7 +328,7 @@ MakeRootTile(WindowPtr pWin)
|
|||
attributes[0] = pScreen->whitePixel;
|
||||
attributes[1] = pScreen->blackPixel;
|
||||
|
||||
(void)ChangeGC(pGC, GCForeground | GCBackground, attributes);
|
||||
(void)dixChangeGC(NullClient, pGC, GCForeground | GCBackground, attributes, NULL);
|
||||
}
|
||||
|
||||
ValidateGC((DrawablePtr)pWin->background.pixmap, pGC);
|
||||
|
|
|
|||
Loading…
Reference in a new issue