composite: Don't backfill non-MapWindow allocations
Reviewed-by: Keith Packard <keithp@keithp.com> Signed-off-by: Adam Jackson <ajax@redhat.com>
This commit is contained in:
parent
6dd775f57d
commit
db8840600e
|
@ -484,7 +484,7 @@ bgNoneVisitWindow(WindowPtr pWin, void *null)
|
||||||
}
|
}
|
||||||
|
|
||||||
static PixmapPtr
|
static PixmapPtr
|
||||||
compNewPixmap (WindowPtr pWin, int x, int y, int w, int h)
|
compNewPixmap (WindowPtr pWin, int x, int y, int w, int h, Bool map)
|
||||||
{
|
{
|
||||||
ScreenPtr pScreen = pWin->drawable.pScreen;
|
ScreenPtr pScreen = pWin->drawable.pScreen;
|
||||||
WindowPtr pParent = pWin->parent;
|
WindowPtr pParent = pWin->parent;
|
||||||
|
@ -499,6 +499,10 @@ compNewPixmap (WindowPtr pWin, int x, int y, int w, int h)
|
||||||
pPixmap->screen_x = x;
|
pPixmap->screen_x = x;
|
||||||
pPixmap->screen_y = y;
|
pPixmap->screen_y = y;
|
||||||
|
|
||||||
|
/* resize allocations will update later in compCopyWindow, not here */
|
||||||
|
if (!map)
|
||||||
|
return pPixmap;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* If there's no bg=None in the tree, we're done.
|
* If there's no bg=None in the tree, we're done.
|
||||||
*
|
*
|
||||||
|
@ -580,7 +584,7 @@ compAllocPixmap (WindowPtr pWin)
|
||||||
int y = pWin->drawable.y - bw;
|
int y = pWin->drawable.y - bw;
|
||||||
int w = pWin->drawable.width + (bw << 1);
|
int w = pWin->drawable.width + (bw << 1);
|
||||||
int h = pWin->drawable.height + (bw << 1);
|
int h = pWin->drawable.height + (bw << 1);
|
||||||
PixmapPtr pPixmap = compNewPixmap (pWin, x, y, w, h);
|
PixmapPtr pPixmap = compNewPixmap (pWin, x, y, w, h, TRUE);
|
||||||
CompWindowPtr cw = GetCompWindow (pWin);
|
CompWindowPtr cw = GetCompWindow (pWin);
|
||||||
|
|
||||||
if (!pPixmap)
|
if (!pPixmap)
|
||||||
|
@ -654,7 +658,7 @@ compReallocPixmap (WindowPtr pWin, int draw_x, int draw_y,
|
||||||
pix_h = h + (bw << 1);
|
pix_h = h + (bw << 1);
|
||||||
if (pix_w != pOld->drawable.width || pix_h != pOld->drawable.height)
|
if (pix_w != pOld->drawable.width || pix_h != pOld->drawable.height)
|
||||||
{
|
{
|
||||||
pNew = compNewPixmap (pWin, pix_x, pix_y, pix_w, pix_h);
|
pNew = compNewPixmap (pWin, pix_x, pix_y, pix_w, pix_h, FALSE);
|
||||||
if (!pNew)
|
if (!pNew)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
cw->pOldPixmap = pOld;
|
cw->pOldPixmap = pOld;
|
||||||
|
|
Loading…
Reference in New Issue