fix: workaround the bug in parsec (closes #206)
This commit is contained in:
1 parent
5b0341539c
commit
59c6afcf61
1 file changed
+14
-12
@@ -43,8 +43,10 @@ class Applications {
|
||||
}
|
||||
|
||||
static func addRunningApplications(_ runningApps: [NSRunningApplication]) {
|
||||
for app in filterApplications(runningApps) {
|
||||
Applications.list.append(Application(app))
|
||||
runningApps.forEach {
|
||||
if isActualApplication($0) {
|
||||
Applications.list.append(Application($0))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -66,16 +68,16 @@ class Applications {
|
||||
App.app.refreshOpenUi()
|
||||
}
|
||||
|
||||
private static func filterApplications(_ apps: [NSRunningApplication]) -> [NSRunningApplication] {
|
||||
return apps.filter {
|
||||
($0.activationPolicy != .prohibited ||
|
||||
// Bug in CopyQ; see https://github.com/hluk/CopyQ/issues/1330
|
||||
$0.bundleIdentifier == "io.github.hluk.CopyQ" ||
|
||||
// Bug in Octave.app; see https://github.com/octave-app/octave-app/issues/193#issuecomment-603648857
|
||||
$0.localizedName == "octave-gui") &&
|
||||
// bug in Octave.app; see https://github.com/octave-app/octave-app/issues/193
|
||||
$0.bundleIdentifier != "org.octave-app.Octave"
|
||||
}
|
||||
private static func isActualApplication(_ app: NSRunningApplication) -> Bool {
|
||||
return (app.activationPolicy != .prohibited ||
|
||||
// Bug in CopyQ; see https://github.com/hluk/CopyQ/issues/1330
|
||||
app.bundleIdentifier == "io.github.hluk.CopyQ" ||
|
||||
// Bug in Parsec https://github.com/lwouis/alt-tab-macos/issues/206#issuecomment-609828033
|
||||
app.bundleIdentifier == "tv.parsec.www" ||
|
||||
// Bug in Octave.app; see https://github.com/octave-app/octave-app/issues/193#issuecomment-603648857
|
||||
app.localizedName == "octave-gui") &&
|
||||
// bug in Octave.app; see https://github.com/octave-app/octave-app/issues/193
|
||||
app.bundleIdentifier != "org.octave-app.Octave"
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user