summaryrefslogtreecommitdiff
path: root/miext/rootless/rootlessWindow.c
diff options
context:
space:
mode:
authorEamon Walsh <ewalsh@tycho.nsa.gov>2007-09-19 07:25:55 -0400
committerEamon Walsh <ewalsh@moss-charon.epoch.ncsc.mil>2007-09-19 07:25:55 -0400
commit97c150b61bbe436453b05d3c07cd2173870aac40 (patch)
tree5335d0df93703e7ca8617cfae57315709d032a29 /miext/rootless/rootlessWindow.c
parent57907e0943da0c3fd3bf6c128d210b544629ce72 (diff)
parent547ad2125ece93bbe01f6d09a3baf176ebd16bb3 (diff)
Merge branch 'master' into XACE-SELINUX
Conflicts: afb/afbpntwin.c afb/afbscrinit.c afb/afbwindow.c cfb/cfb.h cfb/cfballpriv.c cfb/cfbscrinit.c cfb/cfbwindow.c configure.ac fb/wfbrename.h hw/xfree86/xf4bpp/ppcIO.c hw/xfree86/xf4bpp/ppcPntWin.c hw/xfree86/xf4bpp/ppcWindow.c hw/xfree86/xf8_32bpp/cfbscrinit.c mfb/mfb.h mfb/mfbpntwin.c mfb/mfbscrinit.c mfb/mfbwindow.c mi/miexpose.c Note: conflicts caused by devPrivates rework vs. paintwindow changes.
Diffstat (limited to 'miext/rootless/rootlessWindow.c')
-rw-r--r--miext/rootless/rootlessWindow.c98
1 files changed, 3 insertions, 95 deletions
diff --git a/miext/rootless/rootlessWindow.c b/miext/rootless/rootlessWindow.c
index 687748c2d..512a4949f 100644
--- a/miext/rootless/rootlessWindow.c
+++ b/miext/rootless/rootlessWindow.c
@@ -217,10 +217,8 @@ RootlessSetShape(WindowPtr pWin)
/* Disallow ParentRelative background on top-level windows
- because the root window doesn't really have the right background
- and fb will try to draw on the root instead of on the window.
- ParentRelative prevention is also in PaintWindowBackground/Border()
- so it is no longer really needed here. */
+ because the root window doesn't really have the right background.
+ */
Bool
RootlessChangeWindowAttributes(WindowPtr pWin, unsigned long vmask)
{
@@ -670,7 +668,7 @@ RootlessResizeCopyWindow(WindowPtr pWin, DDXPointRec ptOldOrg,
/*
* RootlessCopyWindow
* Update *new* location of window. Old location is redrawn with
- * PaintWindowBackground/Border. Cloned from fbCopyWindow.
+ * miPaintWindow. Cloned from fbCopyWindow.
* The original always draws on the root pixmap, which we don't have.
* Instead, draw on the parent window's pixmap.
*/
@@ -1326,96 +1324,6 @@ out:
}
}
-
-/*
- * SetPixmapOfAncestors
- * Set the Pixmaps on all ParentRelative windows up the ancestor chain.
- */
-static void
-SetPixmapOfAncestors(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);
- }
-}
-
-
-/*
- * RootlessPaintWindowBackground
- */
-void
-RootlessPaintWindowBackground(WindowPtr pWin, RegionPtr pRegion, int what)
-{
- ScreenPtr pScreen = pWin->drawable.pScreen;
-
- if (IsRoot(pWin))
- return;
-
- RL_DEBUG_MSG("paintwindowbackground start (win 0x%x, framed %i) ",
- pWin, IsFramedWindow(pWin));
-
- if (IsFramedWindow(pWin)) {
- RootlessStartDrawing(pWin);
- RootlessDamageRegion(pWin, pRegion);
-
- // For ParentRelative windows, we have to make sure the window
- // pixmap is set correctly all the way up the ancestor chain.
- if (pWin->backgroundState == ParentRelative) {
- SetPixmapOfAncestors(pWin);
- }
- }
-
- SCREEN_UNWRAP(pScreen, PaintWindowBackground);
- pScreen->PaintWindowBackground(pWin, pRegion, what);
- SCREEN_WRAP(pScreen, PaintWindowBackground);
-
- RL_DEBUG_MSG("paintwindowbackground end\n");
-}
-
-
-/*
- * RootlessPaintWindowBorder
- */
-void
-RootlessPaintWindowBorder(WindowPtr pWin, RegionPtr pRegion, int what)
-{
- RL_DEBUG_MSG("paintwindowborder start (win 0x%x) ", pWin);
-
- if (IsFramedWindow(pWin)) {
- RootlessStartDrawing(pWin);
- RootlessDamageRegion(pWin, pRegion);
-
- // For ParentRelative windows with tiled borders, we have to make
- // sure the window pixmap is set correctly all the way up the
- // ancestor chain.
- if (!pWin->borderIsPixel &&
- pWin->backgroundState == ParentRelative)
- {
- SetPixmapOfAncestors(pWin);
- }
- }
-
- SCREEN_UNWRAP(pWin->drawable.pScreen, PaintWindowBorder);
- pWin->drawable.pScreen->PaintWindowBorder(pWin, pRegion, what);
- SCREEN_WRAP(pWin->drawable.pScreen, PaintWindowBorder);
-
- RL_DEBUG_MSG("paintwindowborder end\n");
-}
-
-
/*
* RootlessChangeBorderWidth
* FIXME: untested!