From fdb63bcd0c724eb9f072be5ba996473e7e619a60 Mon Sep 17 00:00:00 2001
From: Yann Leboulanger <asterix@lagaule.org>
Date: Fri, 9 Mar 2012 08:40:21 +0100
Subject: [PATCH] fix focus behaviour when opening chat / groupchat window.
 Fixes #7115, see #5740

---
 src/chat_control.py      | 1 -
 src/groupchat_control.py | 1 -
 src/message_window.py    | 1 -
 3 files changed, 3 deletions(-)

diff --git a/src/chat_control.py b/src/chat_control.py
index ba01a9846c..9f38b7676e 100644
--- a/src/chat_control.py
+++ b/src/chat_control.py
@@ -469,7 +469,6 @@ class ChatControlBase(MessageControl, ChatCommandProcessor, CommandTools):
         self.user_nick = None
 
         self.smooth = True
-        self.msg_textview.grab_focus()
 
         self.command_hits = []
         self.last_key_tabs = False
diff --git a/src/groupchat_control.py b/src/groupchat_control.py
index 9581124f39..541f9bb40e 100644
--- a/src/groupchat_control.py
+++ b/src/groupchat_control.py
@@ -1307,7 +1307,6 @@ class GroupchatControl(ChatControlBase):
         self._update_banner_state_image()
         if self.parent_win:
             self.parent_win.redraw_tab(self)
-        gobject.idle_add(self.msg_textview.grab_focus)
 
     def got_disconnected(self):
         self.list_treeview.set_model(None)
diff --git a/src/message_window.py b/src/message_window.py
index c46d629e73..57d4cc5bda 100644
--- a/src/message_window.py
+++ b/src/message_window.py
@@ -307,7 +307,6 @@ class MessageWindow(object):
         # NOTE: we do not call set_control_active(True) since we don't know
         # whether the tab is the active one.
         self.show_title()
-        gobject.idle_add(control.msg_textview.grab_focus)
 
     def on_tab_eventbox_button_press_event(self, widget, event, child):
         if event.button == 3: # right click
-- 
GitLab