diff options
author | Yann Leboulanger <asterix@lagaule.org> | 2009-09-23 19:35:42 +0400 |
---|---|---|
committer | Yann Leboulanger <asterix@lagaule.org> | 2009-09-23 19:35:42 +0400 |
commit | 17f17267ea8791b82bf0a4d072581262f247208c (patch) | |
tree | 4a15b28d1c9e39fe2c26cbeb2621029e4f4e2f03 | |
parent | abba30b439ae36e2c318afbaf7beca06d9e07d5f (diff) |
call gtk.gdk.window.focus() with current timestamp rather than 0. This fixes some WM issues.
-rw-r--r-- | src/gajim.py | 2 | ||||
-rw-r--r-- | src/remote_control.py | 5 | ||||
-rw-r--r-- | src/roster_window.py | 4 |
3 files changed, 6 insertions, 5 deletions
diff --git a/src/gajim.py b/src/gajim.py index 6abcbe442..d470c5ce5 100644 --- a/src/gajim.py +++ b/src/gajim.py @@ -2527,7 +2527,7 @@ class Interface: self.roster.draw_contact(jid, account) if w: w.set_active_tab(ctrl) - w.window.window.focus() + w.window.window.focus(gtk.get_current_event_time()) # Using isinstance here because we want to catch all derived types if isinstance(ctrl, ChatControlBase): tv = ctrl.conv_textview diff --git a/src/remote_control.py b/src/remote_control.py index e331b8c05..f50370708 100644 --- a/src/remote_control.py +++ b/src/remote_control.py @@ -27,6 +27,7 @@ ## import gobject +import gtk import os from common import gajim @@ -377,7 +378,7 @@ class SignalObject(dbus.service.Object): win = gajim.interface.msg_win_mgr.get_window(jid, connected_account).window if win.get_property('visible'): - win.window.focus() + win.window.focus(gtk.get_current_event_time()) return DBUS_BOOLEAN(True) return DBUS_BOOLEAN(False) @@ -507,7 +508,7 @@ class SignalObject(dbus.service.Object): win.present() # preserve the 'steal focus preservation' if self._is_first(): - win.window.focus() + win.window.focus(gtk.get_current_event_time()) else: win.window.focus(long(time())) diff --git a/src/roster_window.py b/src/roster_window.py index bc4b432db..69e35c250 100644 --- a/src/roster_window.py +++ b/src/roster_window.py @@ -2929,7 +2929,7 @@ class RosterWindow: if gc_control: mw = gajim.interface.msg_win_mgr.get_window(jid, account) mw.set_active_tab(gc_control) - mw.window.window.focus() + mw.window.window.focus(gtk.get_current_event_time()) return ctrl = gajim.interface.minimized_controls[account][jid] mw = gajim.interface.msg_win_mgr.get_window(jid, account) @@ -2939,7 +2939,7 @@ class RosterWindow: ctrl.parent_win = mw mw.new_tab(ctrl) mw.set_active_tab(ctrl) - mw.window.window.focus() + mw.window.window.focus(gtk.get_current_event_time()) self.remove_groupchat(jid, account) def on_edit_account(self, widget, account): |