Repository navigation
feat: migrate custom macOS tray view to native one - #18981
Conversation
6dd43e3 to
c8aa64e
Compare
d7a21df to
c391f6a
Compare
|
Confirmed to work under macOS Catalina Beta 🎉 |
f9201fa to
b146491
Compare
|
|
2635dfe to
94ce34b
Compare
add remove TODOs
* fix: make tray not block main process * make AtomMenuModel refcounted
* chore: use ScopedPumpMessagesInPrivateModes in tray * revert refcounting of AtomMenuModel * Prefer WeakPtr for posting tasks to handle unexpected destruction
add missing include
03dfc77 to
b27a1b5
Compare
|
Ready |
|
@deermichel release notes need to be fixed up it seems. |
|
Release Notes Persisted
|
|
/trop run backport-to 7-0-x |
|
The backport process for this PR has been manually initiated, |
|
I was unable to backport this PR to "7-0-x" cleanly; |
|
Hi, @deermichel
How can we do this? |
|
Hey @deermichel,
We've been looking at the same issue, but cannot find any documentation. |
|
^ This can be achieved by setting an empty context menu on the tray. @sulf
|
|
I set empty array click tray is not highlight, is not work |
|
How did you do it, I encountered the same problem |
Description of Change
Under macOS Catalina the current custom Tray implementation stops working since we're using deprecated methods (see #18664). This PR uses native methods of
[NSStatusItem button]where applicable. Closes #18664.Discussion
I got all previously available methods & events working except for
tray.setHighlightMode(mode). Imho we should drop support for this mac-only method because we'll have a hard time finding ways to sneak in Apple's native menu handling. However, we are still able to control highlighting when no menu is set (i guess that's where most use cases for this method are found anyway). Probably should be further discussed in a Releases WG meeting. If someone knows a way around that all, feel free to dm me. --> Verdict: Deprecate in 6, remove in 7.cc @codebytere @MarshallOfSound @miniak @erickzhao
Checklist
npm testpassesRelease Notes
Notes:
Trayfrom custom to native view to be compatible with Catalina (macOS).Tray.setHighlightModemethod (macOS).