summaryrefslogtreecommitdiff
path: root/dbe/dbe.c
diff options
context:
space:
mode:
authorJamey Sharp <jamey@minilop.net>2010-05-06 21:39:43 -0700
committerJamey Sharp <jamey@minilop.net>2010-05-12 18:09:55 -0700
commit65cedf39054cf3a1e695e84ac228cce9e8d48097 (patch)
tree9a0b41cf70562a6e9e06263486f2fcf1552da46a /dbe/dbe.c
parentafcbbd6dfea51c5b0adca0d720edc02ba0c2dc16 (diff)
Kill DoChangeGC 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. Signed-off-by: Jamey Sharp <jamey@minilop.net> Reviewed-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'dbe/dbe.c')
-rw-r--r--dbe/dbe.c22
1 files changed, 8 insertions, 14 deletions
diff --git a/dbe/dbe.c b/dbe/dbe.c
index 1cda9f556..1d14bb38a 100644
--- a/dbe/dbe.c
+++ b/dbe/dbe.c
@@ -1239,7 +1239,7 @@ SProcDbeDispatch(ClientPtr client)
static Bool
DbeSetupBackgroundPainter(WindowPtr pWin, GCPtr pGC)
{
- pointer gcvalues[4];
+ ChangeGCVal gcvalues[4];
int ts_x_origin, ts_y_origin;
PixUnion background;
int backgroundState;
@@ -1265,16 +1265,16 @@ DbeSetupBackgroundPainter(WindowPtr pWin, GCPtr pGC)
switch (backgroundState)
{
case BackgroundPixel:
- gcvalues[0] = (pointer)background.pixel;
- gcvalues[1] = (pointer)FillSolid;
+ gcvalues[0].val = background.pixel;
+ gcvalues[1].val = FillSolid;
gcmask = GCForeground|GCFillStyle;
break;
case BackgroundPixmap:
- gcvalues[0] = (pointer)FillTiled;
- gcvalues[1] = (pointer)background.pixmap;
- gcvalues[2] = (pointer)(long)ts_x_origin;
- gcvalues[3] = (pointer)(long)ts_y_origin;
+ gcvalues[0].val = FillTiled;
+ gcvalues[1].ptr = background.pixmap;
+ gcvalues[2].val = ts_x_origin;
+ gcvalues[3].val = ts_y_origin;
gcmask = GCFillStyle|GCTile|GCTileStipXOrigin|GCTileStipYOrigin;
break;
@@ -1283,13 +1283,7 @@ DbeSetupBackgroundPainter(WindowPtr pWin, GCPtr pGC)
return(FALSE);
}
- if (DoChangeGC(pGC, gcmask, (XID *)gcvalues, TRUE) != 0)
- {
- return(FALSE);
- }
-
- return(TRUE);
-
+ return dixChangeGC(NullClient, pGC, gcmask, NULL, gcvalues) == 0;
} /* DbeSetupBackgroundPainter() */