mirror of
https://github.com/glfw/glfw.git
synced 2025-10-04 13:46:37 +00:00
Updated the fix to work on both naked and wrapped (.app) macos executables
This commit is contained in:
parent
11d637558e
commit
5b3a2cb4b4
@ -266,8 +266,17 @@ static const NSRange kEmptyRange = { NSNotFound, 0 };
|
||||
{
|
||||
self = [super init];
|
||||
if (self != nil)
|
||||
{
|
||||
window = initWindow;
|
||||
|
||||
// HACK: Force an update shortly after the window appears to avoid the
|
||||
// issue where macOS mojave does not start rendering to the OpenGL view
|
||||
dispatch_async(dispatch_get_main_queue(), ^() {
|
||||
if (window->context.client != GLFW_NO_API)
|
||||
[window->context.nsgl.object update];
|
||||
});
|
||||
}
|
||||
|
||||
return self;
|
||||
}
|
||||
|
||||
@ -343,10 +352,6 @@ static const NSRange kEmptyRange = { NSNotFound, 0 };
|
||||
|
||||
- (void)windowDidBecomeKey:(NSNotification *)notification
|
||||
{
|
||||
// Fix for macOS mojave not rendering the OpenGL view on window start
|
||||
if (window->context.client != GLFW_NO_API)
|
||||
[window->context.nsgl.object update];
|
||||
|
||||
if (_glfw.ns.disabledCursorWindow == window)
|
||||
centerCursor(window);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user