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

Implement notification v2 #478

Closed
wants to merge 5 commits into from

Conversation

jsparber
Copy link
Contributor

This implements the new version of the notification portal. This depends on GNOME Shell changes.

The xdg-desktop-portal notification specs v2 add a sound property for
FdoNotification. We don't need to do anything if we gtk notifications
are used since they are passed directly to the server.
Since [1] FDO notifications can transfer a `ActivateToken` to the client
application, we can use this token to set the correct platform data to
get wayland startup notification working correctly.
GNOME Shell gained the feature already in [2], so this is the last piece
missing to get rid of the annoying "<Application> is ready" notifications,
when clicking on a notification.

We can set the platform data only for actions that are activated via
`org.freedesktop.Application`.

Fixes: flatpak#406

[1] https://gitlab.freedesktop.org/xdg/xdg-specs/-/commit/b9a470004d
[2] https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3199/
Apps may not implement the `org.freedesktop.Application` interface so
they won't get the platform data. We can do a little better and add the
platform data to the `ActionInvoked` signal.
We couldn't use the private GNOME Shell interface because it was missing
a couple of features we need in specific instances.
The private GNOME Shell interface can now also emit the ActionInvoked
signal and since version v2 it's mandatory that apps specify a desktop
file id so we can do the switch.
@jadahl
Copy link
Contributor

jadahl commented Oct 24, 2024

Isn't the gnome-shell specific bits in this MR supposed to live in xdg-desktop-portal-gnome? I'm not sure there are other implementations of the gtk notification API, nor it's stability guarantees, but I suspect we might want to drop it from xdp-gtk instead of extending it.

@jsparber
Copy link
Contributor Author

@jadahl yes, this is an old PR. By now i moved GNOME specific code into xdp-gnome.

@jsparber jsparber closed this Oct 24, 2024
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 this pull request may close these issues.

2 participants