Index: xc/programs/Xserver/Xprint/ps/Ps.h =================================================================== RCS file: /cvs/xorg/xc/programs/Xserver/Xprint/ps/Ps.h,v retrieving revision 1.2 diff -u -2 -0 -r1.2 Ps.h --- xc/programs/Xserver/Xprint/ps/Ps.h 23 Apr 2004 18:57:56 -0000 1.2 +++ xc/programs/Xserver/Xprint/ps/Ps.h 12 Jul 2004 19:37:42 -0000 @@ -229,41 +229,40 @@ } DisplayElmRec; typedef DisplayElmRec *DisplayElmPtr; typedef struct _DisplayListRec { struct _DisplayListRec *next; int nelms; DisplayElmRec elms[DPY_BLOCKSIZE]; } DisplayListRec; typedef DisplayListRec *DisplayListPtr; /* * Private structures */ typedef struct { XrmDatabase resDB; - ColormapPtr CMap; Bool (*DestroyWindow)(WindowPtr); } PsScreenPrivRec, *PsScreenPrivPtr; typedef struct PsFontTypeInfoRec PsFontTypeInfoRec; /* Structure to hold information about one font on disk * Notes: * - multiple XLFD names can refer to the same |PsFontTypeInfoRec| (if * they all use the same font on the disk) * - the FreeType font download code uses multiple |PsFontTypeInfoRec| * records for one font on disk if they differ in the encoding being * used (this is an exception from the * 'one-|PsFontTypeInfoRec|-per-font-on-disk'-design; maybe it it is better * to rework that in a later step and add a new per-encoding structure). */ struct PsFontTypeInfoRec { PsFontTypeInfoRec *next; /* Next record in list... */ char *adobe_ps_name; /* PostScript font name (from the * "_ADOBE_POSTSCRIPT_FONTNAME" atom) */ Index: xc/programs/Xserver/Xprint/ps/PsColor.c =================================================================== RCS file: /cvs/xorg/xc/programs/Xserver/Xprint/ps/PsColor.c,v retrieving revision 1.2 diff -u -2 -0 -r1.2 PsColor.c --- xc/programs/Xserver/Xprint/ps/PsColor.c 23 Apr 2004 18:57:56 -0000 1.2 +++ xc/programs/Xserver/Xprint/ps/PsColor.c 12 Jul 2004 19:37:42 -0000 @@ -103,43 +103,40 @@ pColor->green[i].co.local.green = rgb; pColor->green[i].co.local.blue = 0; pColor->blue[i].fShared = FALSE; pColor->blue[i].co.local.red = 0; pColor->blue[i].co.local.green = 0; pColor->blue[i].co.local.blue = rgb; } } return TRUE; } void PsDestroyColormap(ColormapPtr pColor) { } void PsInstallColormap(ColormapPtr pColor) { - PsScreenPrivPtr pPriv = - (PsScreenPrivPtr)pColor->pScreen->devPrivates[PsScreenPrivateIndex].ptr; - pPriv->CMap = pColor; } void PsUninstallColormap(ColormapPtr pColor) { } int PsListInstalledColormaps( ScreenPtr pScreen, XID *pCmapList) { return 0; } void PsStoreColors( ColormapPtr pColor, int ndef, xColorItem *pdefs) Index: xc/programs/Xserver/Xprint/ps/PsGC.c =================================================================== RCS file: /cvs/xorg/xc/programs/Xserver/Xprint/ps/PsGC.c,v retrieving revision 1.2 diff -u -2 -0 -r1.2 PsGC.c --- xc/programs/Xserver/Xprint/ps/PsGC.c 23 Apr 2004 18:57:56 -0000 1.2 +++ xc/programs/Xserver/Xprint/ps/PsGC.c 12 Jul 2004 19:37:42 -0000 @@ -139,47 +139,53 @@ PsGetDrawablePrivateStuff( DrawablePtr pDrawable, GC *gc, unsigned long *valid, PsOutPtr *psOut, ColormapPtr *cMap) { XpContextPtr pCon; PsContextPrivPtr cPriv; PsScreenPrivPtr sPriv; switch(pDrawable->type) { case DRAWABLE_PIXMAP: return FALSE; case DRAWABLE_WINDOW: pCon = PsGetContextFromWindow((WindowPtr)pDrawable); if( pCon==NULL ) return FALSE; else { + Colormap c; + ColormapPtr cmap; + + c = wColormap((WindowPtr)pDrawable); + cmap = (ColormapPtr)LookupIDByType(c, RT_COLORMAP); + cPriv = pCon->devPrivates[PsContextPrivateIndex].ptr; sPriv = (PsScreenPrivPtr) pDrawable->pScreen->devPrivates[PsScreenPrivateIndex].ptr; *gc = cPriv->lastGC; *valid = cPriv->validGC; *psOut = cPriv->pPsOut; - *cMap = sPriv->CMap; + *cMap = cmap; return TRUE; } default: return FALSE; } } PsContextPrivPtr PsGetPsContextPriv( DrawablePtr pDrawable ) { XpContextPtr pCon; PsContextPrivPtr cPriv; switch(pDrawable->type) { case DRAWABLE_PIXMAP: return FALSE; case DRAWABLE_WINDOW: pCon = PsGetContextFromWindow((WindowPtr)pDrawable); if (pCon != NULL)