diff options
author | Peng Wu <alexepico@gmail.com> | 2014-07-15 17:24:25 +0800 |
---|---|---|
committer | Peng Wu <alexepico@gmail.com> | 2014-07-15 17:24:25 +0800 |
commit | b591ad96ab4dd77a85a80c2d6653d144e4738a7c (patch) | |
tree | 4b3324440c62c37d5d09583d2b1fe7be3bc32469 /src | |
parent | f24733b19f659046deb6c68c7b647b5f2bd6f5b1 (diff) | |
download | ibus-libzhuyin-b591ad96ab4dd77a85a80c2d6653d144e4738a7c.tar.gz ibus-libzhuyin-b591ad96ab4dd77a85a80c2d6653d144e4738a7c.tar.xz ibus-libzhuyin-b591ad96ab4dd77a85a80c2d6653d144e4738a7c.zip |
re-factor method processKeyEvent
Diffstat (limited to 'src')
-rw-r--r-- | src/ZYZZhuyinEngine.cc | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/ZYZZhuyinEngine.cc b/src/ZYZZhuyinEngine.cc index 5700240..46bae9b 100644 --- a/src/ZYZZhuyinEngine.cc +++ b/src/ZYZZhuyinEngine.cc @@ -121,10 +121,11 @@ ZhuyinEngine::processKeyEvent (guint keyval, guint keycode, guint modifiers) if (m_props.modeChinese ()) { retval = m_editors[m_input_mode]->processKeyEvent (keyval, keycode, modifiers); - } else { + } + + if (G_UNLIKELY (!retval)) retval = m_fallback_editor->processKeyEvent (keyval, keycode, modifiers); - } /* store ignored key event by editors */ m_prev_pressed_key = retval ? IBUS_VoidSymbol : keyval; |