summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorSam Spilsbury <smspillaz@gmail.com>2010-03-15 21:35:52 +0800
committerSam Spilsbury <smspillaz@gmail.com>2010-03-15 21:35:52 +0800
commit6c7d254d7f7b3706e9a6294a1c16c7cc9a05568f (patch)
tree93258648c403bdf42fdcdc8a4720f5d8d2c1c200 /src
parent72fe582f7dfbc545bf5bae7043be13c0218daea6 (diff)
downloadzcomp-6c7d254d7f7b3706e9a6294a1c16c7cc9a05568f.tar.gz
zcomp-6c7d254d7f7b3706e9a6294a1c16c7cc9a05568f.tar.bz2
Keep pixmaps of unmapped windows around if they are used for animations.
Previously, they were discarded if the window was resized right after being unmapped. As that might end close animations too early, keep the pixmap around until setting the internal state to 'unmapped'. For those cases, the pixmap size (width/height) will differ from the window geometry (attrib.width/attrib.height), though, so plugins should use the former values for animation purposes. Forward port of 54833da0e3d8efb946dcb38afe27914a47f1565f to master
Diffstat (limited to 'src')
-rw-r--r--src/window.cpp15
1 files changed, 13 insertions, 2 deletions
diff --git a/src/window.cpp b/src/window.cpp
index 92b948f..eb5243f 100644
--- a/src/window.cpp
+++ b/src/window.cpp
@@ -1416,8 +1416,19 @@ CompWindow::resize (CompWindow::Geometry gm)
priv->attrib.width, priv->attrib.height,
priv->attrib.border_width);
- priv->width = pw;
- priv->height = ph;
+ if (!priv->mapNum && priv->unmapRefCnt > 0 &&
+ priv->attrib.map_state == IsViewable)
+ {
+ /* 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
+ {
+ priv->width = pw;
+ priv->height = ph;
+ }
if (priv->mapNum)
priv->updateRegion ();