Fix composed characters when broadcast is turned on to appear in all receivers now (LP:#1463704)

This commit is contained in:
Stephen Boddy 2015-08-10 22:51:46 +02:00
parent c68aad67b6
commit a7ac05641d
2 changed files with 13 additions and 0 deletions

View File

@ -53,6 +53,12 @@ if __name__ == '__main__':
# Not used in the 0.2x versions of VTE and can cause unwanted chars in console.
if os.environ.has_key('VTE_VERSION'):
del os.environ['VTE_VERSION']
# Workaround for IBus intefering with broadcast when using dead keys
# Environment also needs IBUS_DISABLE_SNOOPER=1, or double chars appear
# in the receivers.
os.environ['IBUS_DISABLE_SNOOPER']='1'
dbus_service = None
dbg ("%s starting up, version %s" % (APP_NAME, APP_VERSION))

View File

@ -844,6 +844,13 @@ class Terminal(gtk.VBox):
dbg('Terminal::on_keypress: Called on %s with no event' % widget)
return(False)
# Workaround for IBus intefering with broadcast when using dead keys
# Environment also needs IBUS_DISABLE_SNOOPER=1, or double chars appear
# in the receivers.
if (event.state | gtk.gdk.MODIFIER_MASK ) ^ gtk.gdk.MODIFIER_MASK != 0:
dbg('Terminal::on_keypress: Ingore processed event with event.state %d' % event.state)
return(False)
# FIXME: Does keybindings really want to live in Terminator()?
mapping = self.terminator.keybindings.lookup(event)