diff --git a/modules/juce_gui_basics/native/juce_UIViewComponentPeer_ios.mm b/modules/juce_gui_basics/native/juce_UIViewComponentPeer_ios.mm index d3ee67d6c0..e6c7e201e0 100644 --- a/modules/juce_gui_basics/native/juce_UIViewComponentPeer_ios.mm +++ b/modules/juce_gui_basics/native/juce_UIViewComponentPeer_ios.mm @@ -53,8 +53,8 @@ public: void setWindowScene (UIWindowScene* x) API_AVAILABLE (ios (13.0)) { - windowScene = x; - listeners.call ([] (auto& l) { l.windowSceneChanged(); }); + if (std::exchange (windowScene, x) != x) + listeners.call ([] (auto& l) { l.windowSceneChanged(); }); } UIWindowScene* getWindowScene() const API_AVAILABLE (ios (13.0))