summaryrefslogtreecommitdiff
path: root/dix
diff options
context:
space:
mode:
authorJamey Sharp <jamey@minilop.net>2010-05-08 14:10:51 -0700
committerJamey Sharp <jamey@minilop.net>2010-05-13 17:13:48 -0700
commite2929db7b737413cf93fbebdf4d15abdfebff05c (patch)
treeb32ddbf9c163f8eb814ebdaa4b22301b82af0906 /dix
parent95728ca09d45afc84c8d1828c09c6b6725f1a58d (diff)
dixChangeGC callers: Use ChangeGCVal instead of XID almost everywhere.
The exceptions are ProcChangeGC and CreateGC. Signed-off-by: Jamey Sharp <jamey@minilop.net> Reviewed-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'dix')
-rw-r--r--dix/dixfonts.c14
-rw-r--r--dix/gc.c18
-rw-r--r--dix/window.c8
3 files changed, 23 insertions, 17 deletions
diff --git a/dix/dixfonts.c b/dix/dixfonts.c
index 332fb9728..01123c3a9 100644
--- a/dix/dixfonts.c
+++ b/dix/dixfonts.c
@@ -1166,7 +1166,7 @@ badAlloc:
#define TextEltHeader 2
#define FontShiftSize 5
-static XID clearGC[] = { CT_NONE };
+static ChangeGCVal clearGC[] = { { .ptr = NullPixmap } };
#define clearGCmask (GCClipMask)
int
@@ -1261,7 +1261,9 @@ doPolyText(ClientPtr client, PTclosurePtr c)
{
if (pFont != c->pGC->font && c->pDraw)
{
- dixChangeGC(NullClient, c->pGC, GCFont, &fid, NULL);
+ ChangeGCVal val;
+ val.ptr = pFont;
+ dixChangeGC(NullClient, c->pGC, GCFont, NULL, &val);
ValidateGC(c->pDraw, c->pGC);
if (c->reqType == X_PolyText8)
c->polyText = (PolyTextPtr) c->pGC->ops->PolyText8;
@@ -1404,7 +1406,9 @@ bail:
/* Step 4 */
if (pFont != origGC->font)
{
- dixChangeGC(NullClient, origGC, GCFont, &fid, NULL);
+ ChangeGCVal val;
+ val.ptr = pFont;
+ dixChangeGC(NullClient, origGC, GCFont, NULL, &val);
ValidateGC(c->pDraw, origGC);
}
@@ -1423,7 +1427,7 @@ bail:
if (c->slept)
{
ClientWakeup(c->client);
- dixChangeGC(NullClient, c->pGC, clearGCmask, clearGC, NULL);
+ dixChangeGC(NullClient, c->pGC, clearGCmask, NULL, clearGC);
/* Unreference the font from the scratch GC */
CloseFont(c->pGC->font, (Font)0);
@@ -1580,7 +1584,7 @@ bail:
if (c->slept)
{
ClientWakeup(c->client);
- dixChangeGC(NullClient, c->pGC, clearGCmask, clearGC, NULL);
+ dixChangeGC(NullClient, c->pGC, clearGCmask, NULL, clearGC);
/* Unreference the font from the scratch GC */
CloseFont(c->pGC->font, (Font)0);
diff --git a/dix/gc.c b/dix/gc.c
index c9b704a66..e5e6b4fac 100644
--- a/dix/gc.c
+++ b/dix/gc.c
@@ -593,7 +593,7 @@ out:
static Bool
CreateDefaultTile (GCPtr pGC)
{
- XID tmpval[3];
+ ChangeGCVal tmpval[3];
PixmapPtr pTile;
GCPtr pgcScratch;
xRectangle rect;
@@ -614,10 +614,10 @@ CreateDefaultTile (GCPtr pGC)
FreeScratchGC(pgcScratch);
return FALSE;
}
- tmpval[0] = GXcopy;
- tmpval[1] = pGC->tile.pixel;
- tmpval[2] = FillSolid;
- (void)dixChangeGC(NullClient, pgcScratch, GCFunction | GCForeground | GCFillStyle, tmpval, NULL);
+ tmpval[0].val = GXcopy;
+ tmpval[1].val = pGC->tile.pixel;
+ tmpval[2].val = FillSolid;
+ (void)dixChangeGC(NullClient, pgcScratch, GCFunction | GCForeground | GCFillStyle, NULL, tmpval);
ValidateGC((DrawablePtr)pTile, pgcScratch);
rect.x = 0;
rect.y = 0;
@@ -935,7 +935,7 @@ Bool
CreateDefaultStipple(int screenNum)
{
ScreenPtr pScreen;
- XID tmpval[3];
+ ChangeGCVal tmpval[3];
xRectangle rect;
CARD16 w, h;
GCPtr pgcScratch;
@@ -949,14 +949,16 @@ CreateDefaultStipple(int screenNum)
(*pScreen->CreatePixmap)(pScreen, w, h, 1, 0)))
return FALSE;
/* fill stipple with 1 */
- tmpval[0] = GXcopy; tmpval[1] = 1; tmpval[2] = FillSolid;
+ tmpval[0].val = GXcopy;
+ tmpval[1].val = 1;
+ tmpval[2].val = FillSolid;
pgcScratch = GetScratchGC(1, pScreen);
if (!pgcScratch)
{
(*pScreen->DestroyPixmap)(pScreen->PixmapPerDepth[0]);
return FALSE;
}
- (void)dixChangeGC(NullClient, pgcScratch, GCFunction|GCForeground|GCFillStyle, tmpval, NULL);
+ (void)dixChangeGC(NullClient, pgcScratch, GCFunction|GCForeground|GCFillStyle, NULL, tmpval);
ValidateGC((DrawablePtr)pScreen->PixmapPerDepth[0], pgcScratch);
rect.x = 0;
rect.y = 0;
diff --git a/dix/window.c b/dix/window.c
index 313593b47..595c60856 100644
--- a/dix/window.c
+++ b/dix/window.c
@@ -323,12 +323,12 @@ MakeRootTile(WindowPtr pWin)
FatalError("could not create root tile");
{
- CARD32 attributes[2];
+ ChangeGCVal attributes[2];
- attributes[0] = pScreen->whitePixel;
- attributes[1] = pScreen->blackPixel;
+ attributes[0].val = pScreen->whitePixel;
+ attributes[1].val = pScreen->blackPixel;
- (void)dixChangeGC(NullClient, pGC, GCForeground | GCBackground, attributes, NULL);
+ (void)dixChangeGC(NullClient, pGC, GCForeground | GCBackground, NULL, attributes);
}
ValidateGC((DrawablePtr)pWin->background.pixmap, pGC);