mirror of
https://github.com/X11Libre/xserver.git
synced 2026-11-12 04:55:49 +00:00
panoramiX: XineramaGetImageData(): scope scratchMem
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
This commit is contained in:
parent
1193e294e7
commit
be425a933c
1 changed files with 4 additions and 5 deletions
|
|
@ -1138,9 +1138,7 @@ XineramaGetImageData(DrawablePtr *pDrawables,
|
|||
{
|
||||
RegionRec SrcRegion, GrabRegion;
|
||||
BoxRec SrcBox;
|
||||
int size = 0;
|
||||
DrawablePtr pDraw = pDrawables[0];
|
||||
char *ScratchMem = NULL;
|
||||
|
||||
/* find box in logical screen space */
|
||||
SrcBox.x1 = left;
|
||||
|
|
@ -1192,6 +1190,9 @@ XineramaGetImageData(DrawablePtr *pDrawables,
|
|||
if (nbox) {
|
||||
BoxRec *pbox = RegionRects(&GrabRegion);
|
||||
|
||||
int size = 0;
|
||||
char *ScratchMem = NULL;
|
||||
|
||||
while (nbox--) {
|
||||
int w = pbox->x2 - pbox->x1;
|
||||
int h = pbox->y2 - pbox->y1;
|
||||
|
|
@ -1275,15 +1276,13 @@ XineramaGetImageData(DrawablePtr *pDrawables,
|
|||
pbox++;
|
||||
}
|
||||
|
||||
free(ScratchMem);
|
||||
RegionSubtract(&SrcRegion, &SrcRegion, &GrabRegion);
|
||||
if (!RegionNotEmpty(&SrcRegion))
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
free(ScratchMem);
|
||||
|
||||
RegionUninit(&SrcRegion);
|
||||
RegionUninit(&GrabRegion);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue