From 2662902b2a3acd399d4dc699e0cb4d8f2840de07 Mon Sep 17 00:00:00 2001 From: Andrea Corbellini Date: Sun, 10 Feb 2013 16:58:06 +0100 Subject: [PATCH] Grab the focus on terminals when they are created or closed. --- terminatorlib/paned.py | 3 ++- terminatorlib/window.py | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/terminatorlib/paned.py b/terminatorlib/paned.py index 22259b4f..3a3eafab 100755 --- a/terminatorlib/paned.py +++ b/terminatorlib/paned.py @@ -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") diff --git a/terminatorlib/window.py b/terminatorlib/window.py index b5b3cc7f..8e5cc28d 100755 --- a/terminatorlib/window.py +++ b/terminatorlib/window.py @@ -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)