chip@alex.UUCP (Edward E Fraser Jr.) (03/02/89)
A few colleagues of mine and I who have in the process of
porting X11.3 to our system have come across something
in dix MakeRootTile that we were wondering about. The server
appears to set the forground pixel to whitepixel and the
background pixel to blackpixel. This means the tiling
for the background root window will be reverse video upon
initialization. Is this right or are we confused? If so, was
this originally done on purpose ?
server/dix/window.c:
static void
MakeRootTile(pWin)
WindowPtr pWin;
{
...
pGC = GetScratchGC(pScreen->rootDepth, pScreen);
{
CARD32 attributes[2];
attributes[0] = pScreen->whitePixel;
attributes[1] = pScreen->blackPixel;
ChangeGC(pGC, GCForeground | GCBackground, attributes);
}
...
}
server/dix/gc.c:
int
DoChangeGC(pGC, mask, pval, fPointer)
...
{
...
while (mask && !error)
{
index = (BITS32) lowbit (mask);
mask &= ~index;
pGC->stateChanges |= index;
switch (index)
{
...
case GCForeground:
pGC->fgPixel = *pval++;
break;
case GCBackground:
pGC->bgPixel = *pval++;
break;
...
}
}
}
Thanks for any replys in advance.
Chip Fraser
PCS Computer Systeme GmbH
Pfaelzer-Wald-Strasse 36
D-8000 Muenchen 90
West Germany
email: unido!pcsbst!chip
pyramid!pcsbst!chip