Skip to content

Commit

Permalink
Add patch from m.zdila, fix that mouse indicator won't disappear when…
Browse files Browse the repository at this point in the history
… releasing mouse button while it is moving and also won't keep indicator while fast clicking
  • Loading branch information
scottkirkwood committed Feb 24, 2014
1 parent 24c71f3 commit dc285ce
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/keymon/shaped_window.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -82,13 +82,13 @@ 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()

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)

0 comments on commit dc285ce

Please sign in to comment.