Custom enter from event loop in applicationDidBecomeActive.

This commit is contained in:
John Preston 2020-10-29 19:26:58 +03:00
parent 6e682643df
commit 600cf83c3f

View file

@ -141,14 +141,16 @@ ApplicationDelegate *_sharedDelegate = nil;
} }
- (void) applicationDidBecomeActive:(NSNotification *)aNotification { - (void) applicationDidBecomeActive:(NSNotification *)aNotification {
if (Core::IsAppLaunched() && !_ignoreActivation) { Core::Sandbox::Instance().customEnterFromEventLoop([&] {
Core::App().handleAppActivated(); if (Core::IsAppLaunched() && !_ignoreActivation) {
if (auto window = App::wnd()) { Core::App().handleAppActivated();
if (window->isHidden()) { if (auto window = App::wnd()) {
window->showFromTray(); if (window->isHidden()) {
window->showFromTray();
}
} }
} }
} });
} }
- (void) applicationDidResignActive:(NSNotification *)aNotification { - (void) applicationDidResignActive:(NSNotification *)aNotification {