**diff options**

Diffstat (limited to 'lazypointer.c')

-rw-r--r-- | lazypointer.c | 10 |

1 files changed, 10 insertions, 0 deletions

diff --git a/lazypointer.c b/lazypointer.c index 6b05175..a356ac2 100644 --- a/lazypointer.c +++ b/lazypointer.c @@ -93,6 +93,16 @@ lpPreparePaintScreen (CompScreen *s, int dx = ceilf(steps * (ls->destX - pointerX) * speed); int dy = ceilf(steps * (ls->destY - pointerY) * speed); + if (dx > 10) + dx = 10; + if (dy > 10) + dy = 10; + + if (dx < -10) + dx = -10; + if (dy < -10) + dy = -10; + if (dx == 0 && dy == 0) ls->needsWarp = FALSE; |