Bug 243255
| Summary: | [GTK] Desktop notifications are not shown in GNOME | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Sergio Villar Senin <svillar> |
| Component: | WebKitGTK | Assignee: | Nobody <webkit-unassigned> |
| Status: | RESOLVED WORKSFORME | ||
| Severity: | Major | CC: | bugs-noreply, cgarcia, mcatanzaro |
| Priority: | P2 | ||
| Version: | WebKit Nightly Build | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| URL: | https://ttsvetko.github.io/HTML5-Desktop-Notifications/ | ||
| See Also: | https://bugs.webkit.org/show_bug.cgi?id=240347 | ||
Sergio Villar Senin
Steps to reproduce:
1. visit https://ttsvetko.github.io/HTML5-Desktop-Notifications/
2. enter some text for title and body of the notification and click "Display Notification" button
Expected result:
A desktop notification is shown
Actual result:
No desktop notification is shown
| Attachments | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |
Sergio Villar Senin
I've just realized that the notification is properly sent. The things is that the desktop decides not to show it immediately but instead silently queue it in the notification area (which is usually hidden).
Perhaps it's just a matter of setting a different priority or type on the notification so that desktop shows it. With the current status, it looks like desktop notifications are not working.
For reference, the same page in Firefox or Chrome shows the desktop notification in real time.
Michael Catanzaro
Users have been complaining about this for a while. Basically all of the code here is in webkitWebViewShowNotification in WebKitWebView.cpp. Not sure what's wrong.
Carlos Garcia Campos
I guess you have tried with epiphany, not MiniBrowser. It works fine in MiniBrowser and the problem is epiphany setting all notifications as low urgency and gnome-shell never showing popups for low urgency notifications:
https://gitlab.gnome.org/GNOME/epiphany/-/blob/master/src/ephy-shell.c#L1010
https://gitlab.gnome.org/GNOME/gnome-shell/-/blob/main/js/ui/messageTray.js#L765
Sergio Villar Senin
(In reply to Carlos Garcia Campos from comment #3)
> I guess you have tried with epiphany, not MiniBrowser. It works fine in
> MiniBrowser and the problem is epiphany setting all notifications as low
> urgency and gnome-shell never showing popups for low urgency notifications:
Right, I've just tried MB as well and saw the same
> https://gitlab.gnome.org/GNOME/epiphany/-/blob/master/src/ephy-shell.c#L1010
> https://gitlab.gnome.org/GNOME/gnome-shell/-/blob/main/js/ui/messageTray.
> js#L765
Michael Catanzaro
(In reply to Carlos Garcia Campos from comment #3)
> I guess you have tried with epiphany, not MiniBrowser. It works fine in
> MiniBrowser and the problem is epiphany setting all notifications as low
> urgency
Where do you see that? Epiphany does not touch the GNotificationPriority, so they should use G_NOTIFICATION_PRIORITY_NORMAL.
Michael Catanzaro
(In reply to Michael Catanzaro from comment #5)
> Where do you see that? Epiphany does not touch the GNotificationPriority, so
> they should use G_NOTIFICATION_PRIORITY_NORMAL.
Oh, I see you already fixed it in https://gitlab.gnome.org/GNOME/epiphany/-/commit/45efd6da62991fad1388ebda837e50ed7b5b3be2.
Next time, if you use a permanent link like https://gitlab.gnome.org/GNOME/epiphany/-/blob/8d5130cb13fb9a0609ce6c9f7b826fcbc260df28/src/ephy-shell.c#L1010 you can avoid confusing me. :)