summaryrefslogtreecommitdiff
path: root/beryl-plugins/src/move.c
diff options
context:
space:
mode:
authormaniac <maniac@d7aaf104-2d23-0410-ae22-9d23157bf5a3>2006-11-09 07:49:17 +0000
committermaniac <maniac@d7aaf104-2d23-0410-ae22-9d23157bf5a3>2006-11-09 07:49:17 +0000
commitc58354815a4c1a9aad4304e10d0e01a339873688 (patch)
treec3eaab79e7aeed917965a012fd9a2090c5c13ce0 /beryl-plugins/src/move.c
parenta4bfe35dbc6ba5d825934c66f271536fecfcfda0 (diff)
downloadmarex-dev-c58354815a4c1a9aad4304e10d0e01a339873688.tar.gz
marex-dev-c58354815a4c1a9aad4304e10d0e01a339873688.tar.bz2
beryl-core & move plugin: at least improve mouse pointer desync on unsnapping maximized windows when moving them
git-svn-id: file:///beryl/trunk@1096 d7aaf104-2d23-0410-ae22-9d23157bf5a3
Diffstat (limited to 'beryl-plugins/src/move.c')
-rw-r--r--beryl-plugins/src/move.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/beryl-plugins/src/move.c b/beryl-plugins/src/move.c
index 2717fe8..1ca20ec 100644
--- a/beryl-plugins/src/move.c
+++ b/beryl-plugins/src/move.c
@@ -306,15 +306,18 @@ moveHandleMotionEvent (CompScreen * s, int xRoot, int yRoot)
if (yRoot - ms->snapOffY >=
md->opt[MOVE_DISPLAY_OPTION_SNAPOFF_DISTANCE].value.i)
{
+ XWindowChanges xwc;
int width = w->serverWidth;
- w->saveMask |= CWX | CWY;
+ if (restoreHorzRestoreData (w, &xwc) & CWWidth)
+ width = xwc.width;
+ restoreVertRestoreData (w, &xwc);
- if (w->saveMask & CWWidth)
- width = w->saveWc.width;
+ xwc.x = xRoot - (width >> 1);
+ xwc.y = yRoot + (w->input.top >> 1);
- w->saveWc.x = xRoot - (width >> 1);
- w->saveWc.y = yRoot + (w->input.top >> 1);
+ saveHorzRestoreData (w, &xwc);
+ saveVertRestoreData (w, &xwc);
md->x = md->y = 0;