From 1e8940039a75b5a6fb32e59b4a2130da4777065f Mon Sep 17 00:00:00 2001 From: ozzdemir Date: Thu, 27 Jan 2022 00:20:56 +0300 Subject: [PATCH 1/2] Added hotfix for #78 that deletes GTK_IM_MODULE environment variable Using this hotfix for a while, and no discrepancy observed. In order to permanently(hopefully) fix the issue, commiting fix. --- terminator | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/terminator b/terminator index d459a9ed..3bb9294b 100755 --- a/terminator +++ b/terminator @@ -53,6 +53,16 @@ from terminatorlib.util import dbg, err from terminatorlib.layoutlauncher import LayoutLauncher from terminatorlib.configjson import ConfigJson + +# Deleting env variable fixes double char problem when broadcasting (#78) +# Only delete if it exists, or exception occurs +try: + del os.environ['GTK_IM_MODULE'] +except Exception as e: + # Only exception is a key error, which states that env var does not exists + # So, it is okay to pass + pass + if __name__ == '__main__': # Workaround for IBus intefering with broadcast when using dead keys # Environment also needs IBUS_DISABLE_SNOOPER=1, or double chars appear From e9e8d7be19610ec1e450b176188364e65fca4ba5 Mon Sep 17 00:00:00 2001 From: ozzdemir Date: Fri, 28 Jan 2022 08:00:22 +0300 Subject: [PATCH 2/2] Better handling of GTK_IM_MODULE env var Deleting env var only if it exists. --- terminator | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/terminator b/terminator index 3bb9294b..150fca0e 100755 --- a/terminator +++ b/terminator @@ -56,12 +56,8 @@ from terminatorlib.configjson import ConfigJson # Deleting env variable fixes double char problem when broadcasting (#78) # Only delete if it exists, or exception occurs -try: +if os.environ.get('GTK_IM_MODULE') is not None: del os.environ['GTK_IM_MODULE'] -except Exception as e: - # Only exception is a key error, which states that env var does not exists - # So, it is okay to pass - pass if __name__ == '__main__': # Workaround for IBus intefering with broadcast when using dead keys