summaryrefslogtreecommitdiff
path: root/miext
diff options
context:
space:
mode:
authorAdam Jackson <ajax@redhat.com>2015-06-02 13:58:30 -0400
committerAdam Jackson <ajax@redhat.com>2015-07-08 16:41:28 -0400
commitcbd3cfbad3f07b20e90ea9498110f255813eb441 (patch)
tree18ea660c0d607e33d059f262d68e562c9771fc12 /miext
parent74d64ceea02bffad1caf3d1a727edbd38d968059 (diff)
dix: Restore PaintWindow screen hook
Removes the last cpp conditional on ROOTLESS from dix code. Reviewed-by: Jasper St. Pierre <jstpierre@mecheye.net> Signed-off-by: Adam Jackson <ajax@redhat.com>
Diffstat (limited to 'miext')
-rw-r--r--miext/rootless/rootlessCommon.h1
-rw-r--r--miext/rootless/rootlessScreen.c3
-rw-r--r--miext/rootless/rootlessWindow.c23
-rw-r--r--miext/rootless/rootlessWindow.h1
4 files changed, 26 insertions, 2 deletions
diff --git a/miext/rootless/rootlessCommon.h b/miext/rootless/rootlessCommon.h
index fd9c941f4..aa5557954 100644
--- a/miext/rootless/rootlessCommon.h
+++ b/miext/rootless/rootlessCommon.h
@@ -94,6 +94,7 @@ typedef struct _RootlessScreenRec {
ChangeBorderWidthProcPtr ChangeBorderWidth;
PositionWindowProcPtr PositionWindow;
ChangeWindowAttributesProcPtr ChangeWindowAttributes;
+ PaintWindowProcPtr PaintWindow;
CreateGCProcPtr CreateGC;
CopyWindowProcPtr CopyWindow;
diff --git a/miext/rootless/rootlessScreen.c b/miext/rootless/rootlessScreen.c
index 6226ee84a..471656428 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
@@ -669,6 +669,7 @@ RootlessWrap(ScreenPtr pScreen)
WRAP(CloseScreen);
WRAP(CreateGC);
WRAP(CopyWindow);
+ WRAP(PaintWindow);
WRAP(GetImage);
WRAP(SourceValidate);
WRAP(CreateWindow);
diff --git a/miext/rootless/rootlessWindow.c b/miext/rootless/rootlessWindow.c
index 3240acce5..e3042990c 100644
--- a/miext/rootless/rootlessWindow.c
+++ b/miext/rootless/rootlessWindow.c
@@ -720,7 +720,7 @@ RootlessResizeCopyWindow(WindowPtr pWin, DDXPointRec ptOldOrg,
/*
* RootlessCopyWindow
* Update *new* location of window. Old location is redrawn with
- * miPaintWindow. Cloned from fbCopyWindow.
+ * PaintWindow. Cloned from fbCopyWindow.
* The original always draws on the root pixmap, which we don't have.
* Instead, draw on the parent window's pixmap.
*/
@@ -794,6 +794,27 @@ RootlessCopyWindow(WindowPtr pWin, DDXPointRec ptOldOrg, RegionPtr prgnSrc)
RL_DEBUG_MSG("copywindowFB end\n");
}
+void
+RootlessPaintWindow(WindowPtr pWin, RegionPtr prgn, int what)
+{
+ ScreenPtr pScreen = pWin->drawable.pScreen;
+
+ if (IsFramedWindow(pWin)) {
+ RootlessStartDrawing(pWin);
+ RootlessDamageRegion(pWin, prgn);
+
+ if (pWin->backgroundState == ParentRelative) {
+ if ((what == PW_BACKGROUND) ||
+ (what == PW_BORDER && !pWin->borderIsPixel))
+ RootlessSetPixmapOfAncestors(pWin);
+ }
+ }
+
+ SCREEN_UNWRAP(pScreen, PaintWindow);
+ pScreen->PaintWindow(pWin, prgn, what);
+ SCREEN_WRAP(pScreen, PaintWindow);
+}
+
/*
* Window resize procedures
*/
diff --git a/miext/rootless/rootlessWindow.h b/miext/rootless/rootlessWindow.h
index d3955fc89..4fd34d54d 100644
--- a/miext/rootless/rootlessWindow.h
+++ b/miext/rootless/rootlessWindow.h
@@ -48,6 +48,7 @@ Bool RootlessUnrealizeWindow(WindowPtr pWin);
void RootlessRestackWindow(WindowPtr pWin, WindowPtr pOldNextSib);
void RootlessCopyWindow(WindowPtr pWin, DDXPointRec ptOldOrg,
RegionPtr prgnSrc);
+void RootlessPaintWindow(WindowPtr pWin, RegionPtr prgn, int what);
void RootlessMoveWindow(WindowPtr pWin, int x, int y, WindowPtr pSib,
VTKind kind);
void RootlessResizeWindow(WindowPtr pWin, int x, int y, unsigned int w,