diff --git a/terminatorlib/terminal.py b/terminatorlib/terminal.py index 1fe71957..7929d98f 100755 --- a/terminatorlib/terminal.py +++ b/terminatorlib/terminal.py @@ -1088,6 +1088,7 @@ class Terminal(gtk.VBox): self.vte.set_colors(self.fgcolor_active, self.bgcolor, self.palette_active) self.set_cursor_color() + self.terminator.last_focused_term = self self.emit('focus-in') def on_vte_focus_out(self, _widget, _event): diff --git a/terminatorlib/window.py b/terminatorlib/window.py index a9089b2a..0f5ab34f 100755 --- a/terminatorlib/window.py +++ b/terminatorlib/window.py @@ -691,11 +691,13 @@ class Window(Container, gtk.Window): self.terminator.create_group(group) for terminal in self.terminator.terminals: terminal.set_group(None, group) + self.terminator.focus_changed(self.terminator.last_focused_term) def ungroup_all(self, widget): """Ungroup all terminals""" for terminal in self.terminator.terminals: terminal.set_group(None, None) + self.terminator.focus_changed(self.terminator.last_focused_term) def group_tab(self, widget): """Group all terminals in the current tab""" @@ -714,6 +716,7 @@ class Window(Container, gtk.Window): pagenum += 1 for terminal in self.get_visible_terminals(): terminal.set_group(None, group) + self.terminator.focus_changed(self.terminator.last_focused_term) def ungroup_tab(self, widget): """Ungroup all terminals in the current tab""" @@ -726,6 +729,7 @@ class Window(Container, gtk.Window): for terminal in self.get_visible_terminals(): terminal.set_group(None, None) + self.terminator.focus_changed(self.terminator.last_focused_term) def move_tab(self, widget, direction): """Handle a keyboard shortcut for moving tab positions"""