+
+ if (info->depth == 8) {
+ vTemplate.screen = scrnum;
+ vTemplate.class = PseudoColor;
+ vTemplate.depth = 8;
+ visualList = XGetVisualInfo(DisplayOfScreen(screen),
+ VisualScreenMask |
+ VisualDepthMask |
+ VisualClassMask,
+ &vTemplate, &visualsMatched);
+
+ if (visualsMatched > 0) {
+ info->visual = visualList[0].visual;
+ info->depth = visualList[0].depth;
+
+ }
+ }
+ }
+
+ info->pixmap = XCreatePixmap(screen->display,
+ RootWindowOfScreen(screen),
+ 1, 1, info->depth);
+
+ if ((TK_CreateColormap == 0) &&
+ (info->visual == DefaultVisualOfScreen(screen))) {
+ info->colormap = DefaultColormapOfScreen(screen);
+ info->gc = DefaultGCOfScreen(screen);
+ } else {
+ info->colormap =
+ XCreateColormap(screen->display,
+ RootWindowOfScreen(screen),
+ info->visual, AllocNone);
+ info->gc =
+ XCreateGC(screen->display,
+ info->pixmap, 0, &values);