Skip to content

🍎 toggle switcher for settings#476

Open
xhugoliu wants to merge 1 commit into
mulaRahul:mainfrom
xhugoliu:feat/macos-switcher-settings
Open

🍎 toggle switcher for settings#476
xhugoliu wants to merge 1 commit into
mulaRahul:mainfrom
xhugoliu:feat/macos-switcher-settings

Conversation

@xhugoliu

Copy link
Copy Markdown
Contributor

Summary

This PR fixes #436 by keeping Keyviz hidden from the macOS Dock and app switcher during normal tray-only use, while still showing it as a regular app when the settings window is opened.

Root cause

Keyviz was previously running with the default macOS activation policy, so the app could still appear in the Dock and Cmd+Tab app switcher even when it was effectively being used as a tray-first utility.

The settings window also followed a close flow that did not switch the app back to a tray-only state after it was dismissed.

Changes

  • add a macOS Info.plist with LSUIElement so the app starts in a menu bar style mode
  • switch the app activation policy and dock visibility when opening or hiding the settings window
  • intercept the settings window close request so Cmd+W and the titlebar close button hide the window and return the app to tray-only mode
  • remove an unused frontend import so the production build stays green

Testing

  • cargo check
  • npm run build
  • npm run tauri build
  • manually verified on macOS that:
    • opening Settings from the tray shows Keyviz in the app switcher
    • closing Settings with Cmd+W or the close button removes Keyviz from the app switcher again

Result

Settings open: Keyviz appears in the macOS app switcher while the settings window is visible.

image

Settings closed: Keyviz returns to tray-only mode and no longer appears in the macOS app switcher after the settings window is dismissed.

image

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.

keyviz.app should ideally be hidden from the dock and app switcher

1 participant