mirror of
https://github.com/glfw/glfw.git
synced 2024-11-22 13:04:35 +00:00
Cocoa: Fix menubar for unbundled apps on 10.15
NSApp setActivationPolicy: was being called too soon when the app was
not bundled and launched from the command line.
This fix is based on #1802 by @richardwilkes.
Fixes #1648.
Closes #1802.
Adapted to 3.3-stable from 8b11867464
.
This commit is contained in:
parent
01c362ba37
commit
eda12dd949
@ -134,6 +134,8 @@ information on what to include when reporting a bug.
|
||||
could leak memory
|
||||
- [Cocoa] Bugfix: Objective-C files were compiled as C with CMake 3.19 (#1787)
|
||||
- [Cocoa] Bugfix: Duplicate video modes were not filtered out (#1830)
|
||||
- [Cocoa] Bugfix: Menubar was not clickable on macOS 10.15+ until it lost and
|
||||
regained focus (#1648,#1802)
|
||||
- [X11] Bugfix: IME input of CJK was broken for "C" locale (#1587,#1636)
|
||||
- [X11] Bugfix: Xlib errors caused by other parts of the application could be
|
||||
reported as GLFW errors
|
||||
@ -366,6 +368,7 @@ skills.
|
||||
- Waris
|
||||
- Jay Weisskopf
|
||||
- Frank Wille
|
||||
- Richard A. Wilkes
|
||||
- Tatsuya Yatagawa
|
||||
- Ryogo Yoshimura
|
||||
- Lukas Zanner
|
||||
|
@ -428,9 +428,6 @@ static GLFWbool initializeTIS(void)
|
||||
{
|
||||
if (_glfw.hints.init.ns.menubar)
|
||||
{
|
||||
// In case we are unbundled, make us a proper UI application
|
||||
[NSApp setActivationPolicy:NSApplicationActivationPolicyRegular];
|
||||
|
||||
// Menu bar setup must go between sharedApplication and finishLaunching
|
||||
// in order to properly emulate the behavior of NSApplicationMain
|
||||
|
||||
@ -449,6 +446,8 @@ static GLFWbool initializeTIS(void)
|
||||
{
|
||||
_glfw.ns.finishedLaunching = GLFW_TRUE;
|
||||
_glfwPlatformPostEmptyEvent();
|
||||
// In case we are unbundled, make us a proper UI application
|
||||
[NSApp setActivationPolicy:NSApplicationActivationPolicyRegular];
|
||||
[NSApp stop:nil];
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user