feat(app): add dockIconFollowsWindows for menu-bar / tray apps#334
Merged
Conversation
Opt-in via nucleusApplication(dockIconFollowsWindows = true): the app runs as an accessory (no macOS Dock icon) while no dockable window is visible and switches to a regular app while at least one is — the pre-Tao WindowVisibilityMonitor behavior, driven natively. - TaoDockPolicy reference-counts visible DecoratedWindows with hiddenFromDock=false and toggles the activation policy via NativeTaoMacOsDecoBridge.nativeSetHiddenFromDock on the 0<->1 transition. - DecoratedWindow counts in/out through a DisposableEffect(visible); standalone TaoStandalonePopup tray popups never contribute. - TaoLauncher applies the opt-in from the root composition (main thread) so a tray-only app drops out of the Dock at startup. macOS-only in effect: Windows/Linux have no app-level Dock presence — their taskbar is per-window, and the standalone popup already opts out via WS_EX_TOOLWINDOW / override-redirect, so the behavior is native there.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
nucleusApplication(dockIconFollowsWindows = true): the app runs as a macOS accessory (no Dock icon, no menu bar) while no dockable window is visible, and switches to a regular app while at least one is — mirroring the pre-TaoWindowVisibilityMonitorbehavior, driven natively.TaoDockPolicyreference-counts visibleDecoratedWindows created withhiddenFromDock = falseand flips the activation policy viaNativeTaoMacOsDecoBridge.nativeSetHiddenFromDockon the 0↔1 transition.DecoratedWindowcounts in/out via aDisposableEffect(visible); standaloneTaoStandalonePopuptray popups never contribute, so a tray-only app stays out of the Dock.TaoLauncherapplies the opt-in from the root composition (Tao main thread) so a tray-only app drops out of the Dock at startup.Platform notes
WS_EX_TOOLWINDOW/ override-redirect), so "taskbar entry ⟺ real window visible" is the native behavior there — the flag is a no-op by design.Test plan
DecoratedWindow) → no Dock icon at startup or everdockIconFollowsWindows = false(default) → unchanged (regular app keeps its Dock icon)