Xnest: fetch BlackPixel and WhitePixel from xcb setup data

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
This commit is contained in:
Enrico Weigelt, metux IT consult 2024-08-08 17:38:48 +02:00
parent 467ee9eba7
commit 2ec930fc4a
3 changed files with 5 additions and 12 deletions

View File

@ -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));
}

View File

@ -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;

View File

@ -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));