If the application is not linked against the Vulkan loader and relies on
a third-party loader library or glfwGetInstanceProcAddress, then our
call to dlopen will fail without a custom dyld environment variable.
This adds a fallback of looking in the directory of the main executable,
which matches the bundle structure recommended by the Vulkan SDK, making
that finally work out of the box for fully dynamic loading.
(cherry picked from commit 7da87aaae7)
Polling the event queue before NSApp had been allowed to finish
launching, in our case by starting our self-terminating run loop,
triggered an assertion inside NSApplication.
This fix, which makes all event processing functions capable of starting
it, makes that assertion less likely.
A more Cocoa-friendly fix would be to finish launching NSApp during
glfwInit and let people annoyed by the menu bar disabled it with
GLFW_COCOA_MENUBAR. That may not be suitable for 3.3-stable, though.
Fixes#1543.
(cherry picked from commit 6e6805000a)
Files built for Win32 must use C89 style declarations for compatibility
with VS 2010 and 2012, which are still supported by GLFW.
(cherry picked from commit 56aad76b16)
This is another small step towards having GLFW play nice with other
toolkits sharing the same process, including AppKit.
Any macOS platform function that touches Cocoa must now wrap itself in
an autoreleasepool block.
Since GLFW no longer provides an autoreleasepool outside of its
functions, THIS MAY BREAK EXISTING CODE MIXING GLFW AND COCOA. Sorry!
Please add your own autoreleasepool blocks as needed.
Fixes#1107.
Closes#1114.
The application delegate needs to be set at init to receive monitor
events before window creation. Menu creation is moved to
applicationWillFinishLaunching: to play nicer with other toolkits in the
same process.
Related to #1317.
This removes the GLFW NSApplication subclass as a step towards better
coexistence with other libraries that touch Cocoa.
This moves application object creation to platform init to allow event
processing before window creation.
Related to #1317.
When cursor isn't in normal mode and should be hidden, use [NSCursor hide]
method instead of setting it to blank image. This should prevent
situations when hidden cursor becomes visible after system notification
was shown.
Fixes#971.
Closes#1028.
Look, a can of worms! I wonder what's inside.
This adds the first platform specific window hint, transforming
a compile-time option to a run-time per-window one.
As noted in the documentation for NSDistributedNotificationCenter,
(under the Discussion heading) before an observer is deallocated a call
should be made to removeObserver: in order to ensure that the listener
is correctly removed from all observation pools.
Fixes#817.
Closes#826.
The menu bar for non-bundled applications did not become visible until
it had lost and regained focus. This is fixed (somehow) by letting the
NSApplication run loop start and stop.
Technique by scoopr.
The Core Graphics callback is called before the corresponding NSScreen
object for a newly connected monitor is created, thus making monitor
enumeration fail.