xserver: Branch 'master' - 2 commits
Keith Packard
keithp at kemper.freedesktop.org
Fri Sep 19 20:59:50 PDT 2008
composite/compalloc.c | 10 ++++++++++
mi/miwindow.c | 9 +++++++++
2 files changed, 19 insertions(+)
New commits:
commit 03ab8f11d25b0ca39a3b37b5350bca4c1028768e
Author: Keith Packard <keithp at keithp.com>
Date: Thu Sep 18 12:17:05 2008 -0700
When resizing a window with redirected descendents, don't expose them
Bit/window gravity computations need to recompute exposures to manage the
bits which are saved by gravity during the resize computation. That's easy
for non-redirected windows where the bits are all within the parent's
pixmap. For redirected windows, we don't need to deal with this at all, so
just skip the whole re-computation adventure.
Signed-off-by: Keith Packard <keithp at keithp.com>
diff --git a/mi/miwindow.c b/mi/miwindow.c
index e3360d6..8c4b6d0 100644
--- a/mi/miwindow.c
+++ b/mi/miwindow.c
@@ -342,6 +342,15 @@ miRecomputeExposures (
if (pWin->valdata)
{
+#ifdef COMPOSITE
+ /*
+ * Redirected windows are not affected by parent window
+ * gravity manipulations, so don't recompute their
+ * exposed areas here.
+ */
+ if (pWin->redirectDraw != RedirectDrawNone)
+ return WT_DONTWALKCHILDREN;
+#endif
pScreen = pWin->drawable.pScreen;
/*
* compute exposed regions of this window
commit d26083fe02658e7312a8da6a5b11652f9fe57bc8
Author: Keith Packard <keithp at keithp.com>
Date: Thu Sep 18 12:14:58 2008 -0700
Switching from Automatic to Manual redirect needs to unmap/remap
When changing a window from automatic redirection to manual redirection, the
parent clip list needs to be recomputed; the easy way to get that computed
right is to unmap/map the window, just as when redirecting the window the
first time.
Thanks to Owen Taylor for helping diagnose this.
Signed-off-by: Keith Packard <keithp at keithp.com>
diff --git a/composite/compalloc.c b/composite/compalloc.c
index e16eecf..a2f3f14 100644
--- a/composite/compalloc.c
+++ b/composite/compalloc.c
@@ -148,6 +148,16 @@ compRedirectWindow (ClientPtr pClient, WindowPtr pWin, int update)
return BadAlloc;
if (ccw->update == CompositeRedirectManual)
{
+ /* If the window was CompositeRedirectAutomatic, then
+ * unmap the window so that the parent clip list will
+ * be correctly recomputed.
+ */
+ if (pWin->mapped)
+ {
+ DisableMapUnmapEvents (pWin);
+ UnmapWindow (pWin, FALSE);
+ EnableMapUnmapEvents (pWin);
+ }
if (cw->damageRegistered)
{
DamageUnregister (&pWin->drawable, cw->damage);
More information about the xorg-commit
mailing list