mirror of
https://github.com/X11Libre/xserver.git
synced 2026-04-14 17:18:09 +00:00
mi: use NULL instead of NullClient
No need to have another name for NULL, we can use NULL directly. Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
This commit is contained in:
committed by
Enrico Weigelt
parent
ad86b5b6ae
commit
236e8e4656
@@ -986,7 +986,7 @@ miWideArc(DrawablePtr pDraw, GCPtr pGC, int narcs, xArc * parcs)
|
||||
gcvals[3].val = pGC->lineWidth;
|
||||
gcvals[4].val = pGC->capStyle;
|
||||
gcvals[5].val = pGC->joinStyle;
|
||||
ChangeGC(NullClient, pGCTo, GCFunction |
|
||||
ChangeGC(NULL, pGCTo, GCFunction |
|
||||
GCForeground | GCBackground | GCLineWidth |
|
||||
GCCapStyle | GCJoinStyle, gcvals);
|
||||
}
|
||||
@@ -1024,12 +1024,12 @@ miWideArc(DrawablePtr pDraw, GCPtr pGC, int narcs, xArc * parcs)
|
||||
|
||||
if (iphase == 1) {
|
||||
gcval.val = bg;
|
||||
ChangeGC(NullClient, pGC, GCForeground, &gcval);
|
||||
ChangeGC(NULL, pGC, GCForeground, &gcval);
|
||||
ValidateGC(pDraw, pGC);
|
||||
}
|
||||
else if (pGC->lineStyle == LineDoubleDash) {
|
||||
gcval.val = fg;
|
||||
ChangeGC(NullClient, pGC, GCForeground, &gcval);
|
||||
ChangeGC(NULL, pGC, GCForeground, &gcval);
|
||||
ValidateGC(pDraw, pGC);
|
||||
}
|
||||
for (i = 0; i < polyArcs[iphase].narcs; i++) {
|
||||
|
||||
@@ -245,7 +245,7 @@ miDCRealize(ScreenPtr pScreen, CursorPtr pCursor)
|
||||
0, 0, pCursor->bits->width, pCursor->bits->height,
|
||||
0, XYPixmap, (char *) pCursor->bits->source);
|
||||
gcvals.val = GXand;
|
||||
ChangeGC(NullClient, pGC, GCFunction, &gcvals);
|
||||
ChangeGC(NULL, pGC, GCFunction, &gcvals);
|
||||
ValidateGC((DrawablePtr) sourceBits, pGC);
|
||||
(*pGC->ops->PutImage) ((DrawablePtr) sourceBits, pGC, 1,
|
||||
0, 0, pCursor->bits->width, pCursor->bits->height,
|
||||
@@ -253,13 +253,13 @@ miDCRealize(ScreenPtr pScreen, CursorPtr pCursor)
|
||||
|
||||
/* mask bits -- pCursor->mask & ~pCursor->source */
|
||||
gcvals.val = GXcopy;
|
||||
ChangeGC(NullClient, pGC, GCFunction, &gcvals);
|
||||
ChangeGC(NULL, pGC, GCFunction, &gcvals);
|
||||
ValidateGC((DrawablePtr) maskBits, pGC);
|
||||
(*pGC->ops->PutImage) ((DrawablePtr) maskBits, pGC, 1,
|
||||
0, 0, pCursor->bits->width, pCursor->bits->height,
|
||||
0, XYPixmap, (char *) pCursor->bits->mask);
|
||||
gcvals.val = GXandInverted;
|
||||
ChangeGC(NullClient, pGC, GCFunction, &gcvals);
|
||||
ChangeGC(NULL, pGC, GCFunction, &gcvals);
|
||||
ValidateGC((DrawablePtr) maskBits, pGC);
|
||||
(*pGC->ops->PutImage) ((DrawablePtr) maskBits, pGC, 1,
|
||||
0, 0, pCursor->bits->width, pCursor->bits->height,
|
||||
@@ -294,7 +294,7 @@ miDCPutBits(DrawablePtr pDrawable,
|
||||
|
||||
if (sourceGC->fgPixel != source) {
|
||||
gcval.val = source;
|
||||
ChangeGC(NullClient, sourceGC, GCForeground, &gcval);
|
||||
ChangeGC(NULL, sourceGC, GCForeground, &gcval);
|
||||
}
|
||||
if (sourceGC->serialNumber != pDrawable->serialNumber)
|
||||
ValidateGC(pDrawable, sourceGC);
|
||||
@@ -312,7 +312,7 @@ miDCPutBits(DrawablePtr pDrawable,
|
||||
x, y);
|
||||
if (maskGC->fgPixel != mask) {
|
||||
gcval.val = mask;
|
||||
ChangeGC(NullClient, maskGC, GCForeground, &gcval);
|
||||
ChangeGC(NULL, maskGC, GCForeground, &gcval);
|
||||
}
|
||||
if (maskGC->serialNumber != pDrawable->serialNumber)
|
||||
ValidateGC(pDrawable, maskGC);
|
||||
|
||||
@@ -529,7 +529,7 @@ miPaintWindow(WindowPtr pWin, RegionPtr prgn, int what)
|
||||
return;
|
||||
}
|
||||
|
||||
ChangeGC(NullClient, pGC, gcmask, gcval);
|
||||
ChangeGC(NULL, pGC, gcmask, gcval);
|
||||
ValidateGC(drawable, pGC);
|
||||
|
||||
numRects = RegionNumRects(prgn);
|
||||
@@ -562,9 +562,9 @@ miClearDrawable(DrawablePtr pDraw, GCPtr pGC)
|
||||
rect.y = 0;
|
||||
rect.width = pDraw->width;
|
||||
rect.height = pDraw->height;
|
||||
ChangeGC(NullClient, pGC, GCForeground, &bg);
|
||||
ChangeGC(NULL, pGC, GCForeground, &bg);
|
||||
ValidateGC(pDraw, pGC);
|
||||
(*pGC->ops->PolyFillRect) (pDraw, pGC, 1, &rect);
|
||||
ChangeGC(NullClient, pGC, GCForeground, &fg);
|
||||
ChangeGC(NULL, pGC, GCForeground, &fg);
|
||||
ValidateGC(pDraw, pGC);
|
||||
}
|
||||
|
||||
@@ -126,8 +126,7 @@ miPolyGlyphBlt(DrawablePtr pDrawable, GCPtr pGC, int x, int y, unsigned int ngly
|
||||
gcvals[1].val = 1;
|
||||
gcvals[2].val = 0;
|
||||
|
||||
ChangeGC(NullClient, pGCtmp, GCFunction | GCForeground | GCBackground,
|
||||
gcvals);
|
||||
ChangeGC(NULL, pGCtmp, GCFunction | GCForeground | GCBackground, gcvals);
|
||||
|
||||
nbyLine = BitmapBytePad(width);
|
||||
pbits = calloc(height, nbyLine);
|
||||
@@ -211,13 +210,13 @@ miImageGlyphBlt(DrawablePtr pDrawable, GCPtr pGC, int x, int y, unsigned int ngl
|
||||
gcvals[0].val = GXcopy;
|
||||
gcvals[1].val = pGC->bgPixel;
|
||||
gcvals[2].val = FillSolid;
|
||||
ChangeGC(NullClient, pGC, GCFunction | GCForeground | GCFillStyle, gcvals);
|
||||
ChangeGC(NULL, pGC, GCFunction | GCForeground | GCFillStyle, gcvals);
|
||||
ValidateGC(pDrawable, pGC);
|
||||
(*pGC->ops->PolyFillRect) (pDrawable, pGC, 1, &backrect);
|
||||
|
||||
/* put down the glyphs */
|
||||
gcvals[0].val = oldFG;
|
||||
ChangeGC(NullClient, pGC, GCForeground, gcvals);
|
||||
ChangeGC(NULL, pGC, GCForeground, gcvals);
|
||||
ValidateGC(pDrawable, pGC);
|
||||
(*pGC->ops->PolyGlyphBlt) (pDrawable, pGC, x, y, nglyph, ppci, pglyphBase);
|
||||
|
||||
@@ -225,7 +224,7 @@ miImageGlyphBlt(DrawablePtr pDrawable, GCPtr pGC, int x, int y, unsigned int ngl
|
||||
gcvals[0].val = oldAlu;
|
||||
gcvals[1].val = oldFG;
|
||||
gcvals[2].val = oldFS;
|
||||
ChangeGC(NullClient, pGC, GCFunction | GCForeground | GCFillStyle, gcvals);
|
||||
ChangeGC(NULL, pGC, GCFunction | GCForeground | GCFillStyle, gcvals);
|
||||
ValidateGC(pDrawable, pGC);
|
||||
|
||||
}
|
||||
|
||||
@@ -94,7 +94,7 @@ miPolyPoint(DrawablePtr pDrawable, GCPtr pGC, int mode, /* Origin or Previous */
|
||||
fsOld.val = pGC->fillStyle;
|
||||
fsNew.val = FillSolid;
|
||||
if (pGC->fillStyle != FillSolid) {
|
||||
ChangeGC(NullClient, pGC, GCFillStyle, &fsNew);
|
||||
ChangeGC(NULL, pGC, GCFillStyle, &fsNew);
|
||||
ValidateGC(pDrawable, pGC);
|
||||
}
|
||||
pwidth = pwidthInit;
|
||||
@@ -103,7 +103,7 @@ miPolyPoint(DrawablePtr pDrawable, GCPtr pGC, int mode, /* Origin or Previous */
|
||||
(*pGC->ops->FillSpans) (pDrawable, pGC, npt, pptInit, pwidthInit, FALSE);
|
||||
|
||||
if (fsOld.val != FillSolid) {
|
||||
ChangeGC(NullClient, pGC, GCFillStyle, &fsOld);
|
||||
ChangeGC(NULL, pGC, GCFillStyle, &fsOld);
|
||||
ValidateGC(pDrawable, pGC);
|
||||
}
|
||||
free(pwidthInit);
|
||||
|
||||
@@ -616,7 +616,7 @@ fillSpans(DrawablePtr pDrawable, GCPtr pGC, unsigned long pixel, Spans * spans,
|
||||
oldPixel.val = pGC->fgPixel;
|
||||
if (pixel != oldPixel.val) {
|
||||
tmpPixel.val = (XID) pixel;
|
||||
ChangeGC(NullClient, pGC, GCForeground, &tmpPixel);
|
||||
ChangeGC(NULL, pGC, GCForeground, &tmpPixel);
|
||||
ValidateGC(pDrawable, pGC);
|
||||
}
|
||||
(*pGC->ops->FillSpans) (pDrawable, pGC, spans->count, spans->points,
|
||||
@@ -624,7 +624,7 @@ fillSpans(DrawablePtr pDrawable, GCPtr pGC, unsigned long pixel, Spans * spans,
|
||||
free(spans->widths);
|
||||
free(spans->points);
|
||||
if (pixel != oldPixel.val) {
|
||||
ChangeGC(NullClient, pGC, GCForeground, &oldPixel);
|
||||
ChangeGC(NULL, pGC, GCForeground, &oldPixel);
|
||||
ValidateGC(pDrawable, pGC);
|
||||
}
|
||||
}
|
||||
@@ -746,12 +746,12 @@ miFillRectPolyHelper(DrawablePtr pDrawable,
|
||||
oldPixel.val = pGC->fgPixel;
|
||||
if (pixel != oldPixel.val) {
|
||||
tmpPixel.val = (XID) pixel;
|
||||
ChangeGC(NullClient, pGC, GCForeground, &tmpPixel);
|
||||
ChangeGC(NULL, pGC, GCForeground, &tmpPixel);
|
||||
ValidateGC(pDrawable, pGC);
|
||||
}
|
||||
(*pGC->ops->PolyFillRect) (pDrawable, pGC, 1, &rect);
|
||||
if (pixel != oldPixel.val) {
|
||||
ChangeGC(NullClient, pGC, GCForeground, &oldPixel);
|
||||
ChangeGC(NULL, pGC, GCForeground, &oldPixel);
|
||||
ValidateGC(pDrawable, pGC);
|
||||
}
|
||||
}
|
||||
@@ -1870,13 +1870,13 @@ miCleanupSpanData(DrawablePtr pDrawable, GCPtr pGC, SpanDataPtr spanData)
|
||||
pixel.val = pGC->bgPixel;
|
||||
oldPixel.val = pGC->fgPixel;
|
||||
if (pixel.val != oldPixel.val) {
|
||||
ChangeGC(NullClient, pGC, GCForeground, &pixel);
|
||||
ChangeGC(NULL, pGC, GCForeground, &pixel);
|
||||
ValidateGC(pDrawable, pGC);
|
||||
}
|
||||
miFillUniqueSpanGroup(pDrawable, pGC, &spanData->bgGroup);
|
||||
miFreeSpanGroup(&spanData->bgGroup);
|
||||
if (pixel.val != oldPixel.val) {
|
||||
ChangeGC(NullClient, pGC, GCForeground, &oldPixel);
|
||||
ChangeGC(NULL, pGC, GCForeground, &oldPixel);
|
||||
ValidateGC(pDrawable, pGC);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -82,7 +82,7 @@ typedef struct _LineFace {
|
||||
if (pixel != oldPixel) { \
|
||||
ChangeGCVal gcval; \
|
||||
gcval.val = pixel; \
|
||||
ChangeGC (NullClient, pGC, GCForeground, &gcval); \
|
||||
ChangeGC (NULL, pGC, GCForeground, &gcval); \
|
||||
ValidateGC (pDrawable, pGC); \
|
||||
} \
|
||||
}
|
||||
@@ -90,7 +90,7 @@ typedef struct _LineFace {
|
||||
if (pixel != oldPixel) { \
|
||||
ChangeGCVal gcval; \
|
||||
gcval.val = oldPixel; \
|
||||
ChangeGC (NullClient, pGC, GCForeground, &gcval); \
|
||||
ChangeGC (NULL, pGC, GCForeground, &gcval); \
|
||||
ValidateGC (pDrawable, pGC); \
|
||||
} \
|
||||
}
|
||||
|
||||
@@ -729,7 +729,7 @@ miZeroPolyArc(DrawablePtr pDraw, GCPtr pGC, int narcs, xArc * parcs)
|
||||
ChangeGCVal gcval;
|
||||
|
||||
gcval.val = pGC->bgPixel;
|
||||
ChangeGC(NullClient, pGC, GCForeground, &gcval);
|
||||
ChangeGC(NULL, pGC, GCForeground, &gcval);
|
||||
ValidateGC(pDraw, pGC);
|
||||
}
|
||||
pts = &points[numPts >> 1];
|
||||
@@ -755,7 +755,7 @@ miZeroPolyArc(DrawablePtr pDraw, GCPtr pGC, int narcs, xArc * parcs)
|
||||
ChangeGCVal gcval;
|
||||
|
||||
gcval.val = fgPixel;
|
||||
ChangeGC(NullClient, pGC, GCForeground, &gcval);
|
||||
ChangeGC(NULL, pGC, GCForeground, &gcval);
|
||||
ValidateGC(pDraw, pGC);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user