summaryrefslogtreecommitdiff
path: root/miext
diff options
context:
space:
mode:
Diffstat (limited to 'miext')
-rw-r--r--miext/rootless/rootlessCommon.h1
-rw-r--r--miext/rootless/rootlessScreen.c3
-rw-r--r--miext/rootless/rootlessWindow.c35
-rw-r--r--miext/rootless/rootlessWindow.h1
4 files changed, 39 insertions, 1 deletions
diff --git a/miext/rootless/rootlessCommon.h b/miext/rootless/rootlessCommon.h
index fd9c941f4..dadeab3cb 100644
--- a/miext/rootless/rootlessCommon.h
+++ b/miext/rootless/rootlessCommon.h
@@ -96,6 +96,7 @@ typedef struct _RootlessScreenRec {
ChangeWindowAttributesProcPtr ChangeWindowAttributes;
CreateGCProcPtr CreateGC;
+ PaintWindowProcPtr PaintWindow;
CopyWindowProcPtr CopyWindow;
GetImageProcPtr GetImage;
SourceValidateProcPtr SourceValidate;
diff --git a/miext/rootless/rootlessScreen.c b/miext/rootless/rootlessScreen.c
index a1af3e7ac..4e7ecf4d3 100644
--- a/miext/rootless/rootlessScreen.c
+++ b/miext/rootless/rootlessScreen.c
@@ -473,7 +473,7 @@ expose_1(WindowPtr pWin)
if (!pWin->realized)
return;
- miPaintWindow(pWin, &pWin->borderClip, PW_BACKGROUND);
+ (*pWin->drawable.pScreen->PaintWindow)(pWin, &pWin->borderClip, PW_BACKGROUND);
/* FIXME: comments in windowstr.h indicate that borderClip doesn't
include subwindow visibility. But I'm not so sure.. so we may
@@ -668,6 +668,7 @@ RootlessWrap(ScreenPtr pScreen)
WRAP(CreateScreenResources);
WRAP(CloseScreen);
WRAP(CreateGC);
+ WRAP(PaintWindow);
WRAP(CopyWindow);
WRAP(GetImage);
WRAP(SourceValidate);
diff --git a/miext/rootless/rootlessWindow.c b/miext/rootless/rootlessWindow.c
index cfcb6e558..dde285666 100644
--- a/miext/rootless/rootlessWindow.c
+++ b/miext/rootless/rootlessWindow.c
@@ -1636,3 +1636,38 @@ RootlessSetPixmapOfAncestors(WindowPtr pWin)
pScreen->SetWindowPixmap(pWin, topWinRec->pixmap);
}
}
+
+/*
+ * RootlessPaintWindow
+ *
+ * Wrapper for miPaintWindow
+ *
+ * Returns directly if there is nothing more for miPaintWindow() to do
+ *
+ */
+void
+RootlessPaintWindow(WindowPtr pWin, RegionPtr pRegion, int what)
+{
+ DrawablePtr drawable = &pWin->drawable;
+
+ if (!drawable || drawable->type == UNDRAWABLE_WINDOW)
+ return;
+
+ if (IsFramedWindow(pWin)) {
+ RootlessStartDrawing(pWin);
+ RootlessDamageRegion(pWin, pRegion);
+
+ // For ParentRelative windows, if painting background, or with
+ // tiled borders, we have to make sure the window pixmap is
+ // set correctly all the way up the ancestor chain.
+ if (pWin->backgroundState == ParentRelative) {
+ if ((what == PW_BACKGROUND) ||
+ (what == PW_BORDER && !pWin->borderIsPixel))
+ RootlessSetPixmapOfAncestors(pWin);
+ }
+ }
+
+ SCREEN_UNWRAP(pWin->drawable.pScreen, PaintWindow);
+ pWin->drawable.pScreen->PaintWindow(pWin, pRegion, what);
+ SCREEN_WRAP(pWin->drawable.pScreen, PaintWindow);
+}
diff --git a/miext/rootless/rootlessWindow.h b/miext/rootless/rootlessWindow.h
index d3955fc89..3b7ea42d3 100644
--- a/miext/rootless/rootlessWindow.h
+++ b/miext/rootless/rootlessWindow.h
@@ -53,6 +53,7 @@ void RootlessMoveWindow(WindowPtr pWin, int x, int y, WindowPtr pSib,
void RootlessResizeWindow(WindowPtr pWin, int x, int y, unsigned int w,
unsigned int h, WindowPtr pSib);
void RootlessReparentWindow(WindowPtr pWin, WindowPtr pPriorParent);
+void RootlessPaintWindow(WindowPtr pWin, RegionPtr pRegion, int what);
void RootlessChangeBorderWidth(WindowPtr pWin, unsigned int width);
#ifdef __APPLE__