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.

(cherry picked from commit c819f27ce3)
This commit is contained in:
Camilla Löwy
2019-11-06 23:34:08 +01:00
committed by Camilla Löwy
parent 25af31528c
commit 129a5ccb19
2 changed files with 5 additions and 0 deletions
+3
View File
@@ -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
}