summaryrefslogtreecommitdiff
path: root/beryl-plugins/src/move.c
diff options
context:
space:
mode:
authormaniac <maniac@d7aaf104-2d23-0410-ae22-9d23157bf5a3>2007-02-07 10:45:01 +0000
committermaniac <maniac@d7aaf104-2d23-0410-ae22-9d23157bf5a3>2007-02-07 10:45:01 +0000
commit190c99a73b2f861d4ba9d3284c379c4012401c0c (patch)
treea06e27211141ce6891362a3d8bdace8f12577948 /beryl-plugins/src/move.c
parente82fed250963680d095f132645814781ee787199 (diff)
downloadmarex-dev-190c99a73b2f861d4ba9d3284c379c4012401c0c.tar.gz
marex-dev-190c99a73b2f861d4ba9d3284c379c4012401c0c.tar.bz2
beryl-core & -plugins:
- cleaned up window geometry save & restore code - now needs less X property accesses - removed some old, seemingly unneeded, code - removed some commented code - please tell me if this breaks anything git-svn-id: file:///beryl/trunk@3764 d7aaf104-2d23-0410-ae22-9d23157bf5a3
Diffstat (limited to 'beryl-plugins/src/move.c')
-rw-r--r--beryl-plugins/src/move.c20
1 files changed, 7 insertions, 13 deletions
diff --git a/beryl-plugins/src/move.c b/beryl-plugins/src/move.c
index 380a80c..b6a3884 100644
--- a/beryl-plugins/src/move.c
+++ b/beryl-plugins/src/move.c
@@ -443,23 +443,17 @@ static void moveHandleMotionEvent(CompScreen * s, int xRoot, int yRoot)
ms->snapOffY >=
md->opt[MOVE_DISPLAY_OPTION_SNAPOFF_DISTANCE].value.i)
{
- XWindowChanges xwc;
+ int width = w->serverWidth;
- syncWindowPosition(w);
+ w->saveMask |= CWX | CWY;
- xwc.x = w->serverX;
- xwc.y = w->serverY;
- xwc.width = w->serverWidth;
- xwc.height = w->serverHeight;
+ if (w->saveMask & CWWidth)
+ width = w->saveWc.width;
- restoreHorzRestoreData(w, &xwc);
- restoreVertRestoreData(w, &xwc);
+ w->saveWc.x = xRoot - (width >> 1);
+ w->saveWc.y = yRoot + (w->input.top >> 1);
- xwc.x = xRoot - (xwc.width >> 1);
- xwc.y = yRoot + (w->input.top >> 1);
-
- saveHorzRestoreData(w, &xwc);
- saveVertRestoreData(w, &xwc);
+ updateSavedWindowGeometryAtom(w);
md->x = md->y = 0;