From dc285ce15c8743087a3700d31e93f6eb256b8a94 Mon Sep 17 00:00:00 2001 From: Scott Kirkwood Date: Sun, 23 Feb 2014 20:18:07 -0500 Subject: [PATCH] Add patch from m.zdila, fix that mouse indicator won't disappear when releasing mouse button while it is moving and also won't keep indicator while fast clicking --- src/keymon/shaped_window.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/keymon/shaped_window.py b/src/keymon/shaped_window.py index 6bf5f5a..3793e5a 100755 --- a/src/keymon/shaped_window.py +++ b/src/keymon/shaped_window.py @@ -73,7 +73,7 @@ def center_on_cursor(self, x=None, y=None): def show(self): """Show this mouse indicator and ignore awaiting fade away request.""" - if self.timeout_timer: + if self.timeout_timer and self.shown: # There is a fade away request, ignore it gobject.source_remove(self.timeout_timer) self.timeout_timer = None @@ -82,7 +82,7 @@ def show(self): super(ShapedWindow, self).show() def maybe_show(self): - if self.shown: + if self.shown or not self.timeout_timer: return self.shown = True self.show() @@ -90,5 +90,5 @@ def maybe_show(self): def fade_away(self): """Make the window fade in a little bit.""" # TODO this isn't doing any fading out - self.shown = True + self.shown = False self.timeout_timer = gobject.timeout_add(int(self.timeout * 1000), self.hide)