From d66ca542b83c199f905019e11d19887c84dc11d8 Mon Sep 17 00:00:00 2001 From: reuk Date: Thu, 30 Oct 2025 19:42:20 +0000 Subject: [PATCH] UIViewComponentPeer: Avoid sending unnecessary UIWindowScene change notifications --- .../juce_gui_basics/native/juce_UIViewComponentPeer_ios.mm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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))