Skip to content

App.background does not reflect current state on Mac #238

Description

@nriley

Mac apps can be "transformed" (TransformProcessType or NSApp setApplicationPolicy:) from background to foreground apps. It seems the background property of apps in Talon does not take this into account (perhaps it only looks at the Info.plist on disk), so it returns True for this app even though it has an icon in the Dock and can be activated.

You can examine the NSApplicationActivationPolicy of a running application, which should reflect these changes.

The issue that prompted this was that I couldn't bring an app to the front because the knausj switcher was filtering apps where background=True. The app in question returns NSApplicationActivationPolicyRegular. For the purposes of the switcher, it might make sense to also consider NSApplicationActivationPolicyAccessory as non-"background".

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions