diff --git a/terminatorlib/terminal.py b/terminatorlib/terminal.py index 7acd9ec2..8d11bea2 100755 --- a/terminatorlib/terminal.py +++ b/terminatorlib/terminal.py @@ -925,7 +925,7 @@ for %s (%s)' % (name, urlplugin.__class__.__name__)) def grab_focus(self): """Steal focus for this terminal""" - if not self.vte.has_focus(): + if not self.vte.flags()>k.HAS_FOCUS: self.vte.grab_focus() def on_vte_focus(self, _widget): diff --git a/terminatorlib/terminator.py b/terminatorlib/terminator.py index 5f6e49ca..34726cba 100755 --- a/terminatorlib/terminator.py +++ b/terminatorlib/terminator.py @@ -332,7 +332,7 @@ class Terminator(Borg): def get_focussed_terminal(self): """iterate over all the terminals to find which, if any, has focus""" for terminal in self.terminals: - if terminal.has_focus(): + if terminal.flags()>k.HAS_FOCUS: return(terminal) return(None)