summaryrefslogtreecommitdiffstats
path: root/src/ZYZZhuyinEngine.cc
diff options
context:
space:
mode:
authorPeng Wu <alexepico@gmail.com>2014-07-16 11:13:19 +0800
committerPeng Wu <alexepico@gmail.com>2014-07-16 11:19:42 +0800
commit845b2be28e93b9abecfabeaaecc7212a61ed0b93 (patch)
treee4f142b1c3656106ac10cba8b30f49dae2f0da87 /src/ZYZZhuyinEngine.cc
parent2df15cf58d5a9e4da1838819d04aa095bb7eaaa3 (diff)
downloadibus-libzhuyin-845b2be28e93b9abecfabeaaecc7212a61ed0b93.tar.gz
ibus-libzhuyin-845b2be28e93b9abecfabeaaecc7212a61ed0b93.tar.xz
ibus-libzhuyin-845b2be28e93b9abecfabeaaecc7212a61ed0b93.zip
fixes method processKeyEvent
Diffstat (limited to 'src/ZYZZhuyinEngine.cc')
-rw-r--r--src/ZYZZhuyinEngine.cc12
1 files changed, 9 insertions, 3 deletions
diff --git a/src/ZYZZhuyinEngine.cc b/src/ZYZZhuyinEngine.cc
index 46bae9b..3ea3405 100644
--- a/src/ZYZZhuyinEngine.cc
+++ b/src/ZYZZhuyinEngine.cc
@@ -113,9 +113,15 @@ ZhuyinEngine::processKeyEvent (guint keyval, guint keycode, guint modifiers)
return TRUE;
}
- } else {
- /* skip the key press event. */
- return TRUE;
+
+ if (m_input_mode == MODE_INIT &&
+ m_editors[MODE_INIT]->text ().empty ()) {
+ /* If it is init mode, and no any previous input text,
+ * we will let client applications to handle release key event */
+ return FALSE;
+ } else {
+ return TRUE;
+ }
}
if (m_props.modeChinese ()) {