diff options
author | Peng Wu <alexepico@gmail.com> | 2018-06-25 17:18:07 +0800 |
---|---|---|
committer | Peng Wu <alexepico@gmail.com> | 2018-06-25 17:18:07 +0800 |
commit | 76318b525e8dd4635ac628d184dc6186c9bee966 (patch) | |
tree | 1ed8e79894f7719ef6dd66795d748f193d4d69c4 | |
parent | 8355dc8878f25c5ea7d39c2c1ca382f26e6a747e (diff) | |
download | ibus-libpinyin-76318b525e8dd4635ac628d184dc6186c9bee966.tar.gz ibus-libpinyin-76318b525e8dd4635ac628d184dc6186c9bee966.tar.xz ibus-libpinyin-76318b525e8dd4635ac628d184dc6186c9bee966.zip |
fixes processAccelKeyEvent method
-rw-r--r-- | src/PYPBopomofoEngine.cc | 2 | ||||
-rw-r--r-- | src/PYPPinyinEngine.cc | 2 |
2 files changed, 4 insertions, 0 deletions
diff --git a/src/PYPBopomofoEngine.cc b/src/PYPBopomofoEngine.cc index 840c51a..d13bde6 100644 --- a/src/PYPBopomofoEngine.cc +++ b/src/PYPBopomofoEngine.cc @@ -91,6 +91,8 @@ BopomofoEngine::processAccelKeyEvent (guint keyval, guint keycode, if (triggered) { if (!m_editors[MODE_INIT]->text ().empty ()) m_editors[MODE_INIT]->reset (); + if (!m_editors[MODE_SUGGESTION]->text ().empty ()) + m_editors[MODE_SUGGESTION]->reset (); m_props.toggleModeChinese (); return FALSE; } diff --git a/src/PYPPinyinEngine.cc b/src/PYPPinyinEngine.cc index a270b3f..0d184de 100644 --- a/src/PYPPinyinEngine.cc +++ b/src/PYPPinyinEngine.cc @@ -166,6 +166,8 @@ PinyinEngine::processAccelKeyEvent (guint keyval, guint keycode, if (triggered) { if (!m_editors[MODE_INIT]->text ().empty ()) m_editors[MODE_INIT]->reset (); + if (!m_editors[MODE_SUGGESTION]->text ().empty ()) + m_editors[MODE_SUGGESTION]->reset (); m_props.toggleModeChinese (); return FALSE; } |