Skip to content
Snippets Groups Projects
Commit 879ceac3 authored by Yann Leboulanger's avatar Yann Leboulanger
Browse files

don't delay click on systray if there is no waiting event. Fixes #2932

parent 3f3e33c8
No related branches found
No related tags found
No related merge requests found
......@@ -321,15 +321,20 @@ def on_middle_click(self):
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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment