mirror of
https://github.com/glfw/glfw.git
synced 2026-09-18 14:45:46 +00:00
Cocoa: Process events after window destruction
On macOS a destroyed window remained on screen until the next time events were processed. This makes the behavior more consistent with other platforms. Fixes #1412.
This commit is contained in:
@@ -962,6 +962,9 @@ void _glfwPlatformDestroyWindow(_GLFWwindow* window)
|
||||
[window->ns.object close];
|
||||
window->ns.object = nil;
|
||||
|
||||
// HACK: Allow Cocoa to catch up before returning
|
||||
_glfwPlatformPollEvents();
|
||||
|
||||
} // autoreleasepool
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user