Make sure the mouse motion is stopped before starting it.

This commit is contained in:
Marco Pesenti Gritti 2008-10-18 16:39:12 +02:00
parent f5d45d6acd
commit 794281073b

View File

@ -86,9 +86,9 @@ class MouseSpeedDetector(gobject.GObject):
self._mouse_pos = None self._mouse_pos = None
def start(self): def start(self):
self._state = None self.stop()
self._mouse_pos = self._get_mouse_position()
self._mouse_pos = self._get_mouse_position()
self._timeout_hid = gobject.timeout_add(self._delay, self._timer_cb) self._timeout_hid = gobject.timeout_add(self._delay, self._timer_cb)
def stop(self): def stop(self):