summaryrefslogtreecommitdiff
path: root/beryl-plugins/src/resize.c
diff options
context:
space:
mode:
authormaniac <maniac@d7aaf104-2d23-0410-ae22-9d23157bf5a3>2006-11-25 12:10:56 +0000
committermaniac <maniac@d7aaf104-2d23-0410-ae22-9d23157bf5a3>2006-11-25 12:10:56 +0000
commit7d5a47c487099e5b37f0c86cae78435e62b2423a (patch)
tree7a75b7e34fa43ce7976ca0932f5b6565644f479e /beryl-plugins/src/resize.c
parent7aea0c40f2ce5ac363f7bbb7064f00158e011218 (diff)
downloadmarex-dev-7d5a47c487099e5b37f0c86cae78435e62b2423a.tar.gz
marex-dev-7d5a47c487099e5b37f0c86cae78435e62b2423a.tar.bz2
resize plugin: fix mouse pointer desynchronization if resizing hitw window constraints
git-svn-id: file:///beryl/trunk@1423 d7aaf104-2d23-0410-ae22-9d23157bf5a3
Diffstat (limited to 'beryl-plugins/src/resize.c')
-rw-r--r--beryl-plugins/src/resize.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/beryl-plugins/src/resize.c b/beryl-plugins/src/resize.c
index 39cd1b9..1d0bc9b 100644
--- a/beryl-plugins/src/resize.c
+++ b/beryl-plugins/src/resize.c
@@ -346,6 +346,13 @@ static void resizeUpdateWindowSize (CompDisplay *d, int dx, int dy)
new_height = h;
resizeConstrainMinMax (rd->w, w, h, &new_width, &new_height);
+ if ((w != new_width) || (h != new_height))
+ {
+ /* if the resizing hit constraints, move the mouse
+ pointer to the new border to avoid desynchronization */
+ warpPointer (d, new_width - w, new_height - h);
+ }
+
dx -= new_width - w;
dy -= new_height - h;