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

wxNotificationMessage always sends click event on MSW with toasts #24320

Open
lanurmi opened this issue Feb 14, 2024 · 1 comment · May be fixed by #24341
Open

wxNotificationMessage always sends click event on MSW with toasts #24320

lanurmi opened this issue Feb 14, 2024 · 1 comment · May be fixed by #24341

Comments

@lanurmi
Copy link
Contributor

lanurmi commented Feb 14, 2024

Bug description:

When using wxNotificationMessages on MSW with MSWUseToasts() enabled (like the dialogs sample does), clicking the notification or letting it timeout will both result in wxEVT_NOTIFICATION_MESSAGE_CLICK being sent.

Expected vs observed behaviour:

It is expected that wxEVT_NOTIFICATION_MESSAGE_DISMISSED would be sent in case of timeout or explicitly dismissing the notification.

To Reproduce:

  1. Start 'dialogs' sample on MSW.
  2. Open User Notification Test Dialog.
  3. Click 'Show'.
  4. Observe that whatever you do – click or no click –, the status text will soon show "Notification was clicked".

But why?

It looks like regardless of what the user actually did or didn't do, the overload of Invoke taking IInspectable* gets called, and that one sends the click event. (IInspectable is the base class for IToast{Dismissed,Failed}EventArgs, so it makes some sense.) The debugger shows that the contents of the args object is actually an IToastDismissedEventArgs.

Platform and version information

  • wxWidgets version you use: master
  • wxWidgets port you use: wxMSW
  • OS and its version: Windows 10.0.19045.3996
@lanurmi
Copy link
Contributor Author

lanurmi commented Feb 17, 2024

Cc @TcT2k

lanurmi added a commit to lanurmi/wxWidgets that referenced this issue Feb 19, 2024
No idea why this is needed, but would seem to fix wxWidgets#24320.
lanurmi added a commit to lanurmi/wxWidgets that referenced this issue Feb 19, 2024
No idea why this is needed, but would seem to fix wxWidgets#24320.
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 a pull request may close this issue.

1 participant