when we click on systray, do not hide roster, just move it. Fixes #2403
This commit is contained in:
parent
3abc8a02d5
commit
dcbe3e5682
2 changed files with 7 additions and 5 deletions
|
@ -390,7 +390,7 @@ def possibly_move_window_in_current_desktop(window):
|
||||||
current virtual desktop
|
current virtual desktop
|
||||||
window is GTK window'''
|
window is GTK window'''
|
||||||
if os.name == 'nt':
|
if os.name == 'nt':
|
||||||
return
|
return False
|
||||||
|
|
||||||
root_window = gtk.gdk.screen_get_default().get_root_window()
|
root_window = gtk.gdk.screen_get_default().get_root_window()
|
||||||
# current user's vd
|
# current user's vd
|
||||||
|
@ -406,6 +406,8 @@ def possibly_move_window_in_current_desktop(window):
|
||||||
# we are in another VD that the window was
|
# we are in another VD that the window was
|
||||||
# so show it in current VD
|
# so show it in current VD
|
||||||
window.present()
|
window.present()
|
||||||
|
return True
|
||||||
|
return False
|
||||||
|
|
||||||
def file_is_locked(path_to_file):
|
def file_is_locked(path_to_file):
|
||||||
'''returns True if file is locked (WINDOWS ONLY)'''
|
'''returns True if file is locked (WINDOWS ONLY)'''
|
||||||
|
|
|
@ -253,11 +253,11 @@ class Systray:
|
||||||
if len(gajim.events.get_systray_events()) == 0:
|
if len(gajim.events.get_systray_events()) == 0:
|
||||||
# no pending events, so toggle visible/hidden for roster window
|
# no pending events, so toggle visible/hidden for roster window
|
||||||
if win.get_property('visible'): # visible in ANY virtual desktop?
|
if win.get_property('visible'): # visible in ANY virtual desktop?
|
||||||
win.hide() # we hide it from VD that was visible in
|
|
||||||
|
|
||||||
# but we could be in another VD right now. eg vd2
|
# we could be in another VD right now. eg vd2
|
||||||
# and we want not only to hide it in vd1 but also show it in vd2
|
# and we want to show it in vd2
|
||||||
gtkgui_helpers.possibly_move_window_in_current_desktop(win)
|
if not gtkgui_helpers.possibly_move_window_in_current_desktop(win):
|
||||||
|
win.hide() # else we hide it from VD that was visible in
|
||||||
else:
|
else:
|
||||||
win.present()
|
win.present()
|
||||||
else:
|
else:
|
||||||
|
|
Loading…
Add table
Reference in a new issue