mirror of
https://github.com/Qz3rK/tdesktop.git
synced 2026-07-03 14:15:08 +02:00
Move applicationDidFinishLaunching code to init
This should make the Qt patch catching the event unneeded
This commit is contained in:
@@ -147,6 +147,14 @@ ApplicationDelegate *_sharedDelegate = nil;
|
||||
base::Timer _ignoreActivationStop;
|
||||
}
|
||||
|
||||
- (instancetype) init: {
|
||||
_ignoreActivation = false;
|
||||
_ignoreActivationStop.setCallback([self] {
|
||||
_ignoreActivation = false;
|
||||
});
|
||||
return [super init];
|
||||
}
|
||||
|
||||
- (BOOL) applicationShouldHandleReopen:(NSApplication *)theApplication hasVisibleWindows:(BOOL)flag {
|
||||
if (const auto window = Core::App().activeWindow()) {
|
||||
if (window->widget()->isHidden()) {
|
||||
@@ -156,13 +164,6 @@ ApplicationDelegate *_sharedDelegate = nil;
|
||||
return YES;
|
||||
}
|
||||
|
||||
- (void) applicationDidFinishLaunching:(NSNotification *)aNotification {
|
||||
_ignoreActivation = false;
|
||||
_ignoreActivationStop.setCallback([self] {
|
||||
_ignoreActivation = false;
|
||||
});
|
||||
}
|
||||
|
||||
- (void) applicationDidBecomeActive:(NSNotification *)aNotification {
|
||||
Core::Sandbox::Instance().customEnterFromEventLoop([&] {
|
||||
if (Core::IsAppLaunched() && !_ignoreActivation) {
|
||||
|
||||
Reference in New Issue
Block a user