Skip to content

Follow tizen-core-imf API rename and fix tcore IMF context - #203

Merged
JSUYA merged 5 commits into
flutter-tizen:mainfrom
JSUYA:tcore-imf-cb-rename
Oct 6, 2026
Merged

JSUYA merged 5 commits into
flutter-tizen:mainfrom
JSUYA:tcore-imf-cb-rename

Conversation

@JSUYA

@JSUYA JSUYA commented Oct 1, 2026

Copy link
Copy Markdown
Member

tizen-core-imf 0.2.22 renamed the context event callback functions from *_event_callback to *_event_cb. Update the tcore input method context to the new names so it builds against the current Tizen 11.0 packages.

Also fix a few issues in the tcore input method context:

  • Share a single tizen_core_imf_init()/shutdown() pair among all contexts. tizen_core_imf_shutdown() is not reference counted andunloads the IME module right away, so destroying one view broke the input method contexts of other views in the same process.
  • Set the device class and subclass of IMF key events, as the Ecore backend does. tcore key events carry only the device identifier, so look up the matching input device in the default seat.
  • Default the input panel state to HIDE so that IsInputPanelShown() does not read an uninitialized value when the query fails.

tizen-core-imf 0.2.22 renamed the context event callback functions
from *_event_callback to *_event_cb, keeping the same parameters
(including user_data on the del variants). Update the tcore input
method context to the new names so it builds against the current
Tizen 11.0 packages.
Unlike ecore_imf_init(), tizen_core_imf_init() is not reference counted
and must not be called again before tizen_core_imf_shutdown(). Calling
shutdown from each context unloads the IME module while other contexts
in the same process are still alive.

Share a single init among all TizenInputMethodContext instances and
log when initialization fails.
The Ecore backend passes the device class and subclass of key events to
the input method, but the tcore backend left them as NONE, so the IME
could not tell remote control input from keyboard input.

Look up the input device by its identifier in the default seat and set
its class and subclass on the IMF key event.
IsInputPanelShown() read the state even when
tizen_core_imf_context_get_input_panel_state() failed and left it
unset. Default it to HIDE.
@JSUYA JSUYA self-assigned this Oct 1, 2026
Comment thread flutter/shell/platform/tizen/tizen_input_method_context_tcore.cc Outdated
The init count was incremented even when tizen_core_imf_init() failed,
so the destructor called tizen_core_imf_shutdown() without a matching
init and later contexts skipped the initialization.

Increment the count only after the context is created and decrement it
only when a context is destroyed, so that an instance which failed to
initialize never affects the shutdown of the others. If the first
context cannot be created, shut down right away to keep the init and
shutdown calls paired.
@JSUYA

JSUYA commented Oct 2, 2026

Copy link
Copy Markdown
Member Author

https://github.com/flutter-tizen/embedder/actions/runs/36983788343

This PR is needed to fix the CI error in the main branch release.

@JSUYA
JSUYA merged commit 21ff1b2 into flutter-tizen:main Oct 6, 2026
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants