From 866f092ca0160a366add01b48ad03438926c4d16 Mon Sep 17 00:00:00 2001 From: Keith Packard Date: Tue, 3 Jul 2007 14:29:11 -0700 Subject: Make Composite manual redirect windows not clip their parent. This patch changes the semantics of manual redirect windows so that they no longer affect the clip list of their parent. Doing this means the parent can draw to the area covered by the child without using IncludeInferiors. More importantly, this also means that the parent receives expose events when that region is damaged by other actions. --- dix/window.c | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) (limited to 'dix/window.c') diff --git a/dix/window.c b/dix/window.c index 96002eb1f..be4ea2c97 100644 --- a/dix/window.c +++ b/dix/window.c @@ -298,7 +298,7 @@ SetWindowToDefaults(WindowPtr pWin) pWin->dontPropagate = 0; pWin->forcedBS = FALSE; #ifdef COMPOSITE - pWin->redirectDraw = 0; + pWin->redirectDraw = RedirectDrawNone; #endif } @@ -1687,10 +1687,14 @@ _X_EXPORT void SetWinSize (WindowPtr pWin) { #ifdef COMPOSITE - if (pWin->redirectDraw) + if (pWin->redirectDraw != RedirectDrawNone) { BoxRec box; + /* + * Redirected clients get clip list equal to their + * own geometry, not clipped to their parent + */ box.x1 = pWin->drawable.x; box.y1 = pWin->drawable.y; box.x2 = pWin->drawable.x + pWin->drawable.width; @@ -1730,10 +1734,14 @@ SetBorderSize (WindowPtr pWin) if (HasBorder (pWin)) { bw = wBorderWidth (pWin); #ifdef COMPOSITE - if (pWin->redirectDraw) + if (pWin->redirectDraw != RedirectDrawNone) { BoxRec box; + /* + * Redirected clients get clip list equal to their + * own geometry, not clipped to their parent + */ box.x1 = pWin->drawable.x - bw; box.y1 = pWin->drawable.y - bw; box.x2 = pWin->drawable.x + pWin->drawable.width + bw; -- cgit v1.2.3