Grab the focus on terminals when they are created or closed.

This commit is contained in:
Andrea Corbellini 2013-02-10 16:58:06 +01:00
parent 109794f024
commit 2662902b2a
2 changed files with 3 additions and 1 deletions

View File

@ -66,6 +66,7 @@ class Paned(Container):
container.add(terminal)
self.show_all()
sibling.grab_focus()
while gtk.events_pending():
gtk.main_iteration_do(False)
@ -248,7 +249,7 @@ class Paned(Container):
parent.remove(self)
self.cnxids.remove_all()
parent.add(sibling, metadata)
del(self)
sibling.grab_focus()
else:
dbg("Paned::wrapcloseterm: self.closeterm failed")

View File

@ -475,6 +475,7 @@ class Window(Container, gtk.Window):
for term in order:
container.add(term)
container.show_all()
sibling.grab_focus()
while gtk.events_pending():
gtk.main_iteration_do(False)