diff options
author | Peter Hutterer <peter.hutterer@who-t.net> | 2012-05-21 10:19:42 +1000 |
---|---|---|
committer | Peter Hutterer <peter.hutterer@who-t.net> | 2012-05-31 14:56:46 +1000 |
commit | a46f3a60785a07c2dec9b62c425d732d20a4c9f8 (patch) | |
tree | d2964e0bed1e72e3d859f9f2daaeb1b51f9f9d45 | |
parent | b94a2aaf0607c2bcb84ba9f5b2016a8792b0c4b9 (diff) |
timer_time must be updated where we call to the frontend.
The frontend should just wrap whatever time mechanism it have, not fiddle
with internal state.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
-rw-r--r-- | src/synaptics-x11.c | 2 | ||||
-rw-r--r-- | src/synaptics.c | 7 |
2 files changed, 5 insertions, 4 deletions
diff --git a/src/synaptics-x11.c b/src/synaptics-x11.c index f4deeee..3be03b5 100644 --- a/src/synaptics-x11.c +++ b/src/synaptics-x11.c @@ -114,8 +114,6 @@ void SetTimer(SynapticsPrivate *priv, unsigned int now, unsigned int delay) { struct SynapticsX11 *x11 = priv->frontend_data; - - priv->timer_time = GetTimeInMillis(); x11->timer = TimerSet(x11->timer, 0, delay, X11TimerFunc, x11->pInfo); } diff --git a/src/synaptics.c b/src/synaptics.c index f7afe35..f499d1c 100644 --- a/src/synaptics.c +++ b/src/synaptics.c @@ -800,8 +800,11 @@ SynapticsReadInput(SynapticsPrivate *priv) newDelay = TRUE; } - if (newDelay) - SetTimer(priv, SynapticsGetCurrentMillis(), delay); + if (newDelay){ + unsigned int now = SynapticsGetCurrentMillis(); + priv->timer_time = now; + SetTimer(priv, now, delay); + } } static int |