Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion Click2Minimize/AppDelegate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -189,8 +189,9 @@ class AppDelegate: NSObject, NSApplicationDelegate {
}
// Find the running application by name using NSWorkspace
let runningApps = NSWorkspace.shared.runningApplications
let mappedAppID = appDelegate.appDict[dockItem.appID]
if let app = runningApps.first(where: { $0.localizedName == dockItem.appID
|| $0.localizedName == appDelegate.appDict[dockItem.appID] }) {
|| $0.localizedName == mappedAppID }) {
print("App isHidden: \(app.isHidden), isActive: \(app.isActive)")
// Check if it's active and has unminimized windows
if app.isActive && !app.isHidden {
Expand Down