Skip to content

Commit

Permalink
#238 Use nsRunningApplication instead of axWindow to detect wid…
Browse files Browse the repository at this point in the history
…gets
  • Loading branch information
MrKai77 committed Mar 10, 2024
1 parent a7143f7 commit 0a22b54
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions Loop/Window Management/Window.swift
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,7 @@ class Window {
}

// Check if this is a widget
// swiftlint:disable:next force_cast
let parent: AXUIElement = self.axWindow.getValue(.parent) as! AXUIElement
if let title = parent.getValue(.title) as? String,
if let title = nsRunningApplication?.localizedName,
title == "Notification Center" {
print("This is an invalid window (is a widget)")
return nil
Expand Down

0 comments on commit 0a22b54

Please sign in to comment.