From 27f1fcef7fd3f04ed833e16a133b49a817dabf1d Mon Sep 17 00:00:00 2001 From: "Enrico Weigelt, metux IT consult" Date: Tue, 12 Aug 2025 13:56:56 +0200 Subject: [PATCH] panoramiX: XineramaGetImageData(): scope split pDraw variable usage Use a separate variable pWalkDraw for inside the loop, as it's got a different purpose in here. Signed-off-by: Enrico Weigelt, metux IT consult --- Xext/panoramiX.c | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/Xext/panoramiX.c b/Xext/panoramiX.c index a0f1af8aaa..43f070e100 100644 --- a/Xext/panoramiX.c +++ b/Xext/panoramiX.c @@ -1161,10 +1161,9 @@ XineramaGetImageData(DrawablePtr *pDrawables, FOR_NSCREENS_BACKWARD(i) { BoxRec TheBox; - ScreenPtr pScreen; - pDraw = pDrawables[i]; - pScreen = pDraw->pScreen; + DrawablePtr pWalkDraw = pDrawables[i]; + ScreenPtr pScreen = pWalkDraw->pScreen; TheBox.x1 = pScreen->x; TheBox.x2 = TheBox.x1 + pScreen->width; @@ -1179,10 +1178,10 @@ XineramaGetImageData(DrawablePtr *pDrawables, RegionUninit(&ScreenRegion); if (inOut == rgnIN) { - (*pScreen->GetImage) (pDraw, - SrcBox.x1 - pDraw->x - + pScreen->GetImage(pWalkDraw, + SrcBox.x1 - pWalkDraw->x - screenInfo.screens[i]->x, - SrcBox.y1 - pDraw->y - + SrcBox.y1 - pWalkDraw->y - screenInfo.screens[i]->y, width, height, format, planemask, data); break; @@ -1212,10 +1211,10 @@ XineramaGetImageData(DrawablePtr *pDrawables, } } - x = pbox->x1 - pDraw->x - screenInfo.screens[i]->x; - y = pbox->y1 - pDraw->y - screenInfo.screens[i]->y; + x = pbox->x1 - pWalkDraw->x - screenInfo.screens[i]->x; + y = pbox->y1 - pWalkDraw->y - screenInfo.screens[i]->y; - (*pScreen->GetImage) (pDraw, x, y, w, h, + (*pScreen->GetImage) (pWalkDraw, x, y, w, h, format, planemask, ScratchMem); /* copy the memory over */