Skip to content

Closing to tray saves main window state as 1×1, then reopens tiny - CC Switch

Quick fix

Delete or rewrite the abnormal window state file, then restart; PR #7604 fixes hidden windows being saved as 1×1.

Error output
关闭到托盘后退出会把主窗口状态存成 1×1,下次打开缩成一团
English translation

Closing to tray saves the main window state as 1×1; the next launch opens as a tiny window.

On macOS, after enabling “minimize to tray when closing,” the window is hidden through `window.hide()`. When exiting from the tray, the window-state save path may write the hidden window’s 1×1 geometry to `.window-state.json`.

At the next launch, the window-state plugin restores this geometry, bypassing the minimum-size limit in `tauri.conf.json`, so the main window becomes almost invisible. PR #7604 skips saving on exit for hidden or minimized windows and restores abnormally small saved sizes.

  1. After exiting CC Switch, delete or rewrite the abnormal window state file, then restart the app.

    ~/Library/Application Support/com.ccswitch.desktop/.window-state.json
    "width": 1,
    "height": 1
  2. If a version containing PR #7604 is available, upgrade and exit from the tray again to prevent the hidden window’s 1×1 size from overwriting the normal window state.

ToolCC Switch
Version3.20.3(受影响)
PlatformsmacOS

(No FAQ yet)

This is an unofficial community wiki with no affiliation to the cc-switch authors or the project itself. Its content is compiled from the project's public GitHub issues. This site distributes no software.