Fix for http://freedesktop.org/bugzilla/show_bug.cgi?id=858 - Fixing the
problem that clients cannot use the TrueColor visual without calling |XInstallColormap();|.
This commit is contained in:
parent
7f9e263658
commit
0addd0d499
|
@ -246,7 +246,6 @@ typedef DisplayListRec *DisplayListPtr;
|
||||||
typedef struct
|
typedef struct
|
||||||
{
|
{
|
||||||
XrmDatabase resDB;
|
XrmDatabase resDB;
|
||||||
ColormapPtr CMap;
|
|
||||||
Bool (*DestroyWindow)(WindowPtr);
|
Bool (*DestroyWindow)(WindowPtr);
|
||||||
} PsScreenPrivRec, *PsScreenPrivPtr;
|
} PsScreenPrivRec, *PsScreenPrivPtr;
|
||||||
|
|
||||||
|
|
|
@ -120,9 +120,6 @@ PsDestroyColormap(ColormapPtr pColor)
|
||||||
void
|
void
|
||||||
PsInstallColormap(ColormapPtr pColor)
|
PsInstallColormap(ColormapPtr pColor)
|
||||||
{
|
{
|
||||||
PsScreenPrivPtr pPriv =
|
|
||||||
(PsScreenPrivPtr)pColor->pScreen->devPrivates[PsScreenPrivateIndex].ptr;
|
|
||||||
pPriv->CMap = pColor;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
|
@ -156,13 +156,19 @@ PsGetDrawablePrivateStuff(
|
||||||
if( pCon==NULL ) return FALSE;
|
if( pCon==NULL ) return FALSE;
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
Colormap c;
|
||||||
|
ColormapPtr cmap;
|
||||||
|
|
||||||
|
c = wColormap((WindowPtr)pDrawable);
|
||||||
|
cmap = (ColormapPtr)LookupIDByType(c, RT_COLORMAP);
|
||||||
|
|
||||||
cPriv = pCon->devPrivates[PsContextPrivateIndex].ptr;
|
cPriv = pCon->devPrivates[PsContextPrivateIndex].ptr;
|
||||||
sPriv = (PsScreenPrivPtr)
|
sPriv = (PsScreenPrivPtr)
|
||||||
pDrawable->pScreen->devPrivates[PsScreenPrivateIndex].ptr;
|
pDrawable->pScreen->devPrivates[PsScreenPrivateIndex].ptr;
|
||||||
*gc = cPriv->lastGC;
|
*gc = cPriv->lastGC;
|
||||||
*valid = cPriv->validGC;
|
*valid = cPriv->validGC;
|
||||||
*psOut = cPriv->pPsOut;
|
*psOut = cPriv->pPsOut;
|
||||||
*cMap = sPriv->CMap;
|
*cMap = cmap;
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
default:
|
default:
|
||||||
|
|
Loading…
Reference in New Issue