diff options
author | Yann Leboulanger <asterix@lagaule.org> | 2008-08-01 00:12:23 +0400 |
---|---|---|
committer | Yann Leboulanger <asterix@lagaule.org> | 2008-08-01 00:12:23 +0400 |
commit | 879ceac36ccde7b55b578c348f64689b619b6c39 (patch) | |
tree | a0295f56702b678f47ab300998e80a2e712e281d | |
parent | 3f3e33c8469cfeb2afd630f0439d5398c4b6d909 (diff) |
don't delay click on systray if there is no waiting event. Fixes #2932
-rw-r--r-- | src/systray.py | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/src/systray.py b/src/systray.py index 09dc67f58..2abc6b23d 100644 --- a/src/systray.py +++ b/src/systray.py @@ -321,15 +321,20 @@ class Systray: def on_clicked(self, widget, event): self.on_tray_leave_notify_event(widget, None) if event.type == gtk.gdk._2BUTTON_PRESS: + if len(gajim.events.get_systray_events()) == 0: + return self.double_click = True self.on_middle_click() if event.type != gtk.gdk.BUTTON_PRESS: return if event.button == 1: # Left click - if self.double_click_id: - gobject.source_remove(self.double_click_id) - self.double_click_id = gobject.timeout_add(self.double_click_time, - self.on_left_click) + if len(gajim.events.get_systray_events()) == 0: + self.on_left_click() + else: + if self.double_click_id: + gobject.source_remove(self.double_click_id) + self.double_click_id = gobject.timeout_add( + self.double_click_time, self.on_left_click) elif event.button == 2: # middle click self.on_middle_click() elif event.button == 3: # right click |