From 4b1b58544e467ccae0c98250d97ff95d50ec6e15 Mon Sep 17 00:00:00 2001 From: Chris Jones Date: Sun, 11 Apr 2010 00:54:07 +0100 Subject: [PATCH] gtk.Widget.has_focus() is too new, look for gtk.HAS_FOCUS in flags() instead --- terminatorlib/terminal.py | 2 +- terminatorlib/terminator.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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)