Skip to content

[WIP] Support tizen-core window - #170

Draft
JSUYA wants to merge 2 commits into
flutter-tizen:masterfrom
JSUYA:tcore_so
Draft

[WIP] Support tizen-core window#170
JSUYA wants to merge 2 commits into
flutter-tizen:masterfrom
JSUYA:tcore_so

Conversation

@JSUYA

@JSUYA JSUYA commented May 15, 2026

Copy link
Copy Markdown
Member

This is working only Tizen 11

@JSUYA
JSUYA marked this pull request as draft May 15, 2026 08:24

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces an alternative implementation for the Tizen embedder using the tizen-core-wl and tizen-core-imf APIs instead of Ecore, controlled by a new use_tcore build argument. Key changes include the addition of TizenWindowTcoreWl and a Tcore-specific TizenInputMethodContext, migration of the event loop to GLib, and updates to the clipboard and build configuration. Feedback focuses on the removal of excessive error-level debug logs, addressing the fragility of dynamic library loading for cursor support, and investigating alternatives to the hardcoded 60Hz refresh rate. Additionally, improvements were suggested for memory management in the clipboard implementation and restoring documentation regarding specific MIME type handling.

Comment thread flutter/shell/platform/tizen/tizen_window_tcore_wl.cc Outdated
Comment thread flutter/shell/platform/tizen/tizen_window_tcore_wl.cc
Comment thread flutter/shell/platform/tizen/flutter_tizen_display_monitor.cc Outdated
Comment thread flutter/shell/platform/tizen/tizen_clipboard.cc Outdated
Comment thread flutter/shell/platform/tizen/tizen_clipboard.cc
Comment thread flutter/shell/platform/tizen/tizen_clipboard.cc Outdated
@JSUYA

JSUYA commented May 28, 2026

Copy link
Copy Markdown
Member Author

/gemini review

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces support for the tizen-core-wl API as an alternative to ecore for windowing, input method context, and clipboard management under a new use_tcore build flag. Feedback focuses on critical safety and robustness improvements, such as avoiding unsafe strlen calls on non-null-terminated Wayland clipboard data, implementing thread-safe tracking and cancellation of active GLib timeouts in TizenEventLoop to prevent use-after-free bugs, and avoiding a potential null pointer dereference in the TizenInputMethodContext destructor. Additionally, corrections are suggested for Google C++ Style Guide violations regarding header guards and default arguments, alongside a fix for version parsing in the gn tool.

Comment thread flutter/shell/platform/tizen/tizen_clipboard.cc
Comment thread flutter/shell/platform/tizen/tizen_event_loop.h
Comment thread flutter/shell/platform/tizen/tizen_event_loop.h
Comment thread flutter/shell/platform/tizen/tizen_event_loop.cc
Comment thread flutter/shell/platform/tizen/tizen_event_loop.cc
Comment thread flutter/shell/platform/tizen/tizen_input_method_context_tcore.cc
Comment thread flutter/shell/platform/tizen/tizen_input_method_context_tcore.h
Comment thread flutter/shell/platform/tizen/tizen_input_method_context_tcore.h
Comment thread flutter/shell/platform/tizen/tizen_window_tcore_wl.cc
Comment thread tools/gn
JSUYA added a commit to JSUYA/embedder that referenced this pull request Jun 11, 2026
Apply the changes requested in the Gemini code review on
flutter-tizen#170:

- Remove temporary FT_LOG(Error) debug breadcrumbs added throughout
  the key-event path (tizen_window_tcore_wl, tizen_view_nui,
  flutter_tizen_view, channels/keyboard_channel,
  channels/text_input_channel, tizen_input_method_context_tcore).
  Error level was being used for trace logging, which made real
  errors hard to find. Genuine error paths (initialization
  failures, out-of-order events, dlopen/dlsym failures) keep
  their FT_LOG(Error) calls.
- flutter_tizen_display_monitor: add a TODO explaining that
  refresh_rate = 60.0 is a fallback until tizen-core (or another
  public Tizen API) exposes a way to query the actual rate,
  since ecore_animator_frametime_get() is gone.
- tizen_window_tcore_wl: document that the TV cursor / pointer /
  floating-menu helpers depend on libvd-win-util.so, a private
  Samsung TV library, and that dlopen/dlsym lookups must be
  treated as best-effort.
- Fix wrong header include in tizen_input_method_context_tcore.cc
  (was including the ecore version's header).
@JSUYA
JSUYA force-pushed the tcore_so branch 2 times, most recently from cbfc9dd to 70d310b Compare June 15, 2026 05:24
JSUYA added a commit to JSUYA/embedder that referenced this pull request Aug 4, 2026
Introduce a use_tcore GN flag (surfaced as the --use-tcore build option)
that switches the window and input-method backends from Ecore/ecore_wl2
to the tizen-core-wl / tizen-core-imf APIs.

- Add tizen_window_tcore_wl and tizen_input_method_context_tcore,
  selected in BUILD.gn when use_tcore is set.
- Reimplement the clipboard on tizen-core-wl for tcore builds.
- Expose the native window handle via FlutterDesktopViewGetNativeHandle.
- Install the tizen-core-* sysroot packages for Tizen 10.0 and above.
- Reject --use-tcore on Tizen versions below 10.

Squashed from flutter-tizen#170 and rebased onto master. The DALI/NUI sysroot
packages removed upstream are not reintroduced, and the work-in-progress
key-event trace logging is dropped.
JSUYA added 2 commits August 4, 2026 18:21
Introduce a use_tcore GN flag (surfaced as the --use-tcore build option)
that switches the window and input-method backends from Ecore/ecore_wl2
to the tizen-core-wl / tizen-core-imf APIs.

- Add tizen_window_tcore_wl and tizen_input_method_context_tcore,
  selected in BUILD.gn when use_tcore is set.
- Reimplement the clipboard on tizen-core-wl for tcore builds.
- Expose the native window handle via FlutterDesktopViewGetNativeHandle.
- Install the tizen-core-* sysroot packages for Tizen 10.0 and above.
- Reject --use-tcore on Tizen versions below 10.

Squashed from flutter-tizen#170 and rebased onto master. The DALI/NUI sysroot
packages removed upstream are not reintroduced, and the work-in-progress
key-event trace logging is dropped.
Master flutter-tizen#189 restored the public API with an ecore_wl2-only doc comment.
Extend it to note that --use-tcore builds return a tizen_core_wl_window_h.
@JSUYA

JSUYA commented Aug 5, 2026

Copy link
Copy Markdown
Member Author

/codex review

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.

1 participant