Skip to content

Navigation Menu

Sign in
Sign up

app: set focused attribue on fore/background events for ios and android - #162

Open
placid2000 wants to merge 4 commits into
gioui:main from
placid2000:fore_background_events
Open

app: set focused attribue on fore/background events for ios and android #162
placid2000 wants to merge 4 commits into
gioui:main from
placid2000:fore_background_events

Conversation

@placid2000

@placid2000 placid2000 commented Feb 4, 2026

Copy link
Copy Markdown

This path set focused flag in ConfigEvent when app goes back or foreground on ios and android

Signed-off-by: Cyril Mouttet <cyril.mouttet@gmail.com>

Copy link
Copy Markdown
Contributor

In our discussion of this change, I wrote:

I now think the Config.Focused behaviour on Android is (subtly) wrong.
I'm thinking of Config.Focused as "the window has (keyboard) focus",
that is that the window is the one the user is currently interacting
with. In that sense, Config.Focused should probably change to match
the onPause/onResume lifecycle state on Android. The Java
OnFocusChangedListener should just be removed.
(With that change, it's possible the window.visible and started
states can be tracked in an lifecycle enum).

Why not use onPause/onResume and what about the focus listener?

whereswaldon force-pushed the main branch 2 times, most recently from 4d8d111 to 23e823d Compare July 23, 2026 09:40

Copy link
Copy Markdown
Author

Some changes has been made in following commits:
47ab4c9
92fa23b

Cyril Mouttet
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

AltStyle によって変換されたページ (->オリジナル) /