Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: NSStatusItem doesn't maintain position in menubar across launches #42154

Open
3 tasks done
rudyrichter opened this issue May 13, 2024 · 1 comment
Open
3 tasks done

Comments

@rudyrichter
Copy link

Preflight Checklist

Electron Version

29/30

What operating system are you using?

macOS

Operating System Version

macOS 14

What arch are you using?

arm64 (including Apple Silicon)

Last Known Working Electron version

No response

Expected Behavior

relocating the menubar icon by holding down the command key and click/draging the icon to a new position in the menubar should save that location and result in it maintaining that location across launches.

Actual Behavior

upon quitting the application and launching it again, the icon displays left-most in the status area of the menubar instead of where you relocated it.

Testcase Gist URL

No response

Additional Information

It is recommended that the NSStatusItem have its autosave name set rather than letting the system assign one, this can be done in the initWithIcon method in shell/browser/ui/tray_icon_cocoa.mm

@codebytere
Copy link
Member

@rudyrichter took a look at https://developer.apple.com/documentation/appkit/nsstatusitem/1644022-autosavename?language=objc - if you'd be interested in PRing something i'd be happy to review it, otherwise I can try to take a look in the medium-term future!

@codebytere codebytere added the status/confirmed A maintainer reproduced the bug or agreed with the feature label May 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: 👍 Does Not Block Stable
Status: 👍 Does Not Block Stable
Development

No branches or pull requests

3 participants