summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lazypointer.c10
-rw-r--r--lazypointer.xml.in2
2 files changed, 11 insertions, 1 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;
diff --git a/lazypointer.xml.in b/lazypointer.xml.in
index cf1a201..24db8a5 100644
--- a/lazypointer.xml.in
+++ b/lazypointer.xml.in
@@ -29,7 +29,7 @@
<_short>Cursor Movement speed</_short>
<_long>How fast the cursor should move when animated</_long>
<min>1</min>
- <max>20</max>
+ <max>15</max>
<default>4</default>
</option>
<option type="key" name="initiate_window_key">