diff --git a/hw/xnest/Display.c b/hw/xnest/Display.c index 1e28d2f7a..7d8c5f69a 100644 --- a/hw/xnest/Display.c +++ b/hw/xnest/Display.c @@ -48,8 +48,6 @@ int *xnestDepths; int xnestNumDepths; XPixmapFormatValues *xnestPixmapFormats; int xnestNumPixmapFormats; -Pixel xnestBlackPixel; -Pixel xnestWhitePixel; Drawable xnestDefaultDrawables[MAXDEPTH + 1]; Pixmap xnestIconBitmap; Pixmap xnestScreenSaverPixmap; @@ -134,9 +132,6 @@ xnestOpenDisplay(int argc, char *argv[]) xnestPixmapFormats = XListPixmapFormats(xnestDisplay, &xnestNumPixmapFormats); - xnestBlackPixel = BlackPixel(xnestDisplay, xnestUpstreamInfo.screenId); - xnestWhitePixel = WhitePixel(xnestDisplay, xnestUpstreamInfo.screenId); - if (xnestParentWindow != (Window) 0) xnestEventMask = XCB_EVENT_MASK_STRUCTURE_NOTIFY; else @@ -184,8 +179,8 @@ xnestOpenDisplay(int argc, char *argv[]) (char *) screensaver_bits, screensaver_width, screensaver_height, - xnestWhitePixel, - xnestBlackPixel, + xnestUpstreamInfo.screenInfo->white_pixel, + xnestUpstreamInfo.screenInfo->black_pixel, DefaultDepth(xnestDisplay, xnestUpstreamInfo.screenId)); } diff --git a/hw/xnest/Display.h b/hw/xnest/Display.h index 6252ff964..a39337c85 100644 --- a/hw/xnest/Display.h +++ b/hw/xnest/Display.h @@ -32,8 +32,6 @@ extern int *xnestDepths; extern int xnestNumDepths; extern XPixmapFormatValues *xnestPixmapFormats; extern int xnestNumPixmapFormats; -extern Pixel xnestBlackPixel; -extern Pixel xnestWhitePixel; extern Drawable xnestDefaultDrawables[MAXDEPTH + 1]; extern Pixmap xnestIconBitmap; extern Pixmap xnestScreenSaverPixmap; diff --git a/hw/xnest/Screen.c b/hw/xnest/Screen.c index 0b70ae82d..4e20600dd 100644 --- a/hw/xnest/Screen.c +++ b/hw/xnest/Screen.c @@ -252,8 +252,8 @@ xnestOpenScreen(ScreenPtr pScreen, int argc, char *argv[]) pScreen->maxInstalledCmaps = MAXCMAPS; pScreen->backingStoreSupport = XCB_BACKING_STORE_NOT_USEFUL; pScreen->saveUnderSupport = XCB_BACKING_STORE_NOT_USEFUL; - pScreen->whitePixel = xnestWhitePixel; - pScreen->blackPixel = xnestBlackPixel; + pScreen->whitePixel = xnestUpstreamInfo.screenInfo->white_pixel; + pScreen->blackPixel = xnestUpstreamInfo.screenInfo->black_pixel; /* GCperDepth */ /* defaultStipple */ /* WindowPrivateLen */ @@ -342,7 +342,7 @@ xnestOpenScreen(ScreenPtr pScreen, int argc, char *argv[]) if (xnestDoFullGeneration) { valuemask = XCB_CW_BACK_PIXEL | XCB_CW_EVENT_MASK | XCB_CW_COLORMAP; - attributes.background_pixel = xnestWhitePixel; + attributes.background_pixel = xnestUpstreamInfo.screenInfo->white_pixel; attributes.event_mask = xnestEventMask; attributes.colormap = xnestDefaultVisualColormap(xnestDefaultVisual(pScreen));