(!1654) Xnest: fetch default screen's root window from screen info

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
This commit is contained in:
Enrico Weigelt, metux IT consult 2024-07-30 20:08:31 +02:00
parent 0b0ffeaeb2
commit 90d7ee7d0f
2 changed files with 5 additions and 6 deletions

View File

@ -123,8 +123,7 @@ xnestOpenDisplay(int argc, char *argv[])
sizeof(Colormap));
for (i = 0; i < xnestNumDefaultColormaps; i++)
xnestDefaultColormaps[i] = XCreateColormap(xnestDisplay,
DefaultRootWindow
(xnestDisplay),
xnestUpstreamInfo.screenInfo->root,
xnestVisuals[i].visual,
AllocNone);
@ -147,7 +146,7 @@ xnestOpenDisplay(int argc, char *argv[])
if (xnestPixmapFormats[i].depth == 1 ||
xnestPixmapFormats[i].depth == xnestDepths[j]) {
xnestDefaultDrawables[xnestPixmapFormats[i].depth] =
XCreatePixmap(xnestDisplay, DefaultRootWindow(xnestDisplay),
XCreatePixmap(xnestDisplay, xnestUpstreamInfo.screenInfo->root,
1, 1, xnestPixmapFormats[i].depth);
}
@ -172,12 +171,12 @@ xnestOpenDisplay(int argc, char *argv[])
xnestIconBitmap =
XCreateBitmapFromData(xnestDisplay,
DefaultRootWindow(xnestDisplay),
xnestUpstreamInfo.screenInfo->root,
(char *) icon_bits, icon_width, icon_height);
xnestScreenSaverPixmap =
XCreatePixmapFromBitmapData(xnestDisplay,
DefaultRootWindow(xnestDisplay),
xnestUpstreamInfo.screenInfo->root,
(char *) screensaver_bits,
screensaver_width,
screensaver_height,

View File

@ -359,7 +359,7 @@ xnestOpenScreen(ScreenPtr pScreen, int argc, char *argv[])
else
xnestDefaultWindows[pScreen->myNum] =
XCreateWindow(xnestDisplay,
DefaultRootWindow(xnestDisplay),
xnestUpstreamInfo.screenInfo->root,
xnestX + POSITION_OFFSET,
xnestY + POSITION_OFFSET,
xnestWidth, xnestHeight,