(!1654) 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 3818fab928
commit c4c696a1ef
3 changed files with 5 additions and 12 deletions

View File

@ -50,8 +50,6 @@ int *xnestDepths;
int xnestNumDepths;
XPixmapFormatValues *xnestPixmapFormats;
int xnestNumPixmapFormats;
Pixel xnestBlackPixel;
Pixel xnestWhitePixel;
Drawable xnestDefaultDrawables[MAXDEPTH + 1];
Pixmap xnestIconBitmap;
Pixmap xnestScreenSaverPixmap;
@ -136,9 +134,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
@ -186,8 +181,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

@ -256,8 +256,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 */
@ -346,7 +346,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));