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

Fixed the tray icon not appearing on Mac #8231

Merged
merged 1 commit into from
Oct 23, 2024

Conversation

qstokkink
Copy link
Contributor

Fixes #8229

This PR:

  • Fixes the tray icon not appearing on Mac because it was not spawned in the main thread.

Regarding the note in mac_event_loop: the asyncio main thread blocks while the tray icon context menu is open. I assume nobody will keep their menu open, but should they do so their Tribler core won't do anything anymore. Even so, it would be nice to fix that in the future. For now, I think this is better than nothing.

The choice for asyncio.sleep(0.01) instead of asyncio.sleep(0) was because the latter chokes up the core. With 0.01, the core seems unaffected.

@qstokkink qstokkink force-pushed the fix_mac_tray branch 2 times, most recently from 408197a to 0dd3c0b Compare October 22, 2024 15:00
@qstokkink qstokkink marked this pull request as ready for review October 23, 2024 07:47
@qstokkink qstokkink changed the title WIP: Fixed the tray icon not appearing on Mac READY: Fixed the tray icon not appearing on Mac Oct 23, 2024
@qstokkink qstokkink changed the title READY: Fixed the tray icon not appearing on Mac Fixed the tray icon not appearing on Mac Oct 23, 2024
@qstokkink qstokkink merged commit 8319fb9 into Tribler:main Oct 23, 2024
7 checks passed
@qstokkink qstokkink deleted the fix_mac_tray branch October 23, 2024 10:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

Tray icon does not appear on Mac
2 participants