diff --git a/hw/xnest/Display.c b/hw/xnest/Display.c index 931369469..a88de20ea 100644 --- a/hw/xnest/Display.c +++ b/hw/xnest/Display.c @@ -28,7 +28,6 @@ is" without express or implied warranty. #include "scrnintstr.h" #include "servermd.h" -#include "Xnest.h" #include "xnest-xcb.h" #include "Display.h" @@ -39,10 +38,7 @@ is" without express or implied warranty. #include "screensaver" Display *xnestDisplay = NULL; -XVisualInfo *xnestVisuals; -int xnestNumVisuals; Colormap *xnestDefaultColormaps; -static uint16_t xnestNumDefaultColormaps; int xnestNumPixmapFormats; Drawable xnestDefaultDrawables[MAXDEPTH + 1]; Pixmap xnestIconBitmap; @@ -62,8 +58,6 @@ x_io_error_handler(Display * dpy) void xnestOpenDisplay(int argc, char *argv[]) { - XVisualInfo vi; - long mask; int i; if (!xnestDoFullGeneration) @@ -83,24 +77,6 @@ xnestOpenDisplay(int argc, char *argv[]) xnest_upstream_setup(); - mask = VisualScreenMask; - vi.screen = xnestUpstreamInfo.screenId; - xnestVisuals = XGetVisualInfo(xnestDisplay, mask, &vi, &xnestNumVisuals); - if (xnestNumVisuals == 0 || xnestVisuals == NULL) - FatalError("Unable to find any visuals.\n"); - - xnestNumDefaultColormaps = xnestNumVisuals; - xnestDefaultColormaps = calloc(xnestNumDefaultColormaps, - sizeof(Colormap)); - for (i = 0; i < xnestNumDefaultColormaps; i++) { - xnestDefaultColormaps[i] = xcb_generate_id(xnestUpstreamInfo.conn); - xcb_create_colormap(xnestUpstreamInfo.conn, - XCB_COLORMAP_ALLOC_NONE, - xnestDefaultColormaps[i], - xnestUpstreamInfo.screenInfo->root, - xnestVisuals[i].visual->visualid); - } - if (xnestParentWindow != (Window) 0) xnestEventMask = XCB_EVENT_MASK_STRUCTURE_NOTIFY; else @@ -184,7 +160,5 @@ xnestCloseDisplay(void) xnestVisualMap = NULL; xnestNumVisualMap = 0; - free(xnestDefaultColormaps); - XFree(xnestVisuals); XCloseDisplay(xnestDisplay); } diff --git a/hw/xnest/Display.h b/hw/xnest/Display.h index 6e02c666b..70f18b3de 100644 --- a/hw/xnest/Display.h +++ b/hw/xnest/Display.h @@ -25,10 +25,6 @@ is" without express or implied warranty. #define MAXVISUALSPERDEPTH 256 extern Display *xnestDisplay; -extern XVisualInfo *xnestVisuals; -extern int xnestNumVisuals; -extern Colormap *xnestDefaultColormaps; -extern int xnestNumDefaultClormaps; extern int xnestNumPixmapFormats; extern Drawable xnestDefaultDrawables[MAXDEPTH + 1]; extern Pixmap xnestIconBitmap;