[PATCH 6/8] dix: Switch window unmap to mark normally instead of UnmapValData (v2)

Adam Jackson ajax at redhat.com
Wed Feb 25 13:03:12 PST 2015


v2: Don't leak a valdata on every transition to unpaintable (Peter
Harris)

Signed-off-by: Adam Jackson <ajax at redhat.com>
---
 dix/window.c   | 4 ++--
 mi/mivaltree.c | 1 +
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/dix/window.c b/dix/window.c
index 3d3361e..20fad3a 100644
--- a/dix/window.c
+++ b/dix/window.c
@@ -2748,7 +2748,7 @@ UnmapWindow(WindowPtr pWin, Bool fromConfigure)
     if (SubStrSend(pWin, pParent))
         DeliverUnmapNotify(pWin, fromConfigure);
     if (wasPaintable && !fromConfigure) {
-        pWin->valdata = UnmapValData;
+        (*pScreen->MarkWindow) (pWin);
         (*pScreen->MarkOverlappedWindows) (pWin, pWin->nextSib, &pLayerWin);
         (*pScreen->MarkWindow) (pLayerWin->parent);
     }
@@ -2798,7 +2798,7 @@ UnmapSubwindows(WindowPtr pWin)
             if (parentNotify || StrSend(pChild))
                 DeliverUnmapNotify(pChild, xFalse);
             if (pChild->viewable) {
-                pChild->valdata = UnmapValData;
+                (*pScreen->MarkWindow) (pChild);
                 anyMarked = TRUE;
             }
             pChild->mapped = FALSE;
diff --git a/mi/mivaltree.c b/mi/mivaltree.c
index f8a25b8..a9f3523 100644
--- a/mi/mivaltree.c
+++ b/mi/mivaltree.c
@@ -699,6 +699,7 @@ miValidateTree(WindowPtr pParent,       /* Parent to validate */
                 if (pScreen->ClipNotify)
                     (*pScreen->ClipNotify) (pWin, 0, 0);
                 RegionEmpty(&pWin->borderClip);
+                free(pWin->valdata);
                 pWin->valdata = NULL;
             }
         }
-- 
1.9.3



More information about the xorg-devel mailing list