fix: detect passwords app (closes #3545)

This commit is contained in:
decodism
2024-08-16 14:59:53 +02:00
committed by lwouis
parent 9d5f11aed5
commit d0cd206f51
+5 -1
View File
@@ -109,7 +109,7 @@ class Applications {
private static func isActualApplication(_ app: NSRunningApplication) -> Bool {
// an app can start with .activationPolicy == .prohibited, then transition to != .prohibited later
// an app can be both activationPolicy == .accessory and XPC (e.g. com.apple.dock.etci)
return (isNotXpc(app) || isAndroidEmulator(app)) && !app.processIdentifier.isZombie()
return (isNotXpc(app) || isPasswords(app) || isAndroidEmulator(app)) && !app.processIdentifier.isZombie()
}
private static func isNotXpc(_ app: NSRunningApplication) -> Bool {
@@ -126,6 +126,10 @@ class Applications {
private static func notAltTab(_ app: NSRunningApplication) -> Bool {
return app.processIdentifier != ProcessInfo.processInfo.processIdentifier
}
private static func isPasswords(_ app: NSRunningApplication) -> Bool {
return app.bundleIdentifier == "com.apple.Passwords"
}
static func isAndroidEmulator(_ app: NSRunningApplication) -> Bool {
// NSRunningApplication provides no way to identify the emulator; we pattern match on its KERN_PROCARGS