From 61156932b6698d6386d083911a330bc73737eaf8 Mon Sep 17 00:00:00 2001 From: Swift Kim Date: Mon, 19 Apr 2021 16:50:10 +0900 Subject: [PATCH] A workaround for isIME in Evas GL mode --- .../platform/tizen/channels/text_input_channel.cc | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/shell/platform/tizen/channels/text_input_channel.cc b/shell/platform/tizen/channels/text_input_channel.cc index f90288405327d..2f62e8c7cdf85 100644 --- a/shell/platform/tizen/channels/text_input_channel.cc +++ b/shell/platform/tizen/channels/text_input_channel.cc @@ -363,8 +363,14 @@ void TextInputChannel::SendStateUpdate(const flutter::TextInputModel& model) { bool TextInputChannel::FilterEvent(Ecore_Event_Key* keyDownEvent) { bool handled = false; + +#ifdef TIZEN_RENDERER_EVAS_GL + // It is assumed that no hardware keyboard can be attached in Evas GL mode. + bool isIME = true; +#else bool isIME = ecore_imf_context_keyboard_mode_get(imf_context_) == - ECORE_IMF_INPUT_PANEL_SW_KEYBOARD_MODE; + ECORE_IMF_INPUT_PANEL_SW_KEYBOARD_MODE; +#endif Ecore_IMF_Event_Key_Down ecoreKeyDownEvent; ecoreKeyDownEvent.keyname = keyDownEvent->keyname; @@ -376,11 +382,7 @@ bool TextInputChannel::FilterEvent(Ecore_Event_Key* keyDownEvent) { EcoreInputModifierToEcoreIMFModifier(keyDownEvent->modifiers); ecoreKeyDownEvent.locks = EcoreInputModifierToEcoreIMFLock(keyDownEvent->modifiers); - if (isIME) { - ecoreKeyDownEvent.dev_name = "ime"; - } else { - ecoreKeyDownEvent.dev_name = ""; - } + ecoreKeyDownEvent.dev_name = isIME ? "ime" : ""; ecoreKeyDownEvent.keycode = keyDownEvent->keycode; if (isIME && strcmp(keyDownEvent->key, "Select") == 0) {