diff options
author | Robert Bragg <robert@linux.intel.com> | 2012-01-12 18:16:09 +0000 |
---|---|---|
committer | Kristian Høgsberg <krh@bitplanet.net> | 2012-03-27 09:32:00 -0400 |
commit | c2b86c77f13d0ffa8f486f005926bad713378c31 (patch) | |
tree | e70843bc0dbfe8f092c1bf930498a09897a3f169 /composite | |
parent | 395fb7c0a297fd51dc00c36523980e2d76577360 (diff) |
xwayland: unredirect sub-windows when root destroyed
This ensures that we unredirect root sub-windows when the root window is
being destroyed. We need to do this explicitly rather than rely on the
the CompositeClientSubwindows resource being freed automatically because
that may not happen until after the root window has already been freed
resulting in uninitialized memory access.
Diffstat (limited to 'composite')
-rw-r--r-- | composite/compalloc.c | 5 | ||||
-rw-r--r-- | composite/compositeext.h | 2 |
2 files changed, 7 insertions, 0 deletions
diff --git a/composite/compalloc.c b/composite/compalloc.c index 2caf79eb0..e5b279b16 100644 --- a/composite/compalloc.c +++ b/composite/compalloc.c @@ -521,6 +521,11 @@ compUnredirectSubwindows (ClientPtr pClient, WindowPtr pWin, int update) return BadValue; } +int CompositeUnRedirectSubwindows (WindowPtr pWin, int update) +{ + return compUnredirectSubwindows (serverClient, pWin, update); +} + /* * Add redirection information for one subwindow (during reparent) */ diff --git a/composite/compositeext.h b/composite/compositeext.h index c1e915ae1..9c5330a39 100644 --- a/composite/compositeext.h +++ b/composite/compositeext.h @@ -36,5 +36,7 @@ extern _X_EXPORT Bool CompositeRegisterAlternateVisuals(ScreenPtr pScreen, int nVisuals); extern _X_EXPORT int CompositeRedirectSubwindows(WindowPtr pWin, int update); +extern _X_EXPORT int CompositeUnRedirectSubwindows (WindowPtr pWin, + int update); #endif /* _COMPOSITEEXT_H_ */ |