-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
fix(tray): run tray in main event loop enabling support for macOS #3818
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
base: master
Are you sure you want to change the base?
fix(tray): run tray in main event loop enabling support for macOS #3818
Conversation
e63227c
to
19e67c8
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #3818 +/- ##
==========================================
- Coverage 11.52% 11.52% -0.01%
==========================================
Files 92 92
Lines 17490 17491 +1
Branches 8149 8149
==========================================
Hits 2015 2015
- Misses 12980 12982 +2
+ Partials 2495 2494 -1
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
2ebf3e9
to
d9dee97
Compare
d9dee97
to
bf8decf
Compare
Co-Authored-By: Lukas Senionis <[email protected]>
bf8decf
to
42503ca
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR enables the system tray to run on macOS by moving tray event processing to the main event loop and adjusting the tray initialization workflow.
- Renames and refactors system tray functions (init_tray and process_tray_events) to separate initialization from event processing.
- Updates the RTSP thread function by renaming it from rtpThread to start and adjusts thread handling in main.cpp.
- Enables tray support in macOS by removing the packaging flag that disabled it.
Reviewed Changes
Copilot reviewed 6 out of 8 changed files in this pull request and generated 1 comment.
Show a summary per file
File | Description |
---|---|
src/system_tray.h | Updates function names and documentation to reflect new behavior. |
src/system_tray.cpp | Refactors tray loop processing and function renaming. |
src/rtsp.h/rtsp.cpp | Renames rtpThread to start for clearer intent. |
src/main.cpp | Integrates tray event processing into the main thread event loop. |
packaging/sunshine.rb | Removes macOS tray disabling to allow tray support on macOS. |
Files not reviewed (2)
- cmake/compile_definitions/macos.cmake: Language not supported
- cmake/prep/options.cmake: Language not supported
Comments suppressed due to low confidence (2)
packaging/sunshine.rb:248
- [nitpick] Since tray support is now enabled on macOS, adding a comment here to explain the removal of the disabling flag would improve clarity for future maintainers.
args << "-DSUNSHINE_ENABLE_TRAY=OFF" if OS.mac?
src/system_tray.h:57
- The updated documentation for init_tray specifies that it only initializes the tray without starting the loop. Verify that any assumptions in other parts of the code regarding tray lifecycle management are updated accordingly.
int init_tray();
|
@cgutman I'm wondering if you have some idea how to fix this (as the tray initialization logic is from you). On Windows, when the sunshine service starts during boot the tray icon is not displayed, even though Sunshine is running fine. Logs don't indicate any errors.
|
Description
This PR moves the system tray to run in the main thread, allowing the system tray to function correctly on macOS.
TODO:
libayatana-appindicator
: fix(homebrew): enable system tray for linux #3819For the future:
Screenshot
Issues Fixed or Closed
May fix the following but needs confirmation:
Type of Change
.github/...
)Checklist