Skip to content

Remove unnecessary tray_update() calls #3016

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

Closed
wants to merge 1 commit into from

Conversation

ns6089
Copy link
Contributor

@ns6089 ns6089 commented Aug 14, 2024

Description

Remove unnecessary tray_update() calls.
They're unsafe on Windows outside of UI thread.

Screenshot

Issues Fixed or Closed

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Dependency update (updates to dependencies)
  • Documentation update (changes to documentation)
  • Repository update (changes to repository files, e.g. .github/...)

Checklist

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have added or updated the in code docstring/documentation-blocks for new or existing methods/components

It's unsafe to do on Windows outside of UI thread.
@ns6089
Copy link
Contributor Author

ns6089 commented Aug 14, 2024

@TheElixZammuto was there any specific reason why we had two tray_update() calls per state change? Linux maybe?

@ns6089
Copy link
Contributor Author

ns6089 commented Aug 14, 2024

And it still doesn't fix the issue...

Copy link

@ns6089
Copy link
Contributor Author

ns6089 commented Aug 14, 2024

Moving tray_update() into UI thread and calling it synchronously through SendMessage() resolves the freeze.
It is a threading issue after all.

@ReenigneArcher
Copy link
Member

Moving tray_update() into UI thread and calling it synchronously through SendMessage() resolves the freeze. It is a threading issue after all.

Could this same update give us tray icon support on macOS?

@ns6089
Copy link
Contributor Author

ns6089 commented Aug 14, 2024

Could this same update give us tray icon support on macOS?

I have absolutely no idea what's needed to be done there.

@ns6089
Copy link
Contributor Author

ns6089 commented Aug 14, 2024

It's far more easier and failure-proof to rewrite Windows tray logic in cpp from the ground up than trying to fix the thing the library has turned into.
Closing this for now, maybe someone else will take over.
Or I get sufficiently annoyed by the non-functional tray.

@ns6089 ns6089 closed this Aug 14, 2024
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.

Taskbar icon sometimes unresponsive
2 participants