diff options
author | Simon Ser <contact@emersion.fr> | 2021-01-12 22:38:45 +0100 |
---|---|---|
committer | Simon Ser <contact@emersion.fr> | 2021-01-12 22:38:45 +0100 |
commit | 97adba05162f314c7dda27fd1587cf7f78cd7c90 (patch) | |
tree | ef56f150c94f9beae70a9a518a4cf617df760f21 /protocols | |
parent | Rename output_layer_for_each_surface_{toplevel,popup} (diff) | |
download | sway-97adba05162f314c7dda27fd1587cf7f78cd7c90.tar.gz sway-97adba05162f314c7dda27fd1587cf7f78cd7c90.tar.zst sway-97adba05162f314c7dda27fd1587cf7f78cd7c90.zip |
protocols: update layer-shell-unstable-v1 to v4
This is taken from wlr-protocols commit d1598e82240d ("layer-shell: add
keyboard_interactivity.on_demand").
Diffstat (limited to 'protocols')
-rw-r--r-- | protocols/wlr-layer-shell-unstable-v1.xml | 97 |
1 files changed, 88 insertions, 9 deletions
diff --git a/protocols/wlr-layer-shell-unstable-v1.xml b/protocols/wlr-layer-shell-unstable-v1.xml index fa67001d..d62fd51e 100644 --- a/protocols/wlr-layer-shell-unstable-v1.xml +++ b/protocols/wlr-layer-shell-unstable-v1.xml | |||
@@ -25,7 +25,7 @@ | |||
25 | THIS SOFTWARE. | 25 | THIS SOFTWARE. |
26 | </copyright> | 26 | </copyright> |
27 | 27 | ||
28 | <interface name="zwlr_layer_shell_v1" version="3"> | 28 | <interface name="zwlr_layer_shell_v1" version="4"> |
29 | <description summary="create surfaces that are layers of the desktop"> | 29 | <description summary="create surfaces that are layers of the desktop"> |
30 | Clients can use this interface to assign the surface_layer role to | 30 | Clients can use this interface to assign the surface_layer role to |
31 | wl_surfaces. Such surfaces are assigned to a "layer" of the output and | 31 | wl_surfaces. Such surfaces are assigned to a "layer" of the output and |
@@ -47,6 +47,12 @@ | |||
47 | or manipulate a buffer prior to the first layer_surface.configure call | 47 | or manipulate a buffer prior to the first layer_surface.configure call |
48 | must also be treated as errors. | 48 | must also be treated as errors. |
49 | 49 | ||
50 | After creating a layer_surface object and setting it up, the client | ||
51 | must perform an initial commit without any buffer attached. | ||
52 | The compositor will reply with a layer_surface.configure event. | ||
53 | The client must acknowledge it and is then allowed to attach a buffer | ||
54 | to map the surface. | ||
55 | |||
50 | You may pass NULL for output to allow the compositor to decide which | 56 | You may pass NULL for output to allow the compositor to decide which |
51 | output to use. Generally this will be the one that the user most | 57 | output to use. Generally this will be the one that the user most |
52 | recently interacted with. | 58 | recently interacted with. |
@@ -94,7 +100,7 @@ | |||
94 | </request> | 100 | </request> |
95 | </interface> | 101 | </interface> |
96 | 102 | ||
97 | <interface name="zwlr_layer_surface_v1" version="3"> | 103 | <interface name="zwlr_layer_surface_v1" version="4"> |
98 | <description summary="layer metadata interface"> | 104 | <description summary="layer metadata interface"> |
99 | An interface that may be implemented by a wl_surface, for surfaces that | 105 | An interface that may be implemented by a wl_surface, for surfaces that |
100 | are designed to be rendered as a layer of a stacked desktop-like | 106 | are designed to be rendered as a layer of a stacked desktop-like |
@@ -103,6 +109,14 @@ | |||
103 | Layer surface state (layer, size, anchor, exclusive zone, | 109 | Layer surface state (layer, size, anchor, exclusive zone, |
104 | margin, interactivity) is double-buffered, and will be applied at the | 110 | margin, interactivity) is double-buffered, and will be applied at the |
105 | time wl_surface.commit of the corresponding wl_surface is called. | 111 | time wl_surface.commit of the corresponding wl_surface is called. |
112 | |||
113 | Attaching a null buffer to a layer surface unmaps it. | ||
114 | |||
115 | Unmapping a layer_surface means that the surface cannot be shown by the | ||
116 | compositor until it is explicitly mapped again. The layer_surface | ||
117 | returns to the state it had right after layer_shell.get_layer_surface. | ||
118 | The client can re-map the surface by performing a commit without any | ||
119 | buffer attached, waiting for a configure event and handling it as usual. | ||
106 | </description> | 120 | </description> |
107 | 121 | ||
108 | <request name="set_size"> | 122 | <request name="set_size"> |
@@ -189,21 +203,85 @@ | |||
189 | <arg name="left" type="int"/> | 203 | <arg name="left" type="int"/> |
190 | </request> | 204 | </request> |
191 | 205 | ||
206 | <enum name="keyboard_interactivity"> | ||
207 | <description summary="types of keyboard interaction possible for a layer shell surface"> | ||
208 | Types of keyboard interaction possible for layer shell surfaces. The | ||
209 | rationale for this is twofold: (1) some applications are not interested | ||
210 | in keyboard events and not allowing them to be focused can improve the | ||
211 | desktop experience; (2) some applications will want to take exclusive | ||
212 | keyboard focus. | ||
213 | </description> | ||
214 | |||
215 | <entry name="none" value="0"> | ||
216 | <description summary="no keyboard focus is possible"> | ||
217 | This value indicates that this surface is not interested in keyboard | ||
218 | events and the compositor should never assign it the keyboard focus. | ||
219 | |||
220 | This is the default value, set for newly created layer shell surfaces. | ||
221 | |||
222 | This is useful for e.g. desktop widgets that display information or | ||
223 | only have interaction with non-keyboard input devices. | ||
224 | </description> | ||
225 | </entry> | ||
226 | <entry name="exclusive" value="1"> | ||
227 | <description summary="request exclusive keyboard focus"> | ||
228 | Request exclusive keyboard focus if this surface is above the shell surface layer. | ||
229 | |||
230 | For the top and overlay layers, the seat will always give | ||
231 | exclusive keyboard focus to the top-most layer which has keyboard | ||
232 | interactivity set to exclusive. If this layer contains multiple | ||
233 | surfaces with keyboard interactivity set to exclusive, the compositor | ||
234 | determines the one receiving keyboard events in an implementation- | ||
235 | defined manner. In this case, no guarantee is made when this surface | ||
236 | will receive keyboard focus (if ever). | ||
237 | |||
238 | For the bottom and background layers, the compositor is allowed to use | ||
239 | normal focus semantics. | ||
240 | |||
241 | This setting is mainly intended for applications that need to ensure | ||
242 | they receive all keyboard events, such as a lock screen or a password | ||
243 | prompt. | ||
244 | </description> | ||
245 | </entry> | ||
246 | <entry name="on_demand" value="2" since="4"> | ||
247 | <description summary="request regular keyboard focus semantics"> | ||
248 | This requests the compositor to allow this surface to be focused and | ||
249 | unfocused by the user in an implementation-defined manner. The user | ||
250 | should be able to unfocus this surface even regardless of the layer | ||
251 | it is on. | ||
252 | |||
253 | Typically, the compositor will want to use its normal mechanism to | ||
254 | manage keyboard focus between layer shell surfaces with this setting | ||
255 | and regular toplevels on the desktop layer (e.g. click to focus). | ||
256 | Nevertheless, it is possible for a compositor to require a special | ||
257 | interaction to focus or unfocus layer shell surfaces (e.g. requiring | ||
258 | a click even if focus follows the mouse normally, or providing a | ||
259 | keybinding to switch focus between layers). | ||
260 | |||
261 | This setting is mainly intended for desktop shell components (e.g. | ||
262 | panels) that allow keyboard interaction. Using this option can allow | ||
263 | implementing a desktop shell that can be fully usable without the | ||
264 | mouse. | ||
265 | </description> | ||
266 | </entry> | ||
267 | </enum> | ||
268 | |||
192 | <request name="set_keyboard_interactivity"> | 269 | <request name="set_keyboard_interactivity"> |
193 | <description summary="requests keyboard events"> | 270 | <description summary="requests keyboard events"> |
194 | Set to 1 to request that the seat send keyboard events to this layer | 271 | Set how keyboard events are delivered to this surface. By default, |
195 | surface. For layers below the shell surface layer, the seat will use | 272 | layer shell surfaces do not receive keyboard events; this request can |
196 | normal focus semantics. For layers above the shell surface layers, the | 273 | be used to change this. |
197 | seat will always give exclusive keyboard focus to the top-most layer | 274 | |
198 | which has keyboard interactivity set to true. | 275 | This setting is inherited by child surfaces set by the get_popup |
276 | request. | ||
199 | 277 | ||
200 | Layer surfaces receive pointer, touch, and tablet events normally. If | 278 | Layer surfaces receive pointer, touch, and tablet events normally. If |
201 | you do not want to receive them, set the input region on your surface | 279 | you do not want to receive them, set the input region on your surface |
202 | to an empty region. | 280 | to an empty region. |
203 | 281 | ||
204 | Events is double-buffered, see wl_surface.commit. | 282 | Keyboard interactivity is double-buffered, see wl_surface.commit. |
205 | </description> | 283 | </description> |
206 | <arg name="keyboard_interactivity" type="uint"/> | 284 | <arg name="keyboard_interactivity" type="uint" enum="keyboard_interactivity"/> |
207 | </request> | 285 | </request> |
208 | 286 | ||
209 | <request name="get_popup"> | 287 | <request name="get_popup"> |
@@ -288,6 +366,7 @@ | |||
288 | <entry name="invalid_surface_state" value="0" summary="provided surface state is invalid"/> | 366 | <entry name="invalid_surface_state" value="0" summary="provided surface state is invalid"/> |
289 | <entry name="invalid_size" value="1" summary="size is invalid"/> | 367 | <entry name="invalid_size" value="1" summary="size is invalid"/> |
290 | <entry name="invalid_anchor" value="2" summary="anchor bitfield is invalid"/> | 368 | <entry name="invalid_anchor" value="2" summary="anchor bitfield is invalid"/> |
369 | <entry name="invalid_keyboard_interactivity" value="3" summary="keyboard interactivity is invalid"/> | ||
291 | </enum> | 370 | </enum> |
292 | 371 | ||
293 | <enum name="anchor" bitfield="true"> | 372 | <enum name="anchor" bitfield="true"> |