Skip to content

[macOS]: Show the Dock icon only while the window is open - #237

Open
Dx-Alz-xD wants to merge 2 commits into
vinnovateit:mainfrom
Dx-Alz-xD:mac-dock-icon
Open

Dx-Alz-xD wants to merge 2 commits into
vinnovateit:mainfrom
Dx-Alz-xD:mac-dock-icon

Conversation

@Dx-Alz-xD

Copy link
Copy Markdown
Contributor

Fixes #232

latch nwo switches bw a regular app (dock icon, cmdtab) while its window is open and a menu bar app while it is closed
through NSApplication's activation policy. the change runs on the main thread through the main dispatch queue like the existing location prompt. started hidden at login it begins as a menu bar app, so no icon flashes up first

Platforms: macOS

testing

builds; a new MacNativeIntegrationTest case checks that AppKit answers setActivationPolicy and activateIgnoringOtherApps: and runs in the macos CI job

used a vm for this so check using actual mac: close the window and the dock icon goes open it from the menu bar and it comes back with the window in front

Latch switches between a regular app while its window is open and a
menu bar app while it is closed, through NSApplication's activation
policy on the main dispatch queue. Started hidden at login, it begins as
a menu bar app.

Fixes vinnovateit#232
The app records itself as the runtime owner before it loads its data and
writes the LaunchAgent only after that, so a slow runner could check for
it too early. The step now waits up to 30s for it while the app runs.
@Dx-Alz-xD

Copy link
Copy Markdown
Contributor Author

why is macos only failing on this bro

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

MacOS Dock icon

1 participant