|
0 |
<?xml version="1.0" encoding="UTF-8"?>
|
|
1 |
<protocol name="xdg_activation_v1">
|
|
2 |
|
|
3 |
<copyright>
|
|
4 |
Copyright © 2020 Aleix Pol Gonzalez <aleixpol@kde.org>
|
|
5 |
Copyright © 2020 Carlos Garnacho <carlosg@gnome.org>
|
|
6 |
|
|
7 |
Permission is hereby granted, free of charge, to any person obtaining a
|
|
8 |
copy of this software and associated documentation files (the "Software"),
|
|
9 |
to deal in the Software without restriction, including without limitation
|
|
10 |
the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
|
11 |
and/or sell copies of the Software, and to permit persons to whom the
|
|
12 |
Software is furnished to do so, subject to the following conditions:
|
|
13 |
|
|
14 |
The above copyright notice and this permission notice (including the next
|
|
15 |
paragraph) shall be included in all copies or substantial portions of the
|
|
16 |
Software.
|
|
17 |
|
|
18 |
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
19 |
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
20 |
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
|
21 |
THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
22 |
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
|
23 |
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
|
24 |
DEALINGS IN THE SOFTWARE.
|
|
25 |
</copyright>
|
|
26 |
|
|
27 |
<description summary="Protocol for requesting activation of surfaces">
|
|
28 |
The way for a client to pass focus to another toplevel is as follows.
|
|
29 |
|
|
30 |
The client that intends to activate another toplevel uses the
|
|
31 |
xdg_activation_v1.get_activation_token request to get an activation token.
|
|
32 |
This token is then passed to the client to be activated through a separate
|
|
33 |
band of communication. The client to be activated will then pass the token
|
|
34 |
it received to the xdg_activation_v1.activate request. The compositor can
|
|
35 |
then use this token to decide how to react to the activation request.
|
|
36 |
|
|
37 |
The token the activating client gets may be ineffective either already at
|
|
38 |
the time it receives it, for example if it was not focused, for focus
|
|
39 |
stealing prevention. The activating client will have no way to discover
|
|
40 |
the validity of the token, and may still forward it to the to be activated
|
|
41 |
client.
|
|
42 |
|
|
43 |
The created activation token may optionally get information attached to it
|
|
44 |
that can be used by the compositor to identify the application that we
|
|
45 |
intend to activate. This can for example be used to display a visual hint
|
|
46 |
about what application is being started.
|
|
47 |
|
|
48 |
Warning! The protocol described in this file is currently in the testing
|
|
49 |
phase. Backward compatible changes may be added together with the
|
|
50 |
corresponding interface version bump. Backward incompatible changes can
|
|
51 |
only be done by creating a new major version of the extension.
|
|
52 |
</description>
|
|
53 |
|
|
54 |
<interface name="xdg_activation_v1" version="1">
|
|
55 |
<description summary="interface for activating surfaces">
|
|
56 |
A global interface used for informing the compositor about applications
|
|
57 |
being activated or started, or for applications to request to be
|
|
58 |
activated.
|
|
59 |
</description>
|
|
60 |
|
|
61 |
<request name="destroy" type="destructor">
|
|
62 |
<description summary="destroy the xdg_activation object">
|
|
63 |
Notify the compositor that the xdg_activation object will no longer be
|
|
64 |
used.
|
|
65 |
|
|
66 |
The child objects created via this interface are unaffected and should
|
|
67 |
be destroyed separately.
|
|
68 |
</description>
|
|
69 |
</request>
|
|
70 |
|
|
71 |
<request name="get_activation_token">
|
|
72 |
<description summary="requests a token">
|
|
73 |
Creates an xdg_activation_token_v1 object that will provide
|
|
74 |
the initiating client with a unique token for this activation. This
|
|
75 |
token should be offered to the clients to be activated.
|
|
76 |
</description>
|
|
77 |
|
|
78 |
<arg name="id" type="new_id" interface="xdg_activation_token_v1"/>
|
|
79 |
</request>
|
|
80 |
|
|
81 |
<request name="activate">
|
|
82 |
<description summary="notify new interaction being available">
|
|
83 |
Requests surface activation. It's up to the compositor to display
|
|
84 |
this information as desired, for example by placing the surface above
|
|
85 |
the rest.
|
|
86 |
|
|
87 |
The compositor may know who requested this by checking the activation
|
|
88 |
token and might decide not to follow through with the activation if it's
|
|
89 |
considered unwanted.
|
|
90 |
|
|
91 |
Compositors can ignore unknown presentation tokens when an invalid
|
|
92 |
token is passed.
|
|
93 |
</description>
|
|
94 |
<arg name="token" type="string" summary="the activation token of the initiating client"/>
|
|
95 |
<arg name="surface" type="object" interface="wl_surface"
|
|
96 |
summary="the wl_surface to activate"/>
|
|
97 |
</request>
|
|
98 |
</interface>
|
|
99 |
|
|
100 |
<interface name="xdg_activation_token_v1" version="1">
|
|
101 |
<description summary="an exported activation handle">
|
|
102 |
An object for setting up a token and receiving a token handle that can
|
|
103 |
be passed as an activation token to another client.
|
|
104 |
|
|
105 |
The object is created using the xdg_activation_v1.get_activation_token
|
|
106 |
request. This object should then be populated with the app_id, surface
|
|
107 |
and serial information and committed. The compositor shall then issue a
|
|
108 |
done event with the token. In case the request's parameters are invalid,
|
|
109 |
the compositor will provide an invalid token.
|
|
110 |
</description>
|
|
111 |
|
|
112 |
<enum name="error">
|
|
113 |
<entry name="already_used" value="0"
|
|
114 |
summary="The token has already been used previously"/>
|
|
115 |
</enum>
|
|
116 |
|
|
117 |
<request name="set_serial">
|
|
118 |
<description summary="specifies the seat and serial of the activating event">
|
|
119 |
Provides information about the seat and serial event that requested the
|
|
120 |
token.
|
|
121 |
|
|
122 |
Must be sent before commit. This information is optional.
|
|
123 |
</description>
|
|
124 |
<arg name="serial" type="uint"
|
|
125 |
summary="the serial of the event that triggered the activation"/>
|
|
126 |
<arg name="seat" type="object" interface="wl_seat"
|
|
127 |
summary="the wl_seat of the event"/>
|
|
128 |
</request>
|
|
129 |
|
|
130 |
<request name="set_app_id">
|
|
131 |
<description summary="specifies the application being activated">
|
|
132 |
The requesting client can specify an app_id to associate the token
|
|
133 |
being created with it.
|
|
134 |
|
|
135 |
Must be sent before commit. This information is optional.
|
|
136 |
</description>
|
|
137 |
<arg name="app_id" type="string"
|
|
138 |
summary="the application id of the client being activated."/>
|
|
139 |
</request>
|
|
140 |
|
|
141 |
<request name="set_surface">
|
|
142 |
<description summary="specifies the application being activated">
|
|
143 |
The requesting client can specify a surface to associate the token
|
|
144 |
being created with it.
|
|
145 |
|
|
146 |
Must be triggered before commit. This information is optional.
|
|
147 |
</description>
|
|
148 |
<arg name="surface" type="object" interface="wl_surface"
|
|
149 |
summary="the requesting surface"/>
|
|
150 |
</request>
|
|
151 |
|
|
152 |
<request name="commit">
|
|
153 |
<description summary="issues the token request">
|
|
154 |
Requests an activation token based on the different parameters that
|
|
155 |
have been offered through set_serial, set_surface and set_app_id.
|
|
156 |
</description>
|
|
157 |
</request>
|
|
158 |
|
|
159 |
<event name="done">
|
|
160 |
<description summary="the exported activation token">
|
|
161 |
The 'done' event contains the unique token of this activation request
|
|
162 |
and notifies that the provider is done.
|
|
163 |
|
|
164 |
Applications will typically receive the token through the
|
|
165 |
XDG_ACTIVATION_TOKEN environment variable as set by its launcher, and
|
|
166 |
should unset the environment variable right after this request, in
|
|
167 |
order to avoid propagating it to child processes.
|
|
168 |
|
|
169 |
Applications implementing the D-Bus interface org.freedesktop.Application
|
|
170 |
should get their token under XDG_ACTIVATION_TOKEN on their platform_data.
|
|
171 |
|
|
172 |
Presentation tokens may be transferred across clients through means not
|
|
173 |
described in this protocol.
|
|
174 |
</description>
|
|
175 |
<arg name="token" type="string" summary="the exported activation token"/>
|
|
176 |
</event>
|
|
177 |
|
|
178 |
<request name="destroy" type="destructor">
|
|
179 |
<description summary="destroy the xdg_activation_token_v1 object">
|
|
180 |
Notify the compositor that the xdg_activation_token_v1 object will no
|
|
181 |
longer be used.
|
|
182 |
</description>
|
|
183 |
</request>
|
|
184 |
</interface>
|
|
185 |
</protocol>
|