Skip to content

Menu-bar icon fights third-party menu-bar managers (Bartender) due to persisted absolute position #27

Description

@jldeen

Summary

ZoomIt's menu-bar status item sets an AppKit autosaveName, which causes macOS to persist and re-assert an absolute menu-bar X coordinate every time the status bar re-lays out. Third-party menu-bar managers (Bartender, Ice, etc.) organize items by position, so ZoomIt repeatedly snaps itself back to its saved slot and refuses to stay where the manager places it.

Environment

  • App: ZoomIt (Dev).app, bundle id com.sysinternals.zoomitmac.dev
  • Installed via: dev build (Scripts/build-app.sh)
  • macOS: 26.6 (build 25G5057c)
  • Architecture: arm64 (Apple Silicon)
  • Menu-bar manager: Bartender Pro 6.5.2 (Setapp)

Symptoms

  • Moving the ZoomIt icon into Bartender's "Shown Items" doesn't stick — it drifts back to "Always Hidden" / its pinned slot.
  • Because the icon keeps hiding, right-click → Settings is hard to reach, which compounds the first-launch Settings problem in New install doesn't open Settings dialog on first launch #21.

Root cause

In AppDelegate.makeStatusItem:

item.autosaveName = "com.sysinternals.ZoomIt.statusItem"

Setting autosaveName makes AppKit write NSStatusItem Preferred Position com.sysinternals.ZoomIt.statusItem = <x> into the app's preferences domain and restore that absolute X on every relayout. That restore-on-relayout behavior is what conflicts with menu-bar managers, which bucket items by their X position.

It was introduced incidentally in the "Add break timer" commit (2d8f09f), but nothing else in the codebase appears to depend on it (single usage site, confirmed via grep).

Proposed fix

Remove the autosaveName assignment so AppKit no longer persists/restores an absolute position, letting menu-bar managers place the icon freely. Verified across multiple clean launch/quit cycles that no NSStatusItem Preferred Position key is written to the prefs domain afterward, and Bartender is then able to keep the icon in "Shown Items".

Related

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions