From ee1d7f1fcf062d1490b28a0cf6f71e0c2d59f49a Mon Sep 17 00:00:00 2001 From: Chris Jones Date: Wed, 11 May 2011 13:36:47 +0100 Subject: [PATCH] emitting made a poor assumption about focus, which was broken in multiple window situations. No more. --- terminatorlib/terminal.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/terminatorlib/terminal.py b/terminatorlib/terminal.py index 3d5869c2..f28e9d5c 100755 --- a/terminatorlib/terminal.py +++ b/terminatorlib/terminal.py @@ -747,7 +747,8 @@ for %s (%s)' % (name, urlplugin.__class__.__name__)) # maybe we can emit the key event and let Terminator() care? groupsend = self.terminator.groupsend groupsend_type = self.terminator.groupsend_type - if groupsend != groupsend_type['off'] and self.vte.is_focus(): + window_focussed = get_top_window(self.vte).get_property('has-toplevel-focus') + if groupsend != groupsend_type['off'] and window_focussed and self.vte.is_focus(): if self.group and groupsend == groupsend_type['group']: self.terminator.group_emit(self, self.group, 'key-press-event', event)