mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-09 23:34:20 +00:00
iOS: Always update peer bounds when window scene coordinate space is updated
This commit is contained in:
parent
4d1c9c9b12
commit
1b0911dda6
1 changed files with 19 additions and 2 deletions
|
|
@ -53,7 +53,7 @@ public:
|
||||||
|
|
||||||
void setWindowScene (UIWindowScene* x) API_AVAILABLE (ios (13.0))
|
void setWindowScene (UIWindowScene* x) API_AVAILABLE (ios (13.0))
|
||||||
{
|
{
|
||||||
if (std::exchange (windowScene, x) != x)
|
windowScene = x;
|
||||||
listeners.call ([] (auto& l) { l.windowSceneChanged(); });
|
listeners.call ([] (auto& l) { l.windowSceneChanged(); });
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -549,6 +549,23 @@ private:
|
||||||
if (isSharedWindow)
|
if (isSharedWindow)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
const auto sceneDidChange = std::invoke ([&]
|
||||||
|
{
|
||||||
|
if (@available (iOS 13, *))
|
||||||
|
{
|
||||||
|
auto* currentScene = window != nil ? [window windowScene] : nil;
|
||||||
|
return windowSceneTracker->getWindowScene() != currentScene;
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
|
});
|
||||||
|
|
||||||
|
if (! sceneDidChange)
|
||||||
|
{
|
||||||
|
updateScreenBounds();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
auto* newWindow = std::invoke ([&]() -> JuceUIWindow*
|
auto* newWindow = std::invoke ([&]() -> JuceUIWindow*
|
||||||
{
|
{
|
||||||
if (@available (iOS 13, *))
|
if (@available (iOS 13, *))
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue