diff --git a/modules/juce_opengl/opengl/juce_OpenGLContext.cpp b/modules/juce_opengl/opengl/juce_OpenGLContext.cpp index 2a24efccb7..6d5b5028d0 100644 --- a/modules/juce_opengl/opengl/juce_OpenGLContext.cpp +++ b/modules/juce_opengl/opengl/juce_OpenGLContext.cpp @@ -937,11 +937,8 @@ public: { return [this, display] { - if (auto* view = nativeContext->getNSView()) - if (auto* window = [view window]) - if (auto* screen = [window screen]) - if (display == ScopedDisplayLink::getDisplayIdForScreen (screen)) - triggerRepaint(); + if (display == lastDisplay) + triggerRepaint(); }; })); }