diff options
Diffstat (limited to 'engine')
-rw-r--r-- | engine/python2/engine.py | 5 | ||||
-rw-r--r-- | engine/python3/engine.py | 5 |
2 files changed, 8 insertions, 2 deletions
diff --git a/engine/python2/engine.py b/engine/python2/engine.py index f5365ac..2fb47b5 100644 --- a/engine/python2/engine.py +++ b/engine/python2/engine.py @@ -4,7 +4,7 @@ # ibus-anthy - The Anthy engine for IBus # # Copyright (c) 2007-2008 Peng Huang <shawn.p.huang@gmail.com> -# Copyright (c) 2010-2020 Takao Fujiwara <takao.fujiwara1@gmail.com> +# Copyright (c) 2010-2021 Takao Fujiwara <takao.fujiwara1@gmail.com> # Copyright (c) 2007-2018 Red Hat, Inc. # # This program is free software; you can redistribute it and/or modify @@ -1076,6 +1076,9 @@ class Engine(IBus.EngineSimple): self.__invalidate() def do_reset(self): + mode = self.__prefs.get_value('common', 'behavior-on-focus-out') + if mode == 2: + return self.__reset() self.__invalidate() diff --git a/engine/python3/engine.py b/engine/python3/engine.py index ce17fcf..df4e20d 100644 --- a/engine/python3/engine.py +++ b/engine/python3/engine.py @@ -4,7 +4,7 @@ # ibus-anthy - The Anthy engine for IBus # # Copyright (c) 2007-2008 Peng Huang <shawn.p.huang@gmail.com> -# Copyright (c) 2010-2020 Takao Fujiwara <takao.fujiwara1@gmail.com> +# Copyright (c) 2010-2021 Takao Fujiwara <takao.fujiwara1@gmail.com> # Copyright (c) 2007-2018 Red Hat, Inc. # # This program is free software; you can redistribute it and/or modify @@ -1071,6 +1071,9 @@ class Engine(IBus.EngineSimple): self.__invalidate() def do_reset(self): + mode = self.__prefs.get_value('common', 'behavior-on-focus-out') + if mode == 2: + return self.__reset() self.__invalidate() |