[Pkg-sugar-commit] [sugar-toolkit-gtk3] 01/06: MouseDetector timeout_id need reset
Jonas Smedegaard
dr at jones.dk
Mon Sep 14 14:27:06 UTC 2015
This is an automated email from the git hooks/post-receive script.
js pushed a commit to branch master
in repository sugar-toolkit-gtk3.
commit d75af4f7751d8334ca09a05bb77fd42f03bf200b
Author: Gonzalo Odiard <godiard at gmail.com>
Date: Fri Jul 24 15:07:09 2015 -0300
MouseDetector timeout_id need reset
The mouse detector have a variable to store the id for the timeout.
The stop() method check if the id is null but do not set the id to null
after remove the GObject timeout, then try to remove the timeout multiple times.
The efect can be seen if a user move the mouse slowly over the icons
in the Sugar home, in shell.log we see many lines like:
sugar3/graphics/palettewindow.py:443: Warning: Source ID 2464 was not found
when attempting to remove it
---
src/sugar3/graphics/palettewindow.py | 1 +
1 file changed, 1 insertion(+)
diff --git a/src/sugar3/graphics/palettewindow.py b/src/sugar3/graphics/palettewindow.py
index 13684fa..3ea5f01 100644
--- a/src/sugar3/graphics/palettewindow.py
+++ b/src/sugar3/graphics/palettewindow.py
@@ -441,6 +441,7 @@ class MouseSpeedDetector(GObject.GObject):
def stop(self):
if self._timeout_hid is not None:
GObject.source_remove(self._timeout_hid)
+ self._timeout_hid = None
self._state = None
def _get_mouse_position(self):
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-sugar/sugar-toolkit-gtk3.git
More information about the pkg-sugar-commit
mailing list