Rootless: Correct border rendering on parent-relative windows
Resurected code from the punted RootlessPaintBackground/Border and added it conditionally to miPaintWindow (cherry picked from commit cf2e3312cff3f341e9edba8c321a4ca7ffd8748e)
This commit is contained in:
parent
6df00917ca
commit
b3415187e9
|
@ -518,6 +518,14 @@ miWindowExposures( WindowPtr pWin, RegionPtr prgn, RegionPtr other_exposed)
|
||||||
REGION_DESTROY( pWin->drawable.pScreen, exposures);
|
REGION_DESTROY( pWin->drawable.pScreen, exposures);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef ROOTLESS
|
||||||
|
/* Ugly, ugly, but we lost our hooks into miPaintWindow... =/ */
|
||||||
|
void RootlessSetPixmapOfAncestors(WindowPtr pWin);
|
||||||
|
void RootlessStartDrawing(WindowPtr pWin);
|
||||||
|
void RootlessDamageRegion(WindowPtr pWin, RegionPtr prgn);
|
||||||
|
Bool IsFramedWindow(WindowPtr pWin);
|
||||||
|
#endif
|
||||||
|
|
||||||
void
|
void
|
||||||
miPaintWindow(WindowPtr pWin, RegionPtr prgn, int what)
|
miPaintWindow(WindowPtr pWin, RegionPtr prgn, int what)
|
||||||
{
|
{
|
||||||
|
@ -543,6 +551,19 @@ miPaintWindow(WindowPtr pWin, RegionPtr prgn, int what)
|
||||||
Bool solid = TRUE;
|
Bool solid = TRUE;
|
||||||
DrawablePtr drawable = &pWin->drawable;
|
DrawablePtr drawable = &pWin->drawable;
|
||||||
|
|
||||||
|
#ifdef ROOTLESS
|
||||||
|
if(IsFramedWindow(pWin)) {
|
||||||
|
RootlessStartDrawing(pWin);
|
||||||
|
RootlessDamageRegion(pWin, prgn);
|
||||||
|
|
||||||
|
if(pWin->backgroundState == ParentRelative) {
|
||||||
|
if((what == PW_BACKGROUND) ||
|
||||||
|
(what == PW_BORDER && !pWin->borderIsPixel))
|
||||||
|
RootlessSetPixmapOfAncestors(pWin);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
if (what == PW_BACKGROUND)
|
if (what == PW_BACKGROUND)
|
||||||
{
|
{
|
||||||
while (pWin->backgroundState == ParentRelative)
|
while (pWin->backgroundState == ParentRelative)
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
|
||||||
/***********************************************************
|
/***********************************************************
|
||||||
|
|
||||||
Copyright 1987, 1998 The Open Group
|
Copyright 1987, 1998 The Open Group
|
||||||
|
|
|
@ -1684,3 +1684,29 @@ RootlessShowAllWindows (void)
|
||||||
RootlessScreenExpose (pScreen);
|
RootlessScreenExpose (pScreen);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* SetPixmapOfAncestors
|
||||||
|
* Set the Pixmaps on all ParentRelative windows up the ancestor chain.
|
||||||
|
*/
|
||||||
|
void
|
||||||
|
RootlessSetPixmapOfAncestors(WindowPtr pWin)
|
||||||
|
{
|
||||||
|
ScreenPtr pScreen = pWin->drawable.pScreen;
|
||||||
|
WindowPtr topWin = TopLevelParent(pWin);
|
||||||
|
RootlessWindowRec *topWinRec = WINREC(topWin);
|
||||||
|
|
||||||
|
while (pWin->backgroundState == ParentRelative) {
|
||||||
|
if (pWin == topWin) {
|
||||||
|
// disallow ParentRelative background state on top level
|
||||||
|
XID pixel = 0;
|
||||||
|
ChangeWindowAttributes(pWin, CWBackPixel, &pixel, serverClient);
|
||||||
|
RL_DEBUG_MSG("Cleared ParentRelative on 0x%x.\n", pWin);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
pWin = pWin->parent;
|
||||||
|
pScreen->SetWindowPixmap(pWin, topWinRec->pixmap);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue