| author | Sam Spilsbury <smspillaz@gmail.com> | 2010-03-19 09:36:11 (GMT) |
|---|---|---|
| committer | Sam Spilsbury <smspillaz@gmail.com> | 2010-03-19 09:36:11 (GMT) |
| commit | 11990f1f1156d883184465844e82b8620ae80665 (patch) (side-by-side diff) | |
| tree | e3ac885b76fbcd52e8bf8518f66b244f7568738b | |
| parent | e1c683d95a2a7edf1651134299982f039de533d7 (diff) | |
| download | core-11990f1f1156d883184465844e82b8620ae80665.tar.gz core-11990f1f1156d883184465844e82b8620ae80665.tar.bz2 | |
Keep pixmaps around if window has been unmapped on resize.
| -rw-r--r-- | plugins/composite/src/window.cpp | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/plugins/composite/src/window.cpp b/plugins/composite/src/window.cpp index 7cf7094..a49f7f8 100644 --- a/plugins/composite/src/window.cpp +++ b/plugins/composite/src/window.cpp @@ -547,6 +547,7 @@ PrivateCompositeWindow::resizeNotify (int dx, int dy, int dwidth, int dheight) Pixmap pixmap = None; + if (window->shaded () || (window->isViewable () && damaged)) { int x, y, x1, x2, y1, y2; @@ -583,10 +584,21 @@ PrivateCompositeWindow::resizeNotify (int dx, int dy, int dwidth, int dheight) } } - cWindow->addDamage (); + if (!window->mapNum () && window->hasUnmapReference () && + !window->invisible ()) + { + /* keep old pixmap for windows that are unmapped on the client side, + * but not yet on our side as it's pretty likely that plugins are + * currently using it for animations + */ + } + else + { + cWindow->release (); + this->pixmap = pixmap; + } - cWindow->release (); - this->pixmap = pixmap; + cWindow->addDamage (); } void |
