Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
A workaround for isIME in Evas GL mode
  • Loading branch information
swift-kim committed Apr 23, 2021
commit 26f4fa56ab097a48bcc26877158237a9e30b7a49
14 changes: 8 additions & 6 deletions shell/platform/tizen/channels/text_input_channel.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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) {
Expand Down