mirror of
https://github.com/kotatogram/kotatogram-desktop
synced 2025-09-02 07:35:12 +00:00
Custom enter from event loop in applicationDidBecomeActive.
This commit is contained in:
@@ -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 {
|
||||||
|
Reference in New Issue
Block a user