Skip to content

fix(mac): always run tray_update() on the main thread#157

Open
andygrundman wants to merge 1 commit into
LizardByte:masterfrom
andygrundman:andyg.fix-mac-tray-update
Open

fix(mac): always run tray_update() on the main thread#157
andygrundman wants to merge 1 commit into
LizardByte:masterfrom
andygrundman:andyg.fix-mac-tray-update

Conversation

@andygrundman

Copy link
Copy Markdown

Description

tray_update() makes some macOS UI API calls that must be run on the main thread.

Issues Fixed or Closed

Fixes LizardByte/Sunshine#5319

Type of Change

  • feat: New feature (non-breaking change which adds functionality)
  • fix: Bug fix (non-breaking change which fixes an issue)
  • docs: Documentation only changes
  • style: Changes that do not affect the meaning of the code (white-space, formatting, missing semicolons, etc.)
  • refactor: Code change that neither fixes a bug nor adds a feature
  • perf: Code change that improves performance
  • test: Adding missing tests or correcting existing tests
  • build: Changes that affect the build system or external dependencies
  • ci: Changes to CI configuration files and scripts
  • chore: Other changes that don't modify src or test files
  • revert: Reverts a previous commit
  • BREAKING CHANGE: Introduces a breaking change (can be combined with any type above)

Checklist

  • Code follows the style guidelines of this project
  • Code has been self-reviewed
  • Code has been commented, particularly in hard-to-understand areas
  • Code docstring/documentation-blocks for new or existing methods/components have been added or updated
  • Unit tests have been added or updated for any new or modified functionality

AI Usage

  • None: No AI tools were used in creating this PR
  • Light: AI provided minor assistance (formatting, simple suggestions)
  • Moderate: AI helped with code generation or debugging specific parts
  • Heavy: AI generated most or all of the code changes

@sonarqubecloud

Copy link
Copy Markdown

@ReenigneArcher

Copy link
Copy Markdown
Member

Changes needed in #145 as well? Planning to move to QT once I figure out the Windows and macOS packaging for Sunshine in LizardByte/Sunshine#5260

@codecov

codecov Bot commented Jun 28, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 63.32%. Comparing base (27b67b7) to head (edf5e22).
✅ All tests successful. No failed tests found.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #157      +/-   ##
==========================================
- Coverage   64.14%   63.32%   -0.82%     
==========================================
  Files           5        5              
  Lines         647      638       -9     
  Branches      214      213       -1     
==========================================
- Hits          415      404      -11     
- Misses        154      155       +1     
- Partials       78       79       +1     
Flag Coverage Δ
Linux-qt5 54.03% <ø> (ø)
Linux-qt6 54.03% <ø> (ø)
Windows 70.67% <ø> (ø)
macOS 53.84% <ø> (-5.45%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
src/tray_darwin.m 72.72% <ø> (-5.18%) ⬇️

... and 1 file with indirect coverage changes


Continue to review full report in Codecov by Harness.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 27b67b7...edf5e22. Read the comment docs.

@github-actions

Copy link
Copy Markdown
Last Updated 2026-06-28 12:51:39 UTC
Source Run CI Run #699
Commit edf5e22ebb97892933c61d8b1e60201e1db003c4

Screenshot Comparison

PR #157 screenshots vs screenshots baseline.

Matrix: Linux-qt5

Image Baseline PR
tray_icon_initial.png
tray_icon_svg.png
tray_icon_themed.png
tray_menu_checkbox_checked.png
tray_menu_checkbox_unchecked.png
tray_menu_left_click.png
tray_menu_shown.png
tray_notification_displayed.png
tray_notification_themed_icon.png

Matrix: Linux-qt6

Image Baseline PR
tray_icon_initial.png
tray_icon_svg.png
tray_icon_themed.png
tray_menu_checkbox_checked.png
tray_menu_checkbox_unchecked.png
tray_menu_left_click.png
tray_menu_shown.png
tray_notification_displayed.png
tray_notification_themed_icon.png

Matrix: Windows

Image Baseline PR
tray_icon_initial.png
tray_menu_checkbox_checked.png
tray_menu_checkbox_unchecked.png
tray_menu_shown.png
tray_notification_displayed.png

Matrix: macOS

Image Baseline PR
tray_icon_initial.png
tray_menu_checkbox_checked.png
tray_menu_checkbox_unchecked.png
tray_menu_shown.png
tray_notification_displayed.png

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

macOS: Sunshine crashes when a client starts a stream if system tray is enabled

2 participants