fix: show windows of apps without a bundle (e.g. not .app)
This commit is contained in:
1 parent
b9d5784716
commit
fd0623a706
1 file changed
+8
-2
@@ -65,7 +65,13 @@ class Applications {
|
||||
}
|
||||
|
||||
private static func isActualApplication(_ app: NSRunningApplication) -> Bool {
|
||||
let bundlePackageType = app.bundleURL.flatMap { Bundle(url: $0) }.flatMap { $0.infoDictionary }.flatMap { $0["CFBundlePackageType"] as? String }
|
||||
return bundlePackageType != "XPC!"
|
||||
return app.activationPolicy != .prohibited || isNotXpc(app)
|
||||
}
|
||||
|
||||
private static func isNotXpc(_ app: NSRunningApplication) -> Bool {
|
||||
return app.bundleURL
|
||||
.flatMap { Bundle(url: $0) }
|
||||
.flatMap { $0.infoDictionary }
|
||||
.flatMap { $0["CFBundlePackageType"] as? String } != "XPC!"
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user