Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix for #1648: menubar not clickable on macOS Catalina #1802

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,8 @@ information on what to include when reporting a bug.
(#1635)
- [Cocoa] Bugfix: Failing to retrieve the refresh rate of built-in displays
could leak memory
- [Cocoa] Bugfix: Menubar was not clickable on macOS 10.15+ until it lost and
regained focus (#1648)
- [X11] Bugfix: The CMake files did not check for the XInput headers (#1480)
- [X11] Bugfix: Key names were not updated when the keyboard layout changed
(#1462,#1528)
Expand Down Expand Up @@ -428,6 +430,7 @@ skills.
- Waris
- Jay Weisskopf
- Frank Wille
- Richard A. Wilkes
- Tatsuya Yatagawa
- Ryogo Yoshimura
- Lukas Zanner
Expand Down
10 changes: 7 additions & 3 deletions src/cocoa_init.m
Original file line number Diff line number Diff line change
Expand Up @@ -428,9 +428,6 @@ - (void)applicationWillFinishLaunching:(NSNotification *)notification
{
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

Expand All @@ -442,6 +439,13 @@ - (void)applicationWillFinishLaunching:(NSNotification *)notification
}
else
createMenuBar();

// Fix for issue #1648: menubar not clickable on macOS Catalina until
// it lost and regained focus
dispatch_async(dispatch_get_main_queue(), ^{
// In case we are unbundled, make us a proper UI application
[NSApp setActivationPolicy:NSApplicationActivationPolicyRegular];
});
}
}

Expand Down