From 87327547947a5bfe616106e9c90e08d422c0b4a0 Mon Sep 17 00:00:00 2001 From: Chris Jones Date: Fri, 5 Mar 2010 19:54:39 +0000 Subject: [PATCH] Don't grab focus when we're respawning a child --- terminatorlib/terminal.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/terminatorlib/terminal.py b/terminatorlib/terminal.py index c461d7c6..6e1a4164 100755 --- a/terminatorlib/terminal.py +++ b/terminatorlib/terminal.py @@ -504,7 +504,7 @@ for %s (%s)' % (name, urlplugin.__class__.__name__)) self.cnxids.remove_signal(self.vte, 'child-exited') if self.config['exit_action'] == 'restart': - self.cnxids.new(self.vte, 'child-exited', self.spawn_child) + self.cnxids.new(self.vte, 'child-exited', self.spawn_child, True) elif self.config['exit_action'] in ('close', 'left'): self.cnxids.new(self.vte, 'child-exited', lambda x: self.emit('close-term')) @@ -1037,7 +1037,7 @@ for %s (%s)' % (name, urlplugin.__class__.__name__)) """Restore normal layout""" self.emit('unzoom') - def spawn_child(self, widget=None): + def spawn_child(self, widget=None, respawn=False): update_records = self.config['update_records'] login = self.config['login_shell'] args = [] @@ -1048,7 +1048,8 @@ for %s (%s)' % (name, urlplugin.__class__.__name__)) dbg('still laying out, refusing to spawn a child') return - self.vte.grab_focus() + if respawn == False: + self.vte.grab_focus() options = self.config.options_get() if options and options.command: