AtlatestRepositorysigil-ui
1
<?xml version="1.0" encoding="UTF-8"?>2
<protocol name="xdg_activation_v1">4
<copyright>5
Copyright © 2020 Aleix Pol Gonzalez <aleixpol@kde.org>6
Copyright © 2020 Carlos Garnacho <carlosg@gnome.org>8
Permission is hereby granted, free of charge, to any person obtaining a9
copy of this software and associated documentation files (the "Software"),10
to deal in the Software without restriction, including without limitation11
the rights to use, copy, modify, merge, publish, distribute, sublicense,12
and/or sell copies of the Software, and to permit persons to whom the13
Software is furnished to do so, subject to the following conditions:15
The above copyright notice and this permission notice (including the next16
paragraph) shall be included in all copies or substantial portions of the17
Software.19
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR20
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,21
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL22
THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER23
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING24
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER25
DEALINGS IN THE SOFTWARE.26
</copyright>28
<description summary="Protocol for requesting activation of surfaces">29
The way for a client to pass focus to another toplevel is as follows.31
The client that intends to activate another toplevel uses the32
xdg_activation_v1.get_activation_token request to get an activation token.33
This token is then forwarded to the client, which is supposed to activate34
one of its surfaces, through a separate band of communication.36
One established way of doing this is through the XDG_ACTIVATION_TOKEN37
environment variable of a newly launched child process. The child process38
should unset the environment variable again right after reading it out in39
order to avoid propagating it to other child processes.41
Another established way exists for Applications implementing the D-Bus42
interface org.freedesktop.Application, which should get their token under43
activation-token on their platform_data.45
In general activation tokens may be transferred across clients through46
means not described in this protocol.48
The client to be activated will then pass the token49
it received to the xdg_activation_v1.activate request. The compositor can50
then use this token to decide how to react to the activation request.52
The token the activating client gets may be ineffective either already at53
the time it receives it, for example if it was not focused, for focus54
stealing prevention. The activating client will have no way to discover55
the validity of the token, and may still forward it to the to be activated56
client.58
The created activation token may optionally get information attached to it59
that can be used by the compositor to identify the application that we60
intend to activate. This can for example be used to display a visual hint61
about what application is being started.63
Warning! The protocol described in this file is currently in the testing64
phase. Backward compatible changes may be added together with the65
corresponding interface version bump. Backward incompatible changes can66
only be done by creating a new major version of the extension.67
</description>69
<interface name="xdg_activation_v1" version="1">70
<description summary="interface for activating surfaces">71
A global interface used for informing the compositor about applications72
being activated or started, or for applications to request to be73
activated.74
</description>76
<request name="destroy" type="destructor">77
<description summary="destroy the xdg_activation object">78
Notify the compositor that the xdg_activation object will no longer be79
used.81
The child objects created via this interface are unaffected and should82
be destroyed separately.83
</description>84
</request>86
<request name="get_activation_token">87
<description summary="requests a token">88
Creates an xdg_activation_token_v1 object that will provide89
the initiating client with a unique token for this activation. This90
token should be offered to the clients to be activated.91
</description>93
<arg name="id" type="new_id" interface="xdg_activation_token_v1"/>94
</request>96
<request name="activate">97
<description summary="notify new interaction being available">98
Requests surface activation. It's up to the compositor to display99
this information as desired, for example by placing the surface above100
the rest.102
The compositor may know who requested this by checking the activation103
token and might decide not to follow through with the activation if it's104
considered unwanted.106
Compositors can ignore unknown activation tokens when an invalid107
token is passed.108
</description>109
<arg name="token" type="string" summary="the activation token of the initiating client"/>110
<arg name="surface" type="object" interface="wl_surface"111
summary="the wl_surface to activate"/>112
</request>113
</interface>115
<interface name="xdg_activation_token_v1" version="1">116
<description summary="an exported activation handle">117
An object for setting up a token and receiving a token handle that can118
be passed as an activation token to another client.120
The object is created using the xdg_activation_v1.get_activation_token121
request. This object should then be populated with the app_id, surface122
and serial information and committed. The compositor shall then issue a123
done event with the token. In case the request's parameters are invalid,124
the compositor will provide an invalid token.125
</description>127
<enum name="error">128
<entry name="already_used" value="0"129
summary="The token has already been used previously"/>130
</enum>132
<request name="set_serial">133
<description summary="specifies the seat and serial of the activating event">134
Provides information about the seat and serial event that requested the135
token.137
The serial can come from an input or focus event. For instance, if a138
click triggers the launch of a third-party client, the launcher client139
should send a set_serial request with the serial and seat from the140
wl_pointer.button event.142
Some compositors might refuse to activate toplevels when the token143
doesn't have a valid and recent enough event serial.145
Must be sent before commit. This information is optional.146
</description>147
<arg name="serial" type="uint"148
summary="the serial of the event that triggered the activation"/>149
<arg name="seat" type="object" interface="wl_seat"150
summary="the wl_seat of the event"/>151
</request>153
<request name="set_app_id">154
<description summary="specifies the application being activated">155
The requesting client can specify an app_id to associate the token156
being created with it.158
Must be sent before commit. This information is optional.159
</description>160
<arg name="app_id" type="string"161
summary="the application id of the client being activated."/>162
</request>164
<request name="set_surface">165
<description summary="specifies the surface requesting activation">166
This request sets the surface requesting the activation. Note, this is167
different from the surface that will be activated.169
Some compositors might refuse to activate toplevels when the token170
doesn't have a requesting surface.172
Must be sent before commit. This information is optional.173
</description>174
<arg name="surface" type="object" interface="wl_surface"175
summary="the requesting surface"/>176
</request>178
<request name="commit">179
<description summary="issues the token request">180
Requests an activation token based on the different parameters that181
have been offered through set_serial, set_surface and set_app_id.182
</description>183
</request>185
<event name="done">186
<description summary="the exported activation token">187
The 'done' event contains the unique token of this activation request188
and notifies that the provider is done.189
</description>190
<arg name="token" type="string" summary="the exported activation token"/>191
</event>193
<request name="destroy" type="destructor">194
<description summary="destroy the xdg_activation_token_v1 object">195
Notify the compositor that the xdg_activation_token_v1 object will no196
longer be used. The received token stays valid.197
</description>198
</request>199
</interface>200
</protocol>