-
Notifications
You must be signed in to change notification settings - Fork 244
notification: Add platform-data (with activation_token) to ActionInvoked #791
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -167,6 +167,42 @@ | |
| <arg type="s" name="action"/> | ||
| <arg type="av" name="parameter"/> | ||
| </signal> | ||
|
|
||
| <!-- | ||
| ActionInvoked2: | ||
| @id: the application-provided ID for the notification | ||
| @action: the name of the action | ||
| @platform_data: array which will contain the platform data | ||
| such as desktop-startup-id. | ||
| @parameter: array which will contain the target parameter | ||
| for the action, if one was specified | ||
|
|
||
| Send to the application when a non-exported action is | ||
| activated. | ||
|
|
||
| Supported keys in the @platform_data vardict include: | ||
| <variablelist> | ||
| <varlistentry> | ||
| <term>activation_token s</term> | ||
| <listitem> | ||
| <para> | ||
| A token that can be used to activate windows or applications | ||
| when action is invoked. | ||
| </para> | ||
| <para> | ||
| This can be either an X11-style startup ID or a Wayland | ||
| xdg-activation token. | ||
| </para> | ||
| </listitem> | ||
| </varlistentry> | ||
| </variablelist> | ||
| --> | ||
| <signal name="ActionInvoked2"> | ||
| <arg type="s" name="id"/> | ||
| <arg type="s" name="action"/> | ||
| <arg type="a{sv}" name="platform_data"/> | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same about calling it |
||
| <arg type="av" name="parameter"/> | ||
| </signal> | ||
| <property name="version" type="u" access="read"/> | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can we not bump the version, here? If version == 2, then ActionInvoked has more parameters, otherwise it doesn't. Unless we assume that all portal implementations aren't checking the version. I really don't want to have methods called
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. That's not how it works; the apps don't "bind" a version it's compatible with, so we cannot change the type signature. How do you imagine "app1" that is using the current version of the API to continue to work with a new xdg-desktop-portal if the type signature changes? I think we just have to live with the fact that there will be a "Foo2" here and there. It's also why it's good to more or less always have a vararg so one can add more properties like this without changing the type signature. |
||
| </interface> | ||
| </node> | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perhaps name this
options? It's what the equivalent thing is called in other portals.