We are currently migrating Bugzilla to GitHub issues.
Any changes made to the bug tracker now will be lost, so please do not post new bugs or make changes to them.
When we're done, all bug URLs will redirect to their equivalent location on the new bug tracker.

Bug 5325 - Android 10, gesture control, minimize app - not expected behavior
Summary: Android 10, gesture control, minimize app - not expected behavior
Status: RESOLVED INVALID
Alias: None
Product: SDL
Classification: Unclassified
Component: *don't know* (show other bugs)
Version: HG 2.1
Hardware: All Android (All)
: P2 normal
Assignee: Ryan C. Gordon
QA Contact: Sam Lantinga
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-10-22 06:48 UTC by Vortelio
Modified: 2020-10-22 09:30 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Vortelio 2020-10-22 06:48:47 UTC
There is no way to reliably catch the loss of window focus.

With the classic navigation of three buttons, if minimize the app, the following order is performed:

onPause ()
onWindowFocusChanged ()
nativeFocusChanged (false)
handleNativeState ()
nativePause ()

If gesture control is activated, the order is as follows:

onPause ()
handleNativeState ()
nativePause ()
onWindowFocusChanged ()
nativeFocusChanged (false)
Comment 1 Sylvain 2020-10-22 09:30:06 UTC
You get loss of focus with the SDL_WINDOWEVENT_FOCUS_LOST, you don't need to use the java side.

But java onWindowFocusChanged() should give you the focus.