mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-28 15:23:51 +00:00
Bug 1496706 - Windows 8 doesn't return valid IInspectable when clicking toast notification. r=aklotz
When clicking toast notification window, OnActivate is called. When using Windows 8, 2nd parameter (IInspectable) might be nullptr. So when this parameter is nullptr, it should recognize as alertclickcallback with mClickable=true. Differential Revision: https://phabricator.services.mozilla.com/D8076 --HG-- extra : moz-landing-system : lando
This commit is contained in:
parent
b42fc1b48b
commit
4b9422e251
@ -398,10 +398,12 @@ ToastNotificationHandler::OnActivate(IToastNotification *notification,
|
||||
IInspectable *inspectable)
|
||||
{
|
||||
if (mAlertListener) {
|
||||
ComPtr<IToastActivatedEventArgs> eventArgs;
|
||||
HRESULT hr = inspectable->QueryInterface(__uuidof(IToastActivatedEventArgs),
|
||||
(void**)&eventArgs);
|
||||
nsAutoString argString;
|
||||
if (inspectable) {
|
||||
ComPtr<IToastActivatedEventArgs> eventArgs;
|
||||
HRESULT hr = inspectable->QueryInterface(
|
||||
__uuidof(IToastActivatedEventArgs),
|
||||
(void**)&eventArgs);
|
||||
if (SUCCEEDED(hr)) {
|
||||
HSTRING arguments;
|
||||
hr = eventArgs->get_Arguments(&arguments);
|
||||
@ -413,6 +415,7 @@ ToastNotificationHandler::OnActivate(IToastNotification *notification,
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (argString.EqualsLiteral("settings")) {
|
||||
mAlertListener->Observe(nullptr, "alertsettingscallback", mCookie.get());
|
||||
|
Loading…
Reference in New Issue
Block a user