Remove settings button from native notifications on Linux
See original GitHub issueHi, I hope this is the right issue tracker for issues regarding nwjs’ chromium.src repo…
In #4560, you said you wanted to wait for Chromium to implement native notifications on all platforms instead of re-adding the functionality back to 0.13. Chromium has now finally implemented native notifications on Linux after doing so on macOS a few months ago:
- Linux: Chromium 61 / NWjs 0.25 (https://crbug.com/676220)
- macOS: Chromium 54 / NWjs 0.18 (I think it got removed from the
--enable-features=NativeNotifications
feature flag in Chromium 59 / NWjs 0.23) (https://crbug.com/326539) - Windows: still unsupported (https://crbug.com/516147)
Now to the issue: Native notifications created by Chromium on both macOS and Linux always include a “Settings” action button. In NWjs, clicking this settings button opens a new window with a blank site. This behavior can’t be changed or disabled, because it is hardcoded and it is super annoying. Especially since notifications with and without actions can be displayed completely differently on the system. And having such a settings button is confusing for the end user.
On macOS, you’ve already disabled the behavior in NWjs 0.25:
- https://github.com/nwjs/chromium.src/blame/nw25/chrome/browser/notifications/notification_platform_bridge_mac.mm#L249
- https://github.com/nwjs/chromium.src/commit/223521f6649110b8394313379e18a211f8de5fc8#diff-068696dc76b814f0aa715cb5a9fe4d4bR249 (takes a while to load)
On Linux, this is still enabled and needs a fix:
- 0.25: https://github.com/nwjs/chromium.src/blob/nw25/chrome/browser/notifications/notification_platform_bridge_linux.cc#L586-L591
- 0.26: https://github.com/nwjs/chromium.src/blob/nw26/chrome/browser/notifications/notification_platform_bridge_linux.cc#L586-L591
Thanks for your consideration!
Issue Analytics
- State:
- Created 6 years ago
- Comments:9 (5 by maintainers)
Top GitHub Comments
This is fixed in git and will be available in the next nightly build.
Maybe it fallbacks to rich notification somehow. Anyway I’ll disable the code you referred to.