diff options
author | Jeremy Huddleston <jeremyhu@freedesktop.org> | 2009-09-27 23:09:51 -0700 |
---|---|---|
committer | Jeremy Huddleston <jeremyhu@freedesktop.org> | 2009-09-27 23:31:50 -0700 |
commit | b3415187e92960cbff784108b5a3a8d130dc34c5 (patch) | |
tree | fb67aa4c7675baf763b03b8c494b7088894764bf /mi | |
parent | 6df00917cab5c1096070625385fd76ee6c52e0f1 (diff) |
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)
Diffstat (limited to 'mi')
-rw-r--r-- | mi/miexpose.c | 21 | ||||
-rw-r--r-- | mi/miwindow.c | 1 |
2 files changed, 22 insertions, 0 deletions
diff --git a/mi/miexpose.c b/mi/miexpose.c index 6ce56ee85..1c9c3a436 100644 --- a/mi/miexpose.c +++ b/mi/miexpose.c @@ -518,6 +518,14 @@ miWindowExposures( WindowPtr pWin, RegionPtr prgn, RegionPtr other_exposed) 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 miPaintWindow(WindowPtr pWin, RegionPtr prgn, int what) { @@ -543,6 +551,19 @@ miPaintWindow(WindowPtr pWin, RegionPtr prgn, int what) Bool solid = TRUE; 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) { while (pWin->backgroundState == ParentRelative) diff --git a/mi/miwindow.c b/mi/miwindow.c index 31c028482..c2333938e 100644 --- a/mi/miwindow.c +++ b/mi/miwindow.c @@ -1,3 +1,4 @@ + /*********************************************************** Copyright 1987, 1998 The Open Group |