1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-08 23:24:19 +00:00

UIViewComponentPeer: Avoid sending unnecessary UIWindowScene change notifications

This commit is contained in:
reuk 2025-10-30 19:42:20 +00:00
parent 87cec3b743
commit d66ca542b8
No known key found for this signature in database

View file

@ -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))