iOS: Hide UIWindow before restoring mirror mode

Doing it the opposite way, by associating the new screen first, will
result in the external screen not going back to mirroring the main
display.

Pick-to: 6.2 5.15
Change-Id: I63970380fc4f0902af5032043809a9c1b1f9f95b
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
This commit is contained in:
Tor Arne Vestbø 2021-11-03 17:18:18 +01:00
parent 36852d78bf
commit 34f9da730f

View File

@ -151,8 +151,8 @@
// to mirror mode, but defer it until after the view has been removed,
// to ensure that we don't try to layout the view that's being removed.
dispatch_async(dispatch_get_main_queue(), ^{
uiWindow.screen = [UIScreen mainScreen];
uiWindow.hidden = YES;
uiWindow.screen = [UIScreen mainScreen];
});
}
}