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 @@ -41,6 +41,7 @@ class AppDelegate: NSObject, NSApplicationDelegate {
var mainWindow: NSWindow?
var cancellables = Set<AnyCancellable>()
var dockItems: [DockItem] = [] // Global variable to hold dock item rectangles
private static let ignoredAppIDs: Set<String> = ["Launchpad", "Trash", "Downloads"]
private var isClickToMinimizeEnabled: Bool = { // Set isClickToMinimizeEnabled to true if not found
if UserDefaults.standard.object(forKey: "ClickToMinimizeEnabled") == nil {
UserDefaults.standard.set(true, forKey: "ClickToMinimizeEnabled") // Set default value
Expand Down Expand Up @@ -183,7 +184,7 @@ class AppDelegate: NSObject, NSApplicationDelegate {
if dockItem.rect.contains(mouseLocation) {
// Log the mouse location and app name
print("Mouse Location: \(mouseLocation), App Name: \(dockItem.appID)")
if "Launchpad||Trash||Downloads".contains(dockItem.appID) {
if AppDelegate.ignoredAppIDs.contains(dockItem.appID) {
// these are not working for sure
return Unmanaged.passUnretained(event)
}
Expand Down