Skip to content

Send view focus events and handle focus change requests - #188

Open
JSUYA wants to merge 1 commit into
flutter-tizen:masterfrom
JSUYA:view_focus_event
Open

Send view focus events and handle focus change requests#188
JSUYA wants to merge 1 commit into
flutter-tizen:masterfrom
JSUYA:view_focus_event

Conversation

@JSUYA

@JSUYA JSUYA commented Jul 24, 2026

Copy link
Copy Markdown
Member

The engine's view-focus embedder API (FlutterEngineSendViewFocusEvent, view_focus_change_request_callback) is declared in embedder.h but was never wired up, so PlatformDispatcher.onViewFocusChange and requestViewFocusChange did not work on Tizen.

Since the embedder has no native window focus event handler, the app lifecycle is used as a proxy for view focus: kFocused is sent to the engine when the app is resumed, and kUnfocused when it becomes inactive or paused. Focus change requests from the framework are handled by activating the window. Windows created with
focusable = false are marked with ecore_wl2_window_focus_skip_set and can never receive native key focus, so kFocused events and window activation are skipped for them.

Fixes #187

@JSUYA JSUYA self-assigned this Jul 24, 2026
@JSUYA
JSUYA marked this pull request as draft July 24, 2026 09:40

@chatgpt-codex-connector chatgpt-codex-connector 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 4d4745091e

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread flutter/shell/platform/tizen/flutter_tizen.cc
@JSUYA
JSUYA force-pushed the view_focus_event branch 2 times, most recently from 163b2ed to 6eb7827 Compare July 31, 2026 02:33
@JSUYA
JSUYA marked this pull request as ready for review August 3, 2026 04:32

@chatgpt-codex-connector chatgpt-codex-connector 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 6eb78273b8

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread flutter/shell/platform/tizen/flutter_tizen.cc
The engine's view-focus embedder API (FlutterEngineSendViewFocusEvent,
view_focus_change_request_callback) is declared in embedder.h but was
never wired up, so PlatformDispatcher.onViewFocusChange and
requestViewFocusChange did not work on Tizen.

Since the embedder has no native window focus event handler, the app
lifecycle is used as a proxy for view focus: kFocused is sent to the
engine when the app is resumed, and kUnfocused when it becomes
inactive or paused. Focus change requests from the framework are
handled by activating the window. Windows created with
focusable = false are marked with ecore_wl2_window_focus_skip_set and
can never receive native key focus, so kFocused events and window
activation are skipped for them.

Fixes flutter-tizen#187
@JSUYA
JSUYA force-pushed the view_focus_event branch from 6eb7827 to 0437526 Compare August 3, 2026 05:27
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.

Support view focus events

1 participant