From 90d7ee7d0f65630ba327f0dd6085d26502e1dbb4 Mon Sep 17 00:00:00 2001 From: "Enrico Weigelt, metux IT consult" Date: Tue, 30 Jul 2024 20:08:31 +0200 Subject: [PATCH] (!1654) Xnest: fetch default screen's root window from screen info Signed-off-by: Enrico Weigelt, metux IT consult --- hw/xnest/Display.c | 9 ++++----- hw/xnest/Screen.c | 2 +- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/hw/xnest/Display.c b/hw/xnest/Display.c index 41004d4d6..9e148c519 100644 --- a/hw/xnest/Display.c +++ b/hw/xnest/Display.c @@ -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, diff --git a/hw/xnest/Screen.c b/hw/xnest/Screen.c index 7149671e2..bf8a39162 100644 --- a/hw/xnest/Screen.c +++ b/hw/xnest/Screen.c @@ -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,