SDL/src
Sam Lantinga 9950271bb6 Fixed bug 4580 - Android 8: immersive fullscreen notification causes flickering between fullscreen and non-fullscreen and app is unresponsive
Sylvain 2019-04-18 21:22:59 UTC

Changes:
- SDL_WINDOWEVENT_FOCUS_GAINED and SDL_WINDOWEVENT_FOCUS_LOST are sent when the java method onWindowFocusChanged() is called.

- If we have support for MultiWindow (eg API >= 24), SDL event loop is blocked/un-blocked (or simply egl-backed-up or not), when java onStart()/onStop() are called.

- If not, this behaves like now, SDL event loop is blocked/un-blocked when onPause()/onResume() are called.

So if we have two app on screen and switch from one to the other, only FOCUS events are sent (and onPause()/onResume() are called but empty. onStart()/onStop() are not called).
The SDL app, un-focused, would still continue to run and display frames (currently the App would be displayed, but paused).
Like a video player app or a chronometer that would still be refreshed, even if the window hasn't the focus.
It should work also on ChromeBooks (not tested), with two apps opened at the same time.


I am not sure this fix Dan's issue. Because focus lost event triggers Minimize function (which BTW is not provided on android).
https://hg.libsdl.org/SDL/file/bb41b3635c34/src/video/SDL_video.c#l2653
https://hg.libsdl.org/SDL/file/bb41b3635c34/src/video/SDL_video.c#l2634

So, in addition, it would need to add by default SDL_HINT_VIDEO_MINIMIZE_ON_FOCUS_LOSS to 0.
So that the lost focus event doesn't try to minimize the window. And this should fix also the issue.
2019-04-22 16:19:52 -07:00
..
atomic Updated copyright for 2019 2019-01-04 22:01:14 -08:00
audio coreaudio: Set audio callback thread priority. 2019-03-25 12:59:30 -04:00
core Fixed bug 4580 - Android 8: immersive fullscreen notification causes flickering between fullscreen and non-fullscreen and app is unresponsive 2019-04-22 16:19:52 -07:00
cpuinfo Fixed Windows RT build 2019-03-19 16:52:09 -07:00
dynapi Added support for building SDL as a dynamic library on iOS 2019-03-19 07:53:33 -07:00
events Fixed bug 4581 - generate synthetic mouse events at window boundaries 2019-04-10 10:59:53 +02:00
file Updated copyright for 2019 2019-01-04 22:01:14 -08:00
filesystem Updated copyright for 2019 2019-01-04 22:01:14 -08:00
haptic Updated copyright for 2019 2019-01-04 22:01:14 -08:00
hidapi HIDAPI: fix bug that caused non-HID class parts of composite devices to have windows HID functions called on them. 2019-03-12 14:44:12 -07:00
joystick Handle potentially calling SDL_JoystickUpdate() and SDL_JoystickQuit() at the same time. 2019-03-27 08:17:05 -07:00
libm Updated copyright for 2019 2019-01-04 22:01:14 -08:00
loadso Updated copyright for 2019 2019-01-04 22:01:14 -08:00
main Added support for building SDL as a dynamic library on iOS 2019-03-19 07:53:33 -07:00
power Updated copyright for 2019 2019-01-04 22:01:14 -08:00
render Fixed bug 4582 - Maximize/Resize not working on Windows 10 2019-04-08 13:43:48 +02:00
sensor Updated copyright for 2019 2019-01-04 22:01:14 -08:00
stdlib Updated copyright for 2019 2019-01-04 22:01:14 -08:00
test Updated copyright for 2019 2019-01-04 22:01:14 -08:00
thread Hopefully fixed the mingw32 build 2019-03-19 17:20:54 -07:00
timer Updated copyright for 2019 2019-01-04 22:01:14 -08:00
video iOS: Remove code trying to support compilation on the iOS 7 SDK, the deployment target has been set to iOS 8 for years and there's other unconditionally compiled code that depends on newer SDKs so that code is useless. 2019-04-17 20:41:05 -03:00
SDL.c events: Make debug logging of the event queue a hint instead of an #ifdef. 2019-03-15 14:08:30 -04:00
SDL_assert.c Emscripten: use UTF8ToString instead of Pointer_stringify 2019-01-29 12:19:03 +00:00
SDL_assert_c.h Updated copyright for 2019 2019-01-04 22:01:14 -08:00
SDL_dataqueue.c Updated copyright for 2019 2019-01-04 22:01:14 -08:00
SDL_dataqueue.h Updated copyright for 2019 2019-01-04 22:01:14 -08:00
SDL_error.c Fix DirectInput error codes being lost 2019-03-16 18:11:09 -07:00
SDL_error_c.h Updated copyright for 2019 2019-01-04 22:01:14 -08:00
SDL_hints.c Updated copyright for 2019 2019-01-04 22:01:14 -08:00
SDL_internal.h Updated copyright for 2019 2019-01-04 22:01:14 -08:00
SDL_log.c Updated copyright for 2019 2019-01-04 22:01:14 -08:00