Browse Source

OpenGLContext: Avoid calling NSView::window from displaylink thread

v7.0.9
reuk 2 years ago
parent
commit
16929c26f7
No known key found for this signature in database GPG Key ID: FCB43929F012EE5C
1 changed files with 2 additions and 5 deletions
  1. +2
    -5
      modules/juce_opengl/opengl/juce_OpenGLContext.cpp

+ 2
- 5
modules/juce_opengl/opengl/juce_OpenGLContext.cpp View File

@@ -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();
};
}));
}


Loading…
Cancel
Save