summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam Spilsbury <sam.spilsbury@canonical.com>2010-12-07 22:49:32 +0800
committerSam Spilsbury <sam.spilsbury@canonical.com>2010-12-07 22:49:32 +0800
commit57618b0c281709ff97330b7f38b8217878d235e8 (patch)
tree733f72f38f124324a1cf85b03b69a1a3804a7d04
parente923bd42fb3c67e033a25929711246b5b926569d (diff)
downloadcompiz-with-glib-mainloop-57618b0c281709ff97330b7f38b8217878d235e8.tar.gz
compiz-with-glib-mainloop-57618b0c281709ff97330b7f38b8217878d235e8.tar.bz2
Fix window offset at the start of close animation.
Forward port 0a28ca484a8a72060b580e0ccc75ea20f3ddab1a
-rw-r--r--src/event.cpp21
-rw-r--r--src/window.cpp22
2 files changed, 22 insertions, 21 deletions
diff --git a/src/event.cpp b/src/event.cpp
index b118fa7..ee4ddfd 100644
--- a/src/event.cpp
+++ b/src/event.cpp
@@ -1084,28 +1084,7 @@ CompScreen::handleEvent (XEvent *event)
if (!w->overrideRedirect ())
priv->setWmState (WithdrawnState, w->id ());
- if (w->priv->managed)
- {
- XWindowChanges xwc;
- unsigned int xwcm;
- int gravity = w->priv->sizeHints.win_gravity;
-
- /* revert gravity adjustment made at MapNotify time */
- xwc.x = w->priv->serverGeometry.x ();
- xwc.y = w->priv->serverGeometry.y ();
- xwc.width = w->priv->serverGeometry.width ();
- xwc.height = w->priv->serverGeometry.height ();
-
- xwcm = w->priv->adjustConfigureRequestForGravity (&xwc,
- CWX | CWY,
- gravity,
- -1);
- if (xwcm)
- w->configureXWindow (xwcm, &xwc);
- }
-
w->priv->placed = false;
- w->priv->managed = false;
w->priv->unmanaging = true;
if (w->priv->frame)
{
diff --git a/src/window.cpp b/src/window.cpp
index ea53c5f..92302de 100644
--- a/src/window.cpp
+++ b/src/window.cpp
@@ -1345,6 +1345,28 @@ CompWindow::unmap ()
if (priv->unmapRefCnt > 0)
return;
+ if (priv->managed)
+ {
+ XWindowChanges xwc;
+ unsigned int xwcm;
+ int gravity = priv->sizeHints.win_gravity;
+
+ /* revert gravity adjustment made at MapNotify time */
+ xwc.x = priv->serverGeometry.x ();
+ xwc.y = priv->serverGeometry.y ();
+ xwc.width = priv->serverGeometry.width ();
+ xwc.height = priv->serverGeometry.height ();
+
+ xwcm = priv->adjustConfigureRequestForGravity (&xwc,
+ CWX | CWY,
+ gravity,
+ -1);
+ if (xwcm)
+ configureXWindow (xwcm, &xwc);
+
+ priv->managed = false;
+ }
+
if (priv->struts)
screen->updateWorkarea ();