From be6128f7be17f8d0861dc6d2e34d6bf5aed3624e Mon Sep 17 00:00:00 2001 From: Stephen Boddy Date: Thu, 26 Feb 2015 00:07:14 +0100 Subject: [PATCH] Minor focus grabbing fix from the GTK3 port. --- terminatorlib/terminal.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/terminatorlib/terminal.py b/terminatorlib/terminal.py index e9ab07ac..8b3718cf 100755 --- a/terminatorlib/terminal.py +++ b/terminatorlib/terminal.py @@ -1017,8 +1017,8 @@ class Terminal(Gtk.VBox): def grab_focus(self): """Steal focus for this terminal""" -# if not self.vte.flags()&Gtk.HAS_FOCUS: # VERIFY FOR GTK3: how to do this? or should we just simply omit this and grab unconditionally? - self.vte.grab_focus() + if not self.vte.has_focus(): + self.vte.grab_focus() def ensure_visible_and_focussed(self): """Make sure that we're visible and focussed"""