summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam Spilsbury <Sam@XPS-SUSE.site>2008-11-18 11:42:43 +0900
committerSam Spilsbury <Sam@XPS-SUSE.site>2008-11-18 11:42:43 +0900
commit009c171da9bc6042650620050070216a1e3767e0 (patch)
treede2d31f4f6da65f33b3b6e3a53828a596717aebd
parent88c3cf3cb6a3e5835efd0ce97ac2549db3ab23f0 (diff)
downloadlazypointer-compiz-0.8.tar.gz
lazypointer-compiz-0.8.tar.bz2
* Stop excessive cusor movementcompiz-0.8
-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">