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

OpenGLContext: Avoid calling NSView::window from displaylink thread

This commit is contained in:
reuk 2023-03-09 14:34:16 +00:00
parent 0f174d5818
commit 16929c26f7
No known key found for this signature in database
GPG key ID: FCB43929F012EE5C

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