mirror of
https://gitlab.freedesktop.org/xorg/xserver.git
synced 2026-06-19 04:18:27 +02:00
Merge some changes from redhat-xdc2006 branch
This commit is contained in:
parent
fd21d809df
commit
4428e8f1d7
6 changed files with 57 additions and 9 deletions
|
|
@ -1,5 +1,11 @@
|
|||
2006-02-10 David Reveman <davidr@novell.com>
|
||||
|
||||
* composite/compwindow.c:
|
||||
* composite/compint.h:
|
||||
* composite/compinit.c:
|
||||
* composite/compext.c:
|
||||
* composite/compalloc.c: Merge some changes from redhat-xdc2006 branch.
|
||||
|
||||
* Xext/Makefile.am (MITSHM_SRCS): Add shmint.h.
|
||||
|
||||
* GL/symlink-mesa.sh: Add glapi.c to symlink_mesa_glapi.
|
||||
|
|
|
|||
|
|
@ -432,7 +432,7 @@ compUnredirectOneSubwindow (WindowPtr pParent, WindowPtr pWin)
|
|||
}
|
||||
|
||||
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 backfill)
|
||||
{
|
||||
ScreenPtr pScreen = pWin->drawable.pScreen;
|
||||
WindowPtr pParent = pWin->parent;
|
||||
|
|
@ -446,7 +446,10 @@ compNewPixmap (WindowPtr pWin, int x, int y, int w, int h)
|
|||
|
||||
pPixmap->screen_x = x;
|
||||
pPixmap->screen_y = y;
|
||||
|
||||
|
||||
if (!backfill)
|
||||
return pPixmap;
|
||||
|
||||
pGC = GetScratchGC (pWin->drawable.depth, pScreen);
|
||||
|
||||
/*
|
||||
|
|
@ -467,6 +470,7 @@ compNewPixmap (WindowPtr pWin, int x, int y, int w, int h)
|
|||
w, h, 0, 0);
|
||||
FreeScratchGC (pGC);
|
||||
}
|
||||
|
||||
return pPixmap;
|
||||
}
|
||||
|
||||
|
|
@ -478,7 +482,7 @@ compAllocPixmap (WindowPtr pWin)
|
|||
int y = pWin->drawable.y - bw;
|
||||
int w = pWin->drawable.width + (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);
|
||||
|
||||
if (!pPixmap)
|
||||
|
|
@ -548,7 +552,7 @@ compReallocPixmap (WindowPtr pWin, int draw_x, int draw_y,
|
|||
pix_h = h + (bw << 1);
|
||||
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)
|
||||
return FALSE;
|
||||
cw->pOldPixmap = pOld;
|
||||
|
|
|
|||
|
|
@ -231,6 +231,9 @@ ProcCompositeNameWindowPixmap (ClientPtr client)
|
|||
if (!cw)
|
||||
return BadMatch;
|
||||
|
||||
if (!pWin->mapped)
|
||||
return BadMatch;
|
||||
|
||||
pPixmap = (*pWin->drawable.pScreen->GetWindowPixmap) (pWin);
|
||||
if (!pPixmap)
|
||||
return BadMatch;
|
||||
|
|
|
|||
|
|
@ -28,10 +28,10 @@
|
|||
|
||||
#include "compint.h"
|
||||
|
||||
int CompScreenPrivateIndex;
|
||||
int CompWindowPrivateIndex;
|
||||
int CompSubwindowsPrivateIndex;
|
||||
int CompGeneration;
|
||||
int CompScreenPrivateIndex = -1;
|
||||
int CompWindowPrivateIndex= -1;
|
||||
int CompSubwindowsPrivateIndex = -1;
|
||||
int CompGeneration = -1;
|
||||
|
||||
static Bool
|
||||
compCloseScreen (int index, ScreenPtr pScreen)
|
||||
|
|
|
|||
|
|
@ -257,4 +257,7 @@ compCopyWindow (WindowPtr pWin, DDXPointRec ptOldOrg, RegionPtr prgnSrc);
|
|||
void
|
||||
compWindowUpdate (WindowPtr pWin);
|
||||
|
||||
int
|
||||
compRedirectMode(WindowPtr pWin);
|
||||
|
||||
#endif /* _COMPINT_H_ */
|
||||
|
|
|
|||
|
|
@ -296,6 +296,34 @@ compImplicitRedirect (WindowPtr pWin, WindowPtr pParent)
|
|||
return FALSE;
|
||||
}
|
||||
|
||||
/*
|
||||
* We're lazy about creating window privates, since redirecting a window
|
||||
* implicitly redirects its children. So we have to walk up towards the
|
||||
* root to find out how we're being redirected.
|
||||
*/
|
||||
int
|
||||
compRedirectMode(WindowPtr pWin)
|
||||
{
|
||||
CompWindowPtr cw = NULL;
|
||||
|
||||
if (CompWindowPrivateIndex == -1) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
for (; pWin; pWin = pWin->parent) {
|
||||
if (pWin->parent == pWin || pWin->parent == NULL)
|
||||
break; /* failure */
|
||||
if ((cw = GetCompWindow(pWin)))
|
||||
break; /* success */
|
||||
}
|
||||
|
||||
if (!cw) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
return cw->update;
|
||||
}
|
||||
|
||||
void
|
||||
compMoveWindow (WindowPtr pWin, int x, int y, WindowPtr pSib, VTKind kind)
|
||||
{
|
||||
|
|
@ -548,7 +576,9 @@ compCopyWindow (WindowPtr pWin, DDXPointRec ptOldOrg, RegionPtr prgnSrc)
|
|||
REGION_TRANSLATE (prgnSrc, prgnSrc,
|
||||
pWin->drawable.x - ptOldOrg.x,
|
||||
pWin->drawable.y - ptOldOrg.y);
|
||||
DamageDamageRegion (&pWin->drawable, prgnSrc);
|
||||
#if 0
|
||||
DamageDamageRegion (&pWin->drawable, prgnSrc);
|
||||
#endif
|
||||
}
|
||||
cs->CopyWindow = pScreen->CopyWindow;
|
||||
pScreen->CopyWindow = compCopyWindow;
|
||||
|
|
@ -627,7 +657,9 @@ compSetRedirectBorderClip (WindowPtr pWin, RegionPtr pRegion)
|
|||
/*
|
||||
* Report that as damaged so it will be redrawn
|
||||
*/
|
||||
#if 0
|
||||
DamageDamageRegion (&pWin->drawable, &damage);
|
||||
#endif
|
||||
REGION_UNINIT (pScreen, &damage);
|
||||
/*
|
||||
* Save the new border clip region
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue