mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-06-05 06:33:57 +02:00
Custom enter from event loop in applicationDidBecomeActive.
This commit is contained in:
parent
6e682643df
commit
600cf83c3f
1 changed files with 8 additions and 6 deletions
|
@ -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 {
|
||||||
|
|
Loading…
Add table
Reference in a new issue