-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
fix: DBus tray icon NRE when change visible #19742
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: DBus tray icon NRE when change visible #19742
Conversation
You can test this PR using the following package version. |
|
@cla-avalonia agree |
This tray icon impl might has other issue , if i set tooltip text when not visible , because path handler already removed form StatusNotifierItemDbusObj , it crash Should fix it in this PR? |
I push a new commit for other issue , same as first commit , i dont know how add test for it. |
You can test this PR using the following package version. |
There is only register but in DestroyTrayIcon no unregister , is problem? |
What does the pull request do?
When set tray icon
IsVisible
property fromtrue
tofalse
, destroy the tray icon andpath handler
connection method handler
be remove , but then set totrue
do not re add they inCreateTrayIcon
.The PR add missing logic , should not crash now.
I try add a unit test for the pr but i just found it already exists
TryIconTests.Can_Toggle_TrayIcon_Visibility
, but i can not enable it.Can manual test it use IntegrationTestApp DesktopPage
What is the current behavior?
What is the updated/expected behavior with this PR?
Do not crash
Checklist
Breaking changes
Should not
Fixed issues
Fixes #19332
Fixes #18156