Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions Ports/iOSPort/nativeSources/CodenameOne_GLAppDelegate.m
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,12 @@ - (void)cn1ApplicationWillResignActive
- (void)cn1ApplicationDidEnterBackground
{
#ifdef CN1_BLOCK_SCREENSHOTS_ON_ENTER_BACKGROUND
[[CodenameOne_GLViewController instance] eaglView].hidden = YES;
// Hide the view controller's root view rather than just the EAGL/Metal
// surface. Once a peer component is added with paintPeersBehindEnabled,
// the controller's view is a newRoot containing both eaglView and the
// peerComponentsLayer (BrowserComponent's WKWebView lives in the latter)
// -- hiding only eaglView leaves peers visible in the app-switcher snapshot.
[CodenameOne_GLViewController instance].view.hidden = YES;
cn1IsHiddenInBackground = YES;
#endif
if(editingComponent != nil) {
Expand All @@ -239,7 +244,7 @@ - (void)cn1ApplicationDidEnterBackground
- (void)cn1ApplicationWillEnterForeground
{
if (cn1IsHiddenInBackground) {
[[CodenameOne_GLViewController instance] eaglView].hidden = NO;
[CodenameOne_GLViewController instance].view.hidden = NO;
}
// Clear before updateCanvas: viewWillTransitionToSize: and
// didRotateFromInterfaceOrientation: use this to skip propagation during
Expand Down
Loading