[PATCH 2/5] Kill ChangeGC in favor of dixChangeGC.
Adam Jackson
ajax at nwnk.net
Mon May 10 07:52:51 PDT 2010
On Fri, 2010-05-07 at 20:23 -0700, Jamey Sharp wrote:
> diff --git a/dix/dixfonts.c b/dix/dixfonts.c
> index 6dc8193..7dbccaf 100644
> --- a/dix/dixfonts.c
> +++ b/dix/dixfonts.c
> @@ -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;
This is a little subtle. 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. But that should probably be
documented in the commit message at least.
> @@ -607,7 +599,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;
Here, though, I'm not sure. We do run the security check before we get
here so it's probably okay.
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.
Reviewed-by: Adam Jackson <ajax at redhat.com>
- ajax
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part
URL: <http://lists.x.org/archives/xorg-devel/attachments/20100510/8ca61cbb/attachment.pgp>
More information about the xorg-devel
mailing list