Browse Source

Fixes.

pull/113/head
Abhishek 3 years ago
parent
commit
a48a5deb3f
  1. 1
      Clocker/Clocker.xcodeproj/xcshareddata/xcschemes/Clocker.xcscheme
  2. 8
      Clocker/Preferences/Menu Bar/StatusItemHandler.swift

1
Clocker/Clocker.xcodeproj/xcshareddata/xcschemes/Clocker.xcscheme

@ -78,7 +78,6 @@
buildConfiguration = "Debug" buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB" selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB" selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
enableAddressSanitizer = "YES"
enableASanStackUseAfterReturn = "YES" enableASanStackUseAfterReturn = "YES"
enableUBSanitizer = "YES" enableUBSanitizer = "YES"
launchStyle = "0" launchStyle = "0"

8
Clocker/Preferences/Menu Bar/StatusItemHandler.swift

@ -118,6 +118,14 @@ class StatusItemHandler: NSObject {
queue: mainQueue) { _ in queue: mainQueue) { _ in
self.setupStatusItem() self.setupStatusItem()
} }
NSWorkspace.shared.notificationCenter.addObserver(forName: NSWorkspace.willSleepNotification, object: nil, queue: OperationQueue.main) { notification in
self.menubarTimer?.invalidate()
}
NSWorkspace.shared.notificationCenter.addObserver(forName: NSWorkspace.didWakeNotification, object: nil, queue: OperationQueue.main) { notification in
self.setupStatusItem()
}
} }
deinit { deinit {

Loading…
Cancel
Save