diff --git a/src/native/macosx/MacMiniFB.m b/src/native/macosx/MacMiniFB.m index f20f39e..ce200f0 100644 --- a/src/native/macosx/MacMiniFB.m +++ b/src/native/macosx/MacMiniFB.m @@ -276,7 +276,11 @@ static bool create_shaders() { [window center]; - [NSApp activateIgnoringOtherApps:YES]; + // Must be wrapped for menus to work without reselecting window + // See https://github.com/emoon/rust_minifb/issues/334 + dispatch_async(dispatch_get_main_queue(), ^{ + [NSApp activateIgnoringOtherApps:YES]; + }); if (!prev_init) [NSApp finishLaunching];