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 /miext | |
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 'miext')
-rw-r--r-- | miext/rootless/rootlessWindow.c | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/miext/rootless/rootlessWindow.c b/miext/rootless/rootlessWindow.c index e273d0e38..d43301fc1 100644 --- a/miext/rootless/rootlessWindow.c +++ b/miext/rootless/rootlessWindow.c @@ -1684,3 +1684,29 @@ RootlessShowAllWindows (void) 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); + } +} + |