diff options
| author | Andre Weissflog <floooh@gmail.com> | 2021-04-21 19:02:12 +0200 |
|---|---|---|
| committer | Andre Weissflog <floooh@gmail.com> | 2021-04-21 19:02:12 +0200 |
| commit | c7506acdf621978fcc9f122863144452df4bece2 (patch) | |
| tree | e157633317af9a392ac0636a67edb6618852f803 | |
| parent | e892cdef598a70a70ff231f4b87d04c47bd42ca6 (diff) | |
| parent | fb5c6c48113753e80f0ee0d13171d5264a635167 (diff) | |
Merge branch 'stevinz-stevinz-menu-activate'
| -rw-r--r-- | sokol_app.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sokol_app.h b/sokol_app.h index cfbca133..473c184c 100644 --- a/sokol_app.h +++ b/sokol_app.h @@ -2824,10 +2824,8 @@ _SOKOL_PRIVATE void _sapp_macos_run(const sapp_desc* desc) { // set the application dock icon as early as possible, otherwise // the dummy icon will be visible for a short time sapp_set_icon(&_sapp.desc.icon); - NSApp.activationPolicy = NSApplicationActivationPolicyRegular; _sapp.macos.app_dlg = [[_sapp_macos_app_delegate alloc] init]; NSApp.delegate = _sapp.macos.app_dlg; - [NSApp activateIgnoringOtherApps:YES]; [NSApp run]; // NOTE: [NSApp run] never returns, instead cleanup code // must be put into applicationWillTerminate @@ -3170,6 +3168,8 @@ _SOKOL_PRIVATE void _sapp_macos_frame(void) { else { [_sapp.macos.window center]; } + NSApp.activationPolicy = NSApplicationActivationPolicyRegular; + [NSApp activateIgnoringOtherApps:YES]; [_sapp.macos.window makeKeyAndOrderFront:nil]; _sapp_macos_update_dimensions(); [NSEvent setMouseCoalescingEnabled:NO]; |