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
Fix toast notification always posting the click event on MSW #24341
base: master
Are you sure you want to change the base?
Conversation
No idea why this is needed, but would seem to fix wxWidgets#24320.
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.
I think the correct thing to do would be to use 3 different handlers, implementing DesktopToastActivatedEventHandler
, DesktopToastDismissedEventHandler
and DesktopToastFailedEventHandler
respectively instead of a single one.
This should be straightforward to do, AFAICS and we actually only need 2 of them as the third one would do nothing anyhow.
Could you please try to do it like this? TIA!
IToastDismissedEventArgs *dea = nullptr; | ||
IToastFailedEventArgs *fea = nullptr; | ||
|
||
if ( SUCCEEDED(args->QueryInterface(__uuidof(IToastDismissedEventArgs), (void**)&dea)) ) |
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.
We need to call Release()
on dea
in case of success to avoid memory leaks (and the same for fea
below, of course).
Do you mean doing it the way it is already done in master? The thing is that it fails to work correctly, at least not for me. The overload of Regardless, some unanswered questions are:
|
No, this code uses a single wxToastEventHandler inheriting from
I didn't test it, but I think it always fails.
I don't think so. |
No idea why this is needed, but would seem to fix #24320.