Fix depth detection anddisabling of XShm support. Now that we get depth right, we no longer disable XShm though. Lubomir Rintel <lkundrak@v3.sk> --- koules1.4/xlib/init.c.shm 2007-10-28 02:37:54.000000000 +0200 +++ koules1.4/xlib/init.c 2007-10-28 02:38:49.000000000 +0200 @@ -374,32 +374,42 @@ 32, TrueColor, &vinfo_return) == True) { useprivate = 0; +#ifdef MITSHM bpp = 4; +#endif } else if (XMatchVisualInfo (dp, DefaultScreen (dp), 24, TrueColor, &vinfo_return) == True) { useprivate = 0; +#ifdef MITSHM bpp = 4; +#endif } else if (XMatchVisualInfo (dp, DefaultScreen (dp), 16, TrueColor, &vinfo_return) == True) { useprivate = 0; +#ifdef MITSHM bpp = 2; +#endif } else if (XMatchVisualInfo (dp, DefaultScreen (dp), 15, TrueColor, &vinfo_return) == True) { useprivate = 0; +#ifdef MITSHM bpp = 2; +#endif } else if (XMatchVisualInfo (dp, DefaultScreen (dp), 8, GrayScale, &vinfo_return) == True) { useprivate = 0; monochrome = 1; +#ifdef MITSHM bpp = 2; +#endif } else { @@ -411,8 +427,11 @@ initialize (char **argv, int argc) } } else +#ifdef MITSHM bpp = 1; - depth = vinfo_return.depth; +#endif + if (depth = vinfo_return.depth > 24) + depth = 24; #ifdef MITSHM /* Make sure all is destroyed if killed off */