From 9a499cf9ff31087fa19fa434168e697bc984e0a6 Mon Sep 17 00:00:00 2001 From: Chris Jones Date: Tue, 17 Jun 2008 11:15:28 +0100 Subject: [PATCH] Make sure we retain focus when zooming/unzooming --- terminator | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/terminator b/terminator index 400e0f42..8d77454d 100755 --- a/terminator +++ b/terminator @@ -1629,9 +1629,7 @@ class Terminator: widget._vte.grab_focus() def zoom_term (self, widget, fontscale = False): - """Proof of concept: Maximize to full window - an instance of TerminatorTerm. - """ + """Maximize to full window an instance of TerminatorTerm.""" self.old_font = widget._vte.get_font () self.old_columns = widget._vte.get_column_count () self.old_rows = widget._vte.get_row_count () @@ -1653,6 +1651,8 @@ class Terminator: else: self._maximised = True + widget._vte.grab_focus () + def zoom_scale_font (self, widget, allocation): new_columns = widget._vte.get_column_count () new_rows = widget._vte.get_row_count () @@ -1687,6 +1687,8 @@ class Terminator: if isinstance(self.old_parent, gtk.Notebook): self.old_parent.set_current_page(self.old_page) + widget._vte.grab_focus () + if __name__ == '__main__': def execute_cb (option, opt, value, parser): assert value is None