Skip to content

Commit

Permalink
Activate app on menubar click
Browse files Browse the repository at this point in the history
  • Loading branch information
isiahmanns committed Oct 1, 2023
1 parent 5dd0b81 commit 705f724
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions Hourglass/Hourglass/AppDelegate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ class AppDelegate: NSObject, NSApplicationDelegate {

@objc private func toggleAppUI() {
showWindow(.app)
NSApplication.shared.activate(ignoringOtherApps: true)
}

private func setupAppUI() {
Expand All @@ -93,7 +94,6 @@ class AppDelegate: NSObject, NSApplicationDelegate {
appWindow.styleMask = [.titled, .closable, .fullSizeContentView]
appWindow.titleVisibility = .hidden
appWindow.titlebarAppearsTransparent = true
appWindow.level = .floating
}
}

Expand Down Expand Up @@ -130,7 +130,6 @@ extension AppDelegate: WindowCoordinator, NSWindowDelegate {
aboutWindow.title = "About"
aboutWindow.titleVisibility = .hidden
aboutWindow.titlebarAppearsTransparent = true
aboutWindow.level = .floating
aboutWindow.delegate = self
self.aboutWindow = aboutWindow
return aboutWindow
Expand All @@ -142,7 +141,6 @@ extension AppDelegate: WindowCoordinator, NSWindowDelegate {
statisticsWindow.styleMask = [.titled, .closable, .resizable]
statisticsWindow.title = "Statistics"
statisticsWindow.titlebarAppearsTransparent = true
statisticsWindow.level = .floating
statisticsWindow.delegate = self
self.statisticsWindow = statisticsWindow
return statisticsWindow
Expand Down

0 comments on commit 705f724

Please sign in to comment.