virtualx-engine/platform/iphone
Ruslan Mustakov 7e09206e5c Proper focus in/out handling on iOS
PR #18675 (commit 96301e9) revealed a problem with how iOS lifecycle
callbacks were handled by Godot. Before that PR it was possible to get
NOTIFICATION_WM_FOCUS_IN callback without getting the corresponding
NOTIFICATION_WM_FOCUS_OUT. That commit added a flag to ensure they are
always coupled, but now there is an issue when, for example, you open a
notification panel on iOS without moving the app to background.
It resulted in view.stopAnimation being called without the
corresponding startAnimation when the app moves to foreground again, so
it looked like the game hanged.

I changed focus out notification to be sent in applicationWillResignActive,
because it makes more sense than to do it in applicationDidEnterBackground,
because it is always called in pair with applicationDidBecomeActive, where
focus in is sent. applicationDidEnterBackground may not come under
circumstances that are now described as a comment in code.

(cherry picked from commit 08a924bcee)
2018-05-13 21:46:57 +02:00
..
export iPhone X support and iOS-related fixes 2018-04-14 20:17:47 +02:00
globals Add missing copyright headers and fix formatting 2018-01-05 01:22:23 +01:00
app_delegate.h Resume audio on iOS after phone call or alarm 2018-05-13 21:46:53 +02:00
app_delegate.mm Proper focus in/out handling on iOS 2018-05-13 21:46:57 +02:00
detect.py Allow configuring iOS export 2017-11-21 01:16:49 +07:00
game_center.h Add missing copyright headers and fix formatting 2018-01-05 01:22:23 +01:00
game_center.mm Add missing copyright headers and fix formatting 2018-01-05 01:22:23 +01:00
gl_view.h iPhone X support and iOS-related fixes 2018-04-14 20:17:47 +02:00
gl_view.mm Merge pull request #18082 from RandomShaper/improve-gui-touch-3.0 2018-05-13 21:30:37 +02:00
godot_iphone.cpp Add missing copyright headers and fix formatting 2018-01-05 01:22:23 +01:00
icloud.h Add missing copyright headers and fix formatting 2018-01-05 01:22:23 +01:00
icloud.mm Add missing return statements (iOS and server). 2018-02-27 00:06:01 +01:00
in_app_store.h add restore purchases for iOS 2018-03-28 22:16:07 +02:00
in_app_store.mm add restore purchases for iOS 2018-03-28 22:16:07 +02:00
ios.h Add missing copyright headers and fix formatting 2018-01-05 01:22:23 +01:00
ios.mm Add missing copyright headers and fix formatting 2018-01-05 01:22:23 +01:00
logo.png Fixed iCCp chunk in pngs 2016-06-22 21:13:29 +02:00
main.m Add missing copyright headers and fix formatting 2018-01-05 01:22:23 +01:00
os_iphone.cpp Merge pull request #18082 from RandomShaper/improve-gui-touch-3.0 2018-05-13 21:30:37 +02:00
os_iphone.h Merge pull request #18082 from RandomShaper/improve-gui-touch-3.0 2018-05-13 21:30:37 +02:00
platform_config.h Add missing copyright headers and fix formatting 2018-01-05 01:22:23 +01:00
platform_refcount.h Add missing copyright headers and fix formatting 2018-01-05 01:22:23 +01:00
power_iphone.cpp Fix UpdatePowerInfo method implementation in PowerIphone class 2018-04-28 20:11:49 +02:00
power_iphone.h Update copyright statements to 2018 2018-01-01 14:40:47 +01:00
SCsub Fix IPhone and OSX cross compilation 2018-04-29 14:46:03 +02:00
sem_iphone.cpp Add missing copyright headers and fix formatting 2018-01-05 01:22:23 +01:00
sem_iphone.h Add missing copyright headers and fix formatting 2018-01-05 01:22:23 +01:00
view_controller.h Add missing copyright headers and fix formatting 2018-01-05 01:22:23 +01:00
view_controller.mm Add missing copyright headers and fix formatting 2018-01-05 01:22:23 +01:00