Skip to content

Commit

Permalink
notification: Define how apps can get an activation-token via ActionI…
Browse files Browse the repository at this point in the history
…nvoked

We need to hand out the activation token for XDG Activation in some way.
I think it's pretty nice that we can just add the same platform data as
used for DBus Activation to the ActionInvoked signal.
  • Loading branch information
jsparber committed Apr 16, 2024
1 parent c663bb9 commit a5a2c29
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
6 changes: 5 additions & 1 deletion data/org.freedesktop.impl.portal.Notification.xml
Original file line number Diff line number Diff line change
Expand Up @@ -128,10 +128,14 @@
@app_id: App id of the application
@id: the application-provided ID for the notification
@action: the name of the action
@parameter: array which will contain the target parameter for the action, if one was specified
@parameter: an array containing additional information
Send to the application when a non-exported action is
activated.
The @parameter contains the target parameter for the action, if one was specified,
and the `platform-data` as vardict containing an ``activation-token`` (``s``) for `XDG Activation
<https://gitlab.freedesktop.org/wayland/wayland-protocols/-/blob/main/staging/xdg-activation/xdg-activation-v1.xml>`_.
-->
<signal name="ActionInvoked">
<arg type="s" name="app_id"/>
Expand Down
8 changes: 6 additions & 2 deletions data/org.freedesktop.portal.Notification.xml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
<https://specifications.freedesktop.org/desktop-entry-spec/latest/ar01s08.html>`_
using ``ActivateAction()`` method in the
``org.freedesktop.Application`` interface. An `activation-token` for
` XDG Activation
`XDG Activation
<https://gitlab.freedesktop.org/wayland/wayland-protocols/-/blob/main/staging/xdg-activation/xdg-activation-v1.xml>`_
and an application-defined `target` is passed when activating the action.
Other
Expand Down Expand Up @@ -427,10 +427,14 @@
ActionInvoked:
@id: the application-provided ID for the notification
@action: the name of the action
@parameter: array which will contain the target parameter for the action, if one was specified
@parameter: an array containing additional information
Send to the application when a non-exported action is
activated.
The @parameter contains the target parameter for the action, if one was specified,
and the `platform-data` as vardict containing an ``activation-token`` (``s``) for `XDG Activation
<https://gitlab.freedesktop.org/wayland/wayland-protocols/-/blob/main/staging/xdg-activation/xdg-activation-v1.xml>`_.
-->
<signal name="ActionInvoked">
<arg type="s" name="id"/>
Expand Down

0 comments on commit a5a2c29

Please sign in to comment.