diff options
author | kristian <kristian@d7aaf104-2d23-0410-ae22-9d23157bf5a3> | 2007-02-06 16:52:47 +0000 |
---|---|---|
committer | kristian <kristian@d7aaf104-2d23-0410-ae22-9d23157bf5a3> | 2007-02-06 16:52:47 +0000 |
commit | 673935ed3726de35cd4da1209c4970e673693968 (patch) | |
tree | e853790548fcbe9088fabf93c351d473cc7f75c8 /beryl-plugins/src/rotate.c | |
parent | e7ef36d9eb01d3cb22dce8387e013cbc8f1b1eab (diff) | |
download | marex-dev-673935ed3726de35cd4da1209c4970e673693968.tar.gz marex-dev-673935ed3726de35cd4da1209c4970e673693968.tar.bz2 |
core + plugins: Make warpPointer() accept a CompScreen instead of CompDisplay.
Fixes crazy-cube-spinning and move-issues in multiscreen setups.
git-svn-id: file:///beryl/trunk@3701 d7aaf104-2d23-0410-ae22-9d23157bf5a3
Diffstat (limited to 'beryl-plugins/src/rotate.c')
-rw-r--r-- | beryl-plugins/src/rotate.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/beryl-plugins/src/rotate.c b/beryl-plugins/src/rotate.c index 70edd33..e8125fa 100644 --- a/beryl-plugins/src/rotate.c +++ b/beryl-plugins/src/rotate.c @@ -1597,13 +1597,13 @@ static Bool rotateFlip(CompScreen * s, int direction) { //rotation to right warpX = s->display->pointerX - s->width; - warpPointer(s->display, 10 - s->width, 0); + warpPointer(s, 10 - s->width, 0); s->display->lastPointerX = warpX; } else { warpX = s->display->pointerX + s->width; - warpPointer(s->display, s->width - 10, 0); + warpPointer(s, s->width - 10, 0); s->display->lastPointerX = warpX; } @@ -1731,14 +1731,14 @@ rotateEdgeFlip(CompScreen * s, { pointerDx = s->display->pointerX - s->display->lastPointerX; warpX = s->display->pointerX + s->width; - warpPointer(s->display, s->width - 10, 0); + warpPointer(s, s->width - 10, 0); s->display->lastPointerX = warpX - pointerDx; } else { pointerDx = s->display->pointerX - s->display->lastPointerX; warpX = s->display->pointerX - s->width; - warpPointer(s->display, 10 - s->width, 0); + warpPointer(s, 10 - s->width, 0); s->display->lastPointerX = warpX - pointerDx; } @@ -2009,7 +2009,8 @@ static void rotateHandleEvent(CompDisplay * d, XEvent * event) s->width - 50 || event->xmotion.y_root > s->height - 50) { - warpPointer(d, + printf("WRAPPING! x: %d y: %d\n", d->pointerX, d->pointerY); + warpPointer(s, (s->width / 2) - d->pointerX, |