diff options
author | Ville Syrjälä <ville.syrjala@nokia.com> | 2010-12-20 16:37:24 +0200 |
---|---|---|
committer | Ville Syrjälä <ville.syrjala@nokia.com> | 2011-05-04 19:01:01 +0300 |
commit | 74663e61528346aeea9c11908b6980b51dcaeb68 (patch) | |
tree | 8dbb3a8c1377bc5953a2966e889c0b9c3eb0b2ce /composite/compwindow.c | |
parent | 193ecc8b453b22b3e60248b9354c768dbd405598 (diff) |
composite: Copy the window contents back from the pixmap
Since extra expose events are no longer generated during window
unredirection, the window contents must be preserved by the server.
So copy the window contents back from the pixmap. The copy can only
be done after the clips have been recomputed, so delay the copy and
the pixmap destruction until ValidateTree is done. Window borders are
restored by HandleExposures and thus don't need to be copied back.
Signed-off-by: Ville Syrjälä <ville.syrjala@nokia.com>
Reviewed-by: Daniel Stone <daniel@fooishbar.org>
Diffstat (limited to 'composite/compwindow.c')
-rw-r--r-- | composite/compwindow.c | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/composite/compwindow.c b/composite/compwindow.c index 2440f1897..bcbdf3572 100644 --- a/composite/compwindow.c +++ b/composite/compwindow.c @@ -164,8 +164,13 @@ compCheckRedirect (WindowPtr pWin) { if (should) return compAllocPixmap (pWin); - else - compFreePixmap (pWin); + else { + ScreenPtr pScreen = pWin->drawable.pScreen; + PixmapPtr pPixmap = (*pScreen->GetWindowPixmap) (pWin); + compSetParentPixmap (pWin); + compRestoreWindow (pWin, pPixmap); + (*pScreen->DestroyPixmap) (pPixmap); + } } return TRUE; } @@ -583,8 +588,11 @@ compDestroyWindow (WindowPtr pWin) while ((csw = GetCompSubwindows (pWin))) FreeResource (csw->clients->id, RT_NONE); - if (pWin->redirectDraw != RedirectDrawNone) - compFreePixmap (pWin); + if (pWin->redirectDraw != RedirectDrawNone) { + PixmapPtr pPixmap = (*pScreen->GetWindowPixmap) (pWin); + compSetParentPixmap (pWin); + (*pScreen->DestroyPixmap) (pPixmap); + } ret = (*pScreen->DestroyWindow) (pWin); cs->DestroyWindow = pScreen->DestroyWindow; pScreen->DestroyWindow = compDestroyWindow; |