summaryrefslogtreecommitdiff
path: root/miext/rootless/rootlessWindow.c
diff options
context:
space:
mode:
Diffstat (limited to 'miext/rootless/rootlessWindow.c')
-rw-r--r--miext/rootless/rootlessWindow.c26
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)
1684 RootlessScreenExpose (pScreen); 1684 RootlessScreenExpose (pScreen);
1685 } 1685 }
1686} 1686}
1687
1688/*
1689 * SetPixmapOfAncestors
1690 * Set the Pixmaps on all ParentRelative windows up the ancestor chain.
1691 */
1692void
1693RootlessSetPixmapOfAncestors(WindowPtr pWin)
1694{
1695 ScreenPtr pScreen = pWin->drawable.pScreen;
1696 WindowPtr topWin = TopLevelParent(pWin);
1697 RootlessWindowRec *topWinRec = WINREC(topWin);
1698
1699 while (pWin->backgroundState == ParentRelative) {
1700 if (pWin == topWin) {
1701 // disallow ParentRelative background state on top level
1702 XID pixel = 0;
1703 ChangeWindowAttributes(pWin, CWBackPixel, &pixel, serverClient);
1704 RL_DEBUG_MSG("Cleared ParentRelative on 0x%x.\n", pWin);
1705 break;
1706 }
1707
1708 pWin = pWin->parent;
1709 pScreen->SetWindowPixmap(pWin, topWinRec->pixmap);
1710 }
1711}
1712