diff options
author | fujiwarat <takao.fujiwara1@gmail.com> | 2021-02-19 23:28:59 +0900 |
---|---|---|
committer | fujiwarat <takao.fujiwara1@gmail.com> | 2021-02-19 23:28:59 +0900 |
commit | 11201b73b94f394aa7a1cbd2f0ab10557718a8e6 (patch) | |
tree | 18cae933df4acea65f6a7a7e898a8ab112a28b0c /engine | |
parent | 00bab0ac26dfcd635f559b68ef76cc662a51f35b (diff) | |
download | ibus-anthy-11201b73b94f394aa7a1cbd2f0ab10557718a8e6.tar.gz |
engine: Keep preedit with reset signal
Now reset is emitted with mouse click [1] and each IME needs to handle
the signal for the preedit mode.
[1] https://github.com/ibus/ibus/commit/25d11f5cfd
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() |