summaryrefslogtreecommitdiff
path: root/beryl-plugins/src/move.c
diff options
context:
space:
mode:
authormaniac <maniac@d7aaf104-2d23-0410-ae22-9d23157bf5a3>2007-02-05 12:42:46 +0000
committermaniac <maniac@d7aaf104-2d23-0410-ae22-9d23157bf5a3>2007-02-05 12:42:46 +0000
commitae478908360dfa079f5b950125fabc11fd8fd14c (patch)
tree9ec6da24218271de4e6430bdf991ff572a673bdf /beryl-plugins/src/move.c
parentc1f0e4648b04bd886466baede6d0b4da0eea2a40 (diff)
downloadmarex-dev-ae478908360dfa079f5b950125fabc11fd8fd14c.tar.gz
marex-dev-ae478908360dfa079f5b950125fabc11fd8fd14c.tar.bz2
move plugin: fixed windows sometimes being restored to weird sizes when unsnapping maximized windows
git-svn-id: file:///beryl/trunk@3673 d7aaf104-2d23-0410-ae22-9d23157bf5a3
Diffstat (limited to 'beryl-plugins/src/move.c')
-rw-r--r--beryl-plugins/src/move.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/beryl-plugins/src/move.c b/beryl-plugins/src/move.c
index 94cfb40..02df1b8 100644
--- a/beryl-plugins/src/move.c
+++ b/beryl-plugins/src/move.c
@@ -444,13 +444,18 @@ static void moveHandleMotionEvent(CompScreen * s, int xRoot, int yRoot)
md->opt[MOVE_DISPLAY_OPTION_SNAPOFF_DISTANCE].value.i)
{
XWindowChanges xwc;
- int width = w->serverWidth;
- if (restoreHorzRestoreData(w, &xwc) & CWWidth)
- width = xwc.width;
+ syncWindowPosition(w);
+
+ xwc.x = w->serverX;
+ xwc.y = w->serverY;
+ xwc.width = w->serverWidth;
+ xwc.height = w->serverHeight;
+
+ restoreHorzRestoreData(w, &xwc);
restoreVertRestoreData(w, &xwc);
- xwc.x = xRoot - (width >> 1);
+ xwc.x = xRoot - (xwc.width >> 1);
xwc.y = yRoot + (w->input.top >> 1);
saveHorzRestoreData(w, &xwc);