Index: mi/miinitext.c =================================================================== RCS file: /cvs/xorg/xc/programs/Xserver/mi/miinitext.c,v retrieving revision 1.1.4.8 diff -u -r1.1.4.8 miinitext.c --- a/mi/miinitext.c 21 Apr 2004 23:24:20 -0000 1.1.4.8 +++ b/mi/miinitext.c 25 Apr 2004 21:04:59 -0000 @@ -69,7 +69,6 @@ #undef PANORAMIX #undef RES #undef XIE -#undef GLXEXT /* not yet */ #undef XINPUT #undef XV #undef SCREENSAVER @@ -379,14 +378,12 @@ #endif #endif #ifdef GLXEXT -#ifndef XPRINT /* we don't want Glx in the Xprint server */ #ifndef __DARWIN__ GlxExtensionInit(); #else DarwinGlxExtensionInit(); #endif #endif -#endif #ifdef DPSEXT #ifndef XPRINT DPSExtensionInit(); @@ -408,14 +405,12 @@ { miResetInitVisuals(); #ifdef GLXEXT -#ifndef XPRINT #ifndef __DARWIN__ GlxWrapInitVisuals(&miInitVisualsProc); #else DarwinGlxWrapInitVisuals(&miInitVisualsProc); #endif #endif -#endif } #else /* XFree86LOADER */ Index: Xprint/Imakefile =================================================================== RCS file: /cvs/xorg/xc/programs/Xserver/Xprint/Imakefile,v retrieving revision 1.1.4.6 diff -u -r1.1.4.6 Imakefile --- a/Xprint/Imakefile 21 Apr 2004 10:03:35 -0000 1.1.4.6 +++ b/Xprint/Imakefile 25 Apr 2004 21:04:59 -0000 @@ -105,7 +105,7 @@ SpecialCObjectRule(ddxInit,$(ICONFIGFILES),$(PO_DEFINES) $(OS_DEFINES) $(EXT_DEFINES)) #if XprtServer && (PrintOnlyServer || defined(PrintServerExtensions)) LinkSourceFile(miinitext.c,$(SERVERSRC)/mi) -SpecialCObjectRule(miinitext,$(ICONFIGFILES),$(PO_DEFINES) $(OS_DEFINES) $(XPEXT_DEFINES) -DXPRINT -UGLXEXT) +SpecialCObjectRule(miinitext,$(ICONFIGFILES),$(PO_DEFINES) $(OS_DEFINES) $(XPEXT_DEFINES) -DXPRINT) #if PrintOnlyServer LinkSourceFile(dpmsstubs.c,$(SERVERSRC)/Xext) LinkSourceFile(dpmsproc.h,$(SERVERSRC)/Xext) Index: Xprint/ps/Imakefile =================================================================== RCS file: /cvs/xorg/xc/programs/Xserver/Xprint/ps/Imakefile,v retrieving revision 1.1.4.3 diff -u -r1.1.4.3 Imakefile --- a/Xprint/ps/Imakefile 21 Apr 2004 10:03:37 -0000 1.1.4.3 +++ b/Xprint/ps/Imakefile 25 Apr 2004 21:04:59 -0000 @@ -58,7 +58,7 @@ XCOMM BM_CACHE disabled because it causes PostScript errors XCOMM (see http://xprint.mozdev.org/bugs/show_bug.cgi?id=1489) XCOMM DEFINES = -DXP_PSTEXT -DBM_CACHE $(VENDOR_DEFINES) $(TTF2PT1_DEFINES) $(FT_DEFINES) - DEFINES = -UXFree86LOADER -DXP_PSTEXT -D_XP_PRINT_SERVER_ $(VENDOR_DEFINES) $(TTF2PT1_DEFINES) $(FT_DEFINES) + DEFINES = -UXFree86LOADER -DXP_PSTEXT -D_XP_PRINT_SERVER_ $(VENDOR_DEFINES) $(TTF2PT1_DEFINES) $(FT_DEFINES) $(EXT_DEFINES) INCLUDES = -I. -I../../cfb -I../../mi -I../../mfb -I$(LIBSRC) \ -I$(XINCLUDESRC) -I../../include -I.. -I$(TOP)/include \ Index: Xprint/ps/PsInit.c =================================================================== RCS file: /cvs/xorg/xc/programs/Xserver/Xprint/ps/PsInit.c,v retrieving revision 1.1.4.4 diff -u -r1.1.4.4 PsInit.c --- a/Xprint/ps/PsInit.c 21 Apr 2004 10:03:37 -0000 1.1.4.4 +++ b/Xprint/ps/PsInit.c 25 Apr 2004 21:04:59 -0000 @@ -83,6 +83,7 @@ #include "Ps.h" #include "mi.h" +#include "micmap.h" #include "AttrValid.h" #include "../../mfb/mfb.h" @@ -100,6 +101,10 @@ int PsPixmapPrivateIndex; int PsWindowPrivateIndex; +#ifdef GLXEXT +extern void GlxWrapInitVisuals(miInitVisualsProcPtr *); +#endif + Bool InitializePsDriver(ndx, pScreen, argc, argv) int ndx; @@ -118,6 +123,8 @@ int nDepths; VisualPtr visuals; DepthPtr depths; + VisualID defaultVisual; + int rootDepth; /* * Register this driver's InitContext function with the print @@ -203,27 +210,34 @@ depths[0].depth = 24; depths[0].numVids = 1; - depths[0].vids = &visuals[0].vid; + depths[0].vids = (VisualID *)xalloc(sizeof(VisualID)); + depths[0].vids[0] = visuals[0].vid; depths[1].depth = 8; depths[1].numVids = 1; - depths[1].vids = &visuals[1].vid; + depths[1].vids = (VisualID *)xalloc(sizeof(VisualID)); + depths[1].vids[0] = visuals[1].vid; -/* THE FOLLOWING CAUSES SERVER DEFAULT VISUAL TO BE 24 BIT */ -/* miScreenInit(pScreen, (pointer)0, - pScreen->width, pScreen->height, - pScreen->width / (pScreen->mmWidth / 25.40), - pScreen->height / (pScreen->mmHeight / 25.40), - 0, 24, nDepths, - depths, visuals[1].vid, nVisuals, visuals); */ + defaultVisual = visuals[1].vid; + rootDepth = visuals[1].nplanes; + +#ifdef GLXEXT + { + miInitVisualsProcPtr proc = NULL; + + GlxWrapInitVisuals(&proc); + /* GlxInitVisuals ignores the last three arguments. */ + proc(&visuals, &depths, &nVisuals, &nDepths, + &rootDepth, &defaultVisual, 0, 0, 0); + } +#endif -/* THE FOLLOWING CAUSES SERVER DEFAULT VISUAL TO BE 8 BIT */ miScreenInit(pScreen, (pointer)0, pScreen->width, pScreen->height, (int) (pScreen->width / (pScreen->mmWidth / 25.40)), (int) (pScreen->height / (pScreen->mmHeight / 25.40)), - 0, 8, nDepths, - depths, visuals[1].vid, nVisuals, visuals); + 0, rootDepth, nDepths, + depths, defaultVisual, nVisuals, visuals); if( cfbCreateDefColormap(pScreen)==FALSE ) return FALSE;