river-window-management-v1.xml 83 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <protocol name="river_window_management_v1">
  3. <copyright>
  4. SPDX-FileCopyrightText: © 2024 Isaac Freund
  5. SPDX-License-Identifier: MIT
  6. Permission is hereby granted, free of charge, to any person obtaining a copy
  7. of this software and associated documentation files (the "Software"), to
  8. deal in the Software without restriction, including without limitation the
  9. rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
  10. sell copies of the Software, and to permit persons to whom the Software is
  11. furnished to do so, subject to the following conditions:
  12. The above copyright notice and this permission notice shall be included in
  13. all copies or substantial portions of the Software.
  14. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  15. IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  16. FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
  17. AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  18. LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
  19. FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
  20. IN THE SOFTWARE.
  21. </copyright>
  22. <description summary="frame-perfect window management">
  23. This protocol allows a single "window manager" client to determine the
  24. window management policy of the compositor. State is globally
  25. double-buffered allowing for frame perfect state changes involving multiple
  26. windows.
  27. The key words "must", "must not", "required", "shall", "shall not",
  28. "should", "should not", "recommended", "may", and "optional" in this
  29. document are to be interpreted as described in IETF RFC 2119.
  30. </description>
  31. <interface name="river_window_manager_v1" version="5">
  32. <description summary="window manager global interface">
  33. This global interface should only be advertised to the window manager
  34. process. Only one window management client may be active at a time. The
  35. compositor should use the unavailable event if necessary to enforce this.
  36. There are two disjoint categories of state managed by this protocol:
  37. Window management state influences the communication between the
  38. compositor and individual windows (e.g. xdg_toplevels). Window management
  39. state includes window dimensions, fullscreen state, keyboard focus,
  40. keyboard bindings, and more.
  41. Rendering state only affects the rendered output of the compositor and
  42. does not influence communication between the compositor and individual
  43. windows. Rendering state includes the position and rendering order of
  44. windows, shell surfaces, decoration surfaces, borders, and more.
  45. Window management state may only be modified by the window manager as part
  46. of a manage sequence. A manage sequence is started with the manage_start
  47. event and ended with the manage_finish request. It is a protocol error to
  48. modify window management state outside of a manage sequence.
  49. A manage sequence is always followed by at least one render sequence. A
  50. render sequence is started with the render_start event and ended with the
  51. render_finish request.
  52. Rendering state may be modified by the window manager during a manage
  53. sequence or a render sequence. Regardless of when the rendering state is
  54. modified, it is applied with the next render_finish request. It is a
  55. protocol error to modify rendering state outside of a manage or render
  56. sequence.
  57. The server will start a manage sequence by sending new state and the
  58. manage_start event as soon as possible whenever there is a change in state
  59. that must be communicated with the window manager.
  60. If the window manager client needs to ensure a manage sequence is started
  61. due to a state change the compositor is not aware of, it may send the
  62. manage_dirty request.
  63. The server will start a render sequence by sending new state and the
  64. render_start event as soon as possible whenever there is a change in
  65. window dimensions that must be communicated with the window manager.
  66. Multiple render sequences may be made consecutively without a manage
  67. sequence in between, for example if a window independently changes its own
  68. dimensions.
  69. To summarize, the main loop of this protocol is as follows:
  70. 1. The server sends events indicating all changes since the last
  71. manage sequence followed by the manage_start event.
  72. 2. The client sends requests modifying window management state or
  73. rendering state (as defined above) followed by the manage_finish
  74. request.
  75. 3. The server sends new state to windows and waits for responses.
  76. 4. The server sends new window dimensions to the client followed by the
  77. render_start event.
  78. 5. The client sends requests modifying rendering state (as defined above)
  79. followed by the render_finish request.
  80. 6. If window dimensions change, loop back to step 4.
  81. If state that requires a manage sequence changes or if the client makes
  82. a manage_dirty request, loop back to step 1.
  83. For the purposes of frame perfection, the server may delay rendering new
  84. state committed by the windows in step 3 until after step 5 is finished.
  85. It is a protocol error for the client to make a manage_finish or
  86. render_finish request that violates this ordering.
  87. </description>
  88. <enum name="error">
  89. <entry name="sequence_order" value="0"
  90. summary="request violates manage/render sequence ordering"/>
  91. <entry name="role" value="1"
  92. summary="given wl_surface already has a role"/>
  93. <entry name="unresponsive" value="2"
  94. summary="window manager unresponsive"/>
  95. </enum>
  96. <event name="unavailable">
  97. <description summary="window management unavailable">
  98. This event indicates that window management is not available to the
  99. client, perhaps due to another window management client already running.
  100. The circumstances causing this event to be sent are compositor policy.
  101. If sent, this event is guaranteed to be the first and only event sent by
  102. the server.
  103. The server will send no further events on this object. The client should
  104. destroy this object and all objects created through this interface.
  105. </description>
  106. </event>
  107. <request name="stop">
  108. <description summary="stop sending events">
  109. This request indicates that the client no longer wishes to receive
  110. events on this object.
  111. The Wayland protocol is asynchronous, which means the server may send
  112. further events until the stop request is processed. The client must wait
  113. for a river_window_manager_v1.finished event before destroying this
  114. object.
  115. </description>
  116. </request>
  117. <event name="finished">
  118. <description summary="the server has finished with the window manager">
  119. This event indicates that the server will send no further events on this
  120. object. The client should destroy the object. See
  121. river_window_manager_v1.destroy for more information.
  122. </description>
  123. </event>
  124. <request name="destroy" type="destructor">
  125. <description summary="destroy the river_window_manager_v1 object">
  126. This request should be called after the finished event has been received
  127. to complete destruction of the object.
  128. If a client wishes to destroy this object it should send a
  129. river_window_manager_v1.stop request and wait for a
  130. river_window_manager_v1.finished event. Once the finished event is
  131. received it is safe to destroy this object and any other objects created
  132. through this interface.
  133. </description>
  134. </request>
  135. <event name="manage_start">
  136. <description summary="start a manage sequence">
  137. This event indicates that the server has sent events indicating all
  138. state changes since the last manage sequence.
  139. In response to this event, the client should make requests modifying
  140. window management state as it chooses. Then, the client must make the
  141. manage_finish request.
  142. See the description of the river_window_manager_v1 interface for a
  143. complete overview of the manage/render sequence loop.
  144. </description>
  145. </event>
  146. <request name="manage_finish">
  147. <description summary="finish a manage sequence">
  148. This request indicates that the client has made all changes to window
  149. management state it wishes to include in the current manage sequence and
  150. that the server should atomically send these state changes to the
  151. windows and continue with the manage sequence.
  152. After sending this request, it is a protocol error for the client to
  153. make further changes to window management state until the next
  154. manage_start event is received.
  155. See the description of the river_window_manager_v1 interface for a
  156. complete overview of the manage/render sequence loop.
  157. </description>
  158. </request>
  159. <request name="manage_dirty">
  160. <description summary="ensure a manage sequence is started">
  161. This request ensures a manage sequence is started and that a
  162. manage_start event is sent by the server. If this request is made during
  163. an ongoing manage sequence, a new manage sequence will be started as
  164. soon as the current one is completed.
  165. The client may want to use this request due to an internal state change
  166. that the compositor is not aware of (e.g. a dbus event) which should
  167. affect window management or rendering state.
  168. </description>
  169. </request>
  170. <event name="render_start">
  171. <description summary="start a render sequence">
  172. This event indicates that the server has sent all
  173. river_window_v1.dimensions events necessary.
  174. In response to this event, the client should make requests modifying
  175. rendering state as it chooses. Then, the client must make the
  176. render_finish request.
  177. See the description of the river_window_manager_v1 interface for a
  178. complete overview of the manage/render sequence loop.
  179. </description>
  180. </event>
  181. <request name="render_finish">
  182. <description summary="finish a render sequence">
  183. This request indicates that the client has made all changes to rendering
  184. state it wishes to include in the current manage sequence and that the
  185. server should atomically apply and display these state changes to the
  186. user.
  187. After sending this request, it is a protocol error for the client to
  188. make further changes to rendering state until the next manage_start or
  189. render_start event is received, whichever comes first.
  190. See the description of the river_window_manager_v1 interface for a
  191. complete overview of the manage/render sequence loop.
  192. </description>
  193. </request>
  194. <event name="session_locked">
  195. <description summary="the session has been locked">
  196. This event indicates that the session has been locked.
  197. The window manager may wish to restrict which key bindings are available
  198. while locked or otherwise use this information.
  199. If the session is currently locked when the river_window_manager_v1
  200. object is created, the session_locked event will be sent in the first
  201. manage sequence.
  202. This event will be followed by a manage_start event after all other new
  203. state has been sent by the server.
  204. </description>
  205. </event>
  206. <event name="session_unlocked">
  207. <description summary="the session has been unlocked">
  208. This event indicates that the session has been unlocked.
  209. This event will be followed by a manage_start event after all other new
  210. state has been sent by the server.
  211. </description>
  212. </event>
  213. <event name="window">
  214. <description summary="new window">
  215. A new window has been created.
  216. This event will be followed by a manage_start event after all other new
  217. state has been sent by the server.
  218. </description>
  219. <arg name="id" type="new_id" interface="river_window_v1" summary="new window"/>
  220. </event>
  221. <event name="output">
  222. <description summary="new output">
  223. A new logical output has been created, perhaps due to a new physical
  224. monitor being plugged in or perhaps due to a change in configuration.
  225. This event will be followed by river_output_v1.position and dimensions
  226. events as well as a manage_start event after all other new state has
  227. been sent by the server.
  228. </description>
  229. <arg name="id" type="new_id" interface="river_output_v1" summary="new output"/>
  230. </event>
  231. <event name="seat">
  232. <description summary="new seat">
  233. A new seat has been created.
  234. This event will be followed by a manage_start event after all other new
  235. state has been sent by the server.
  236. </description>
  237. <arg name="id" type="new_id" interface="river_seat_v1" summary="new seat"/>
  238. </event>
  239. <request name="get_shell_surface">
  240. <description summary="assign the river_shell_surface_v1 surface role">
  241. Create a new shell surface for window manager UI and assign the
  242. river_shell_surface_v1 role to the surface.
  243. Providing a wl_surface which already has a role or already has a buffer
  244. attached or committed is a protocol error.
  245. </description>
  246. <arg name="id" type="new_id" interface="river_shell_surface_v1"
  247. summary="new river shell surface"/>
  248. <arg name="surface" type="object" interface="wl_surface"
  249. summary="base surface"/>
  250. </request>
  251. <request name="exit_session" since="4">
  252. <description summary="exit the Wayland session">
  253. End the current Wayland session and exit the compositor.
  254. All Wayland clients running in the current session, including
  255. the window manager, will be disconnected.
  256. Window managers should only make this request if the user explicitly
  257. asks to exit the Wayland session, not for example on normal window
  258. manager termination.
  259. </description>
  260. </request>
  261. </interface>
  262. <interface name="river_window_v1" version="5">
  263. <description summary="a logical window">
  264. This represents a logical window. For example, a window may correspond to
  265. an xdg_toplevel or Xwayland window.
  266. A newly created window will not be displayed until the window manager
  267. makes a propose_dimensions or fullscreen request as part of a manage
  268. sequence, the server replies with a dimensions event as part of a render
  269. sequence, and that render sequence is finished.
  270. </description>
  271. <enum name="error">
  272. <entry name="node_exists" value="0"
  273. summary="window already has a node object"/>
  274. <entry name="invalid_dimensions" value="1"
  275. summary="proposed dimensions out of bounds"/>
  276. <entry name="invalid_border" value="2"
  277. summary="invalid arg to set_borders"/>
  278. <entry name="invalid_clip_box" value="3"
  279. summary="invalid arg to set_clip_box"/>
  280. </enum>
  281. <request name="destroy" type="destructor">
  282. <description summary="destroy the window object">
  283. This request indicates that the client will no longer use the window
  284. object and that it may be safely destroyed.
  285. This request should be made after the river_window_v1.closed event or
  286. river_window_manager_v1.finished is received to complete destruction of
  287. the window.
  288. </description>
  289. </request>
  290. <event name="closed">
  291. <description summary="the window has been closed">
  292. The window has been closed by the server, perhaps due to an
  293. xdg_toplevel.close request or similar.
  294. The server will send no further events on this object and ignore any
  295. request other than river_window_v1.destroy made after this event is
  296. sent. The client should destroy this object with the
  297. river_window_v1.destroy request to free up resources.
  298. This event will be followed by a manage_start event after all other new
  299. state has been sent by the server.
  300. </description>
  301. </event>
  302. <request name="close">
  303. <description summary="request that the window be closed">
  304. Request that the window be closed. The window may ignore this request or
  305. only close after some delay, perhaps opening a dialog asking the user to
  306. save their work or similar.
  307. The server will send a river_window_v1.closed event if/when the window
  308. has been closed.
  309. This request modifies window management state and may only be made as
  310. part of a manage sequence, see the river_window_manager_v1 description.
  311. </description>
  312. </request>
  313. <request name="get_node">
  314. <description summary="get the window's render list node">
  315. Get the node in the render list corresponding to the window.
  316. It is a protocol error to make this request more than once for a single
  317. window.
  318. </description>
  319. <arg name="id" type="new_id" interface="river_node_v1" summary="new node"/>
  320. </request>
  321. <event name="dimensions_hint">
  322. <description summary="the window's preferred min/max dimensions">
  323. This event informs the window manager of the window's preferred min/max
  324. dimensions. These preferences are a hint, and the window manager is free
  325. to propose dimensions outside of these bounds.
  326. All min/max width/height values must be strictly greater than or equal
  327. to 0. A value of 0 indicates that the window has no preference for that
  328. value.
  329. If the max_width/max_height is greater than 0, the min_width/min_height
  330. must be strictly less than or equal to the max_width/max_height.
  331. This event will be followed by a manage_start event after all other new
  332. state has been sent by the server.
  333. </description>
  334. <arg name="min_width" type="int" summary="minimum width"/>
  335. <arg name="min_height" type="int" summary="minimum height"/>
  336. <arg name="max_width" type="int" summary="maximum width"/>
  337. <arg name="max_height" type="int" summary="maximum height"/>
  338. </event>
  339. <event name="dimensions">
  340. <description summary="window dimensions">
  341. This event indicates the dimensions of the window in the compositor's
  342. logical coordinate space. The width and height must be strictly greater
  343. than zero.
  344. Note that the dimensions of a river_window_v1 refer to the dimensions of
  345. the window content and are unaffected by the presence of borders or
  346. decoration surfaces.
  347. This event is sent as part of a render sequence before the render_start
  348. event.
  349. It may be sent due to a propose_dimensions or fullscreen request in a
  350. previous manage sequence or because a window independently decides to
  351. change its dimensions.
  352. The window will not be displayed until the first dimensions event is
  353. received and the render sequence is finished.
  354. </description>
  355. <arg name="width" type="int" summary="window content width"/>
  356. <arg name="height" type="int" summary="window content height"/>
  357. </event>
  358. <request name="propose_dimensions">
  359. <description summary="propose window dimensions">
  360. This request proposes dimensions for the window in the compositor's
  361. logical coordinate space.
  362. The width and height must be greater than or equal to zero. If the width
  363. or height is zero the window will be allowed to decide its own
  364. dimensions.
  365. The window may not take the exact dimensions proposed. The actual
  366. dimensions taken by the window will be sent in a subsequent
  367. river_window_v1.dimensions event. For example, a terminal emulator may
  368. only allow dimensions that are multiple of the cell size.
  369. When a propose_dimensions request is made, the server must send a
  370. dimensions event in response as soon as possible. It may not be possible
  371. to send a dimensions event in the very next render sequence if, for
  372. example, the window takes too long to respond to the proposed
  373. dimensions. In this case, the server will send the dimensions event in a
  374. future render sequence.
  375. Note that the dimensions of a river_window_v1 refer to the dimensions of
  376. the window content and are unaffected by the presence of borders or
  377. decoration surfaces.
  378. This request modifies window management state and may only be made as
  379. part of a manage sequence, see the river_window_manager_v1 description.
  380. </description>
  381. <arg name="width" type="int" summary="proposed content width"/>
  382. <arg name="height" type="int" summary="proposed content height"/>
  383. </request>
  384. <request name="hide">
  385. <description summary="request that the window be hidden">
  386. Request that the window be hidden. Has no effect if the window is
  387. already hidden. Hides any window borders and decorations as well.
  388. Newly created windows are considered shown unless explicitly hidden with
  389. the hide request.
  390. This request modifies rendering state and may only be made as part of a
  391. render sequence, see the river_window_manager_v1 description.
  392. </description>
  393. </request>
  394. <request name="show">
  395. <description summary="request that the window be shown">
  396. Request that the window be shown. Has no effect if the window is not
  397. hidden. Does not guarantee that the window is visible as it may be
  398. completely obscured by other windows placed above it for example.
  399. Newly created windows are considered shown unless explicitly hidden with
  400. the hide request.
  401. This request modifies rendering state and may only be made as part of a
  402. render sequence, see the river_window_manager_v1 description.
  403. </description>
  404. </request>
  405. <event name="app_id">
  406. <description summary="the window set an application ID">
  407. The window set an application ID.
  408. The app_id argument will be null if the window has never set an
  409. application ID or if the window cleared its application ID. (Xwayland
  410. windows may do this for example, though xdg-toplevels may not.)
  411. This event will be followed by a manage_start event after all other new
  412. state has been sent by the server.
  413. </description>
  414. <arg name="app_id" type="string" allow-null="true"
  415. summary="window application ID"/>
  416. </event>
  417. <event name="title">
  418. <description summary="the window set a title">
  419. The window set a title.
  420. The title argument will be null if the window has never set a title or
  421. if the window cleared its title. (Xwayland windows may do this for
  422. example, though xdg-toplevels may not.)
  423. This event will be followed by a manage_start event after all other new
  424. state has been sent by the server.
  425. </description>
  426. <arg name="title" type="string" allow-null="true" summary="window title"/>
  427. </event>
  428. <event name="parent">
  429. <description summary="the window set a parent">
  430. The window set a parent window. If this event is never received or if
  431. the parent argument is null then the window has no parent.
  432. A surface with a parent set might be a dialog, file picker, or similar
  433. for the parent window.
  434. Child windows should generally be rendered directly above their parent.
  435. The compositor must guarantee that there are no loops in the window
  436. tree: a parent must not be the descendant of one of its children.
  437. This event will be followed by a manage_start event after all other new
  438. state has been sent by the server.
  439. </description>
  440. <arg name="parent" type="object" allow-null="true"
  441. interface="river_window_v1" summary="parent window, if any"/>
  442. </event>
  443. <enum name="decoration_hint">
  444. <entry name="only_supports_csd" value="0"
  445. summary="only supports client side decoration"/>
  446. <entry name="prefers_csd" value="1"
  447. summary="client side decoration preferred, both CSD and SSD supported"/>
  448. <entry name="prefers_ssd" value="2"
  449. summary="server side decoration preferred, both CSD and SSD supported"/>
  450. <entry name="no_preference" value="3"
  451. summary="no preference, both CSD and SSD supported"/>
  452. </enum>
  453. <event name="decoration_hint">
  454. <description summary="supported/preferred decoration style">
  455. Information from the window about the supported and preferred client
  456. side/server side decoration options.
  457. This event may be sent multiple times over the lifetime of the window if
  458. the window changes its preferences.
  459. This event will be followed by a manage_start event after all other new
  460. state has been sent by the server.
  461. </description>
  462. <arg name="hint" type="uint" enum="decoration_hint" summary="decoration hint"/>
  463. </event>
  464. <request name="use_csd">
  465. <description summary="tell the client to use CSD">
  466. Tell the client to use client side decoration and draw its own title
  467. bar, borders, etc.
  468. This is the default if neither this request nor the use_ssd request is
  469. ever made.
  470. This request modifies window management state and may only be made as
  471. part of a manage sequence, see the river_window_manager_v1 description.
  472. </description>
  473. </request>
  474. <request name="use_ssd">
  475. <description summary="tell the client to use SSD">
  476. Tell the client to use server side decoration and not draw any client
  477. side decorations.
  478. This request will have no effect if the client only supports client side
  479. decoration, see the decoration_hint event.
  480. This request modifies window management state and may only be made as
  481. part of a manage sequence, see the river_window_manager_v1 description.
  482. </description>
  483. </request>
  484. <enum name="edges" bitfield="true">
  485. <entry name="none" value="0"/>
  486. <entry name="top" value="1"/>
  487. <entry name="bottom" value="2"/>
  488. <entry name="left" value="4"/>
  489. <entry name="right" value="8"/>
  490. </enum>
  491. <request name="set_borders">
  492. <description summary="set window borders">
  493. This request decorates the window with borders drawn by the compositor
  494. on the specified edges of the window. Borders are drawn above the window
  495. content.
  496. Corners are drawn only between borders on adjacent edges. If e.g. the
  497. left edge has a border and the top edge does not, the border drawn on
  498. the left edge will not extend vertically beyond the top edge of the
  499. window.
  500. Borders are not drawn while the window is fullscreen.
  501. The color is defined by four 32-bit RGBA values. Unless specified in
  502. another protocol extension, the RGBA values use pre-multiplied alpha.
  503. The valid range for the RGBA values is from 0x00000000 to 0xffffffff.
  504. These values are interpreted as a percentage:
  505. - 0x00000000 means 0% of the given color component
  506. - 0xffffffff means 100% of the given color component
  507. Setting the edges to none or the width to 0 disables the borders.
  508. Setting a negative width is a protocol error.
  509. This request completely overrides all previous set_borders requests.
  510. Only the most recent set_borders request has an effect.
  511. Note that the position/dimensions of a river_window_v1 refer to the
  512. position/dimensions of the window content and are unaffected by the
  513. presence of borders or decoration surfaces.
  514. This request modifies rendering state and may only be made as part of a
  515. render sequence, see the river_window_manager_v1 description.
  516. </description>
  517. <arg name="edges" type="uint" enum="edges" summary="border edges"/>
  518. <arg name="width" type="int" summary="border width"/>
  519. <arg name="r" type="uint" summary="32-bit red value"/>
  520. <arg name="g" type="uint" summary="32-bit green value"/>
  521. <arg name="b" type="uint" summary="32-bit blue value"/>
  522. <arg name="a" type="uint" summary="32-bit alpha value"/>
  523. </request>
  524. <request name="set_tiled">
  525. <description summary="set window tiled state">
  526. Inform the window that it is part of a tiled layout and adjacent to
  527. other elements in the tiled layout on the given edges.
  528. The window should use this information to change the style of its client
  529. side decorations and avoid drawing e.g. drop shadows outside of the
  530. window dimensions on the tiled edges.
  531. Setting the edges argument to none informs the window that it is not
  532. part of a tiled layout. If this request is never made, the window is
  533. informed that it is not part of a tiled layout.
  534. This request modifies window management state and may only be made as
  535. part of a manage sequence, see the river_window_manager_v1 description.
  536. </description>
  537. <arg name="edges" type="uint" enum="edges" summary="tiled edges"/>
  538. </request>
  539. <request name="get_decoration_above">
  540. <description summary="create a decoration above the window in z-order">
  541. Create a decoration surface and assign the river_decoration_v1 role to
  542. the surface. The created decoration is placed above the window in
  543. rendering order, see the description of river_decoration_v1.
  544. Providing a wl_surface which already has a role or already has a buffer
  545. attached or committed is a protocol error.
  546. </description>
  547. <arg name="id" type="new_id" interface="river_decoration_v1"
  548. summary="new decoration surface"/>
  549. <arg name="surface" type="object" interface="wl_surface"
  550. summary="base surface"/>
  551. </request>
  552. <request name="get_decoration_below">
  553. <description summary="create a decoration below the window in z-order">
  554. Create a decoration surface and assign the river_decoration_v1 role to
  555. the surface. The created decoration is placed below the window in
  556. rendering order, see the description of river_decoration_v1.
  557. Providing a wl_surface which already has a role or already has a buffer
  558. attached or committed is a protocol error.
  559. </description>
  560. <arg name="id" type="new_id" interface="river_decoration_v1"
  561. summary="new decoration surface"/>
  562. <arg name="surface" type="object" interface="wl_surface"
  563. summary="base surface"/>
  564. </request>
  565. <event name="pointer_move_requested">
  566. <description summary="window requested interactive pointer move">
  567. This event informs the window manager that the window has requested to
  568. be interactively moved using the pointer. The seat argument indicates the
  569. seat for the move.
  570. The xdg-shell protocol for example allows windows to request that an
  571. interactive move be started, perhaps when a client-side rendered
  572. titlebar is dragged.
  573. The window manager may use the river_seat_v1.op_start_pointer request to
  574. interactively move the window or ignore this event entirely.
  575. This event will be followed by a manage_start event after all other new
  576. state has been sent by the server.
  577. </description>
  578. <arg name="seat" type="object" interface="river_seat_v1"
  579. summary="requested seat"/>
  580. </event>
  581. <event name="pointer_resize_requested">
  582. <description summary="window requested interactive pointer resize">
  583. This event informs the window manager that the window has requested to
  584. be interactively resized using the pointer. The seat argument indicates
  585. the seat for the resize.
  586. The edges argument indicates which edges the window has requested to be
  587. resized from. The edges argument will never be none and will never have
  588. both top and bottom or both left and right edges set.
  589. The xdg-shell protocol for example allows windows to request that an
  590. interactive resize be started, perhaps when the corner of client-side
  591. rendered decorations is dragged.
  592. The window manager may use the river_seat_v1.op_start_pointer request to
  593. interactively resize the window or ignore this event entirely.
  594. This event will be followed by a manage_start event after all other new
  595. state has been sent by the server.
  596. </description>
  597. <arg name="seat" type="object" interface="river_seat_v1"
  598. summary="requested seat"/>
  599. <arg name="edges" type="uint" enum="edges"
  600. summary="requested edges"/>
  601. </event>
  602. <request name="inform_resize_start">
  603. <description summary="inform the window it is being resized">
  604. Inform the window that it is being resized. The window manager should
  605. use this request to inform windows that are the target of an interactive
  606. resize for example.
  607. The window manager remains responsible for handling the position and
  608. dimensions of the window while it is resizing.
  609. This request modifies window management state and may only be made as
  610. part of a manage sequence, see the river_window_manager_v1 description.
  611. </description>
  612. </request>
  613. <request name="inform_resize_end">
  614. <description summary="inform the window it no longer being resized">
  615. Inform the window that it is no longer being resized. The window manager
  616. should use this request to inform windows that are the target of an
  617. interactive resize that the interactive resize has ended for example.
  618. This request modifies window management state and may only be made as
  619. part of a manage sequence, see the river_window_manager_v1 description.
  620. </description>
  621. </request>
  622. <enum name="capabilities" bitfield="true">
  623. <entry name="window_menu" value="1"/>
  624. <entry name="maximize" value="2"/>
  625. <entry name="fullscreen" value="4"/>
  626. <entry name="minimize" value="8"/>
  627. </enum>
  628. <request name="set_capabilities">
  629. <description summary="inform window of supported capabilities">
  630. This request informs the window of the capabilities supported by the
  631. window manager. If the window manager, for example, ignores requests to
  632. be maximized from the window it should not tell the window that it
  633. supports the maximize capability.
  634. The window might use this information to, for example, only show a
  635. maximize button if the window manager supports the maximize capability.
  636. The window manager client should use this request to set capabilities
  637. for all new windows. If this request is never made, the compositor will
  638. inform windows that all capabilities are supported.
  639. This request modifies window management state and may only be made as
  640. part of a manage sequence, see the river_window_manager_v1 description.
  641. </description>
  642. <arg name="caps" type="uint" enum="capabilities"
  643. summary="supported capabilities"/>
  644. </request>
  645. <event name="show_window_menu_requested">
  646. <description summary="window requested that the window menu be shown">
  647. The xdg-shell protocol for example allows windows to request that a
  648. window menu be shown, for example when the user right clicks on client
  649. side window decorations.
  650. A window menu might include options to maximize or minimize the window.
  651. The window manager is free to ignore this request and decide what the
  652. window menu contains if it does choose to show one.
  653. The x and y arguments indicate where the window requested that the
  654. window menu be shown.
  655. This event will be followed by a manage_start event after all other new
  656. state has been sent by the server.
  657. </description>
  658. <arg name="x" type="int" summary="x offset from top left corner"/>
  659. <arg name="y" type="int" summary="y offset from top left corner"/>
  660. </event>
  661. <event name="maximize_requested">
  662. <description summary="the window requested to be maximized">
  663. The xdg-shell protocol for example allows windows to request to be
  664. maximized.
  665. The window manager is free to honor this request using
  666. river_window_v1.inform_maximized or ignore it.
  667. This event will be followed by a manage_start event after all other new
  668. state has been sent by the server.
  669. </description>
  670. </event>
  671. <event name="unmaximize_requested">
  672. <description summary="the window requested to be unmaximized">
  673. The xdg-shell protocol for example allows windows to request to be
  674. unmaximized.
  675. The window manager is free to honor this request using
  676. river_window_v1.inform_unmaximized or ignore it.
  677. This event will be followed by a manage_start event after all other new
  678. state has been sent by the server.
  679. </description>
  680. </event>
  681. <request name="inform_maximized">
  682. <description summary="inform the window that it is maximized">
  683. Inform the window that it is maximized. The window might use this
  684. information to adapt the style of its client-side window decorations for
  685. example.
  686. The window manager remains responsible for handling the position and
  687. dimensions of the window while it is maximized.
  688. This request modifies window management state and may only be made as
  689. part of a manage sequence, see the river_window_manager_v1 description.
  690. </description>
  691. </request>
  692. <request name="inform_unmaximized">
  693. <description summary="inform the window that it is unmaximized">
  694. Inform the window that it is unmaximized. The window might use this
  695. information to adapt the style of its client-side window decorations for
  696. example.
  697. This request modifies window management state and may only be made as
  698. part of a manage sequence, see the river_window_manager_v1 description.
  699. </description>
  700. </request>
  701. <event name="fullscreen_requested">
  702. <description summary="the window requested to be fullscreen">
  703. The xdg-shell protocol for example allows windows to request that they
  704. be made fullscreen and allows them to provide an optional output hint.
  705. If the output argument is null, the window has no preference and the
  706. window manager should choose an output.
  707. The window manager is free to honor this request using
  708. river_window_v1.fullscreen or ignore it.
  709. This event will be followed by a manage_start event after all other new
  710. state has been sent by the server.
  711. </description>
  712. <arg name="output" type="object" allow-null="true"
  713. interface="river_output_v1" summary="fullscreen output requested"/>
  714. </event>
  715. <event name="exit_fullscreen_requested">
  716. <description summary="the window requested to exit fullscreen">
  717. The xdg-shell protocol for example allows windows to request to exit
  718. fullscreen.
  719. The window manager is free to honor this request using
  720. river_window_v1.exit_fullscreen or ignore it.
  721. This event will be followed by a manage_start event after all other new
  722. state has been sent by the server.
  723. </description>
  724. </event>
  725. <request name="inform_fullscreen">
  726. <description summary="inform the window that it is fullscreen">
  727. Inform the window that it is fullscreen. The window might use this
  728. information to adapt the style of its client-side window decorations for
  729. example.
  730. This request does not affect the size/position of the window or cause it
  731. to become the only window rendered, see the river_window_v1.fullscreen
  732. and exit_fullscreen requests for that.
  733. This request modifies window management state and may only be made as
  734. part of a manage sequence, see the river_window_manager_v1 description.
  735. </description>
  736. </request>
  737. <request name="inform_not_fullscreen">
  738. <description summary="inform the window that it is not fullscreen">
  739. Inform the window that it is not fullscreen. The window might use this
  740. information to adapt the style of its client-side window decorations for
  741. example.
  742. This request does not affect the size/position of the window or cause it
  743. to become the only window rendered, see the river_window_v1.fullscreen
  744. and exit_fullscreen requests for that.
  745. This request modifies window management state and may only be made as
  746. part of a manage sequence, see the river_window_manager_v1 description.
  747. </description>
  748. </request>
  749. <request name="fullscreen">
  750. <description summary="make the window fullscreen">
  751. Make the window fullscreen on the given output. If multiple windows are
  752. fullscreen on the same output at the same time only the "top" window in
  753. rendering order shall be displayed.
  754. All river_shell_surface_v1 objects above the top fullscreen window in
  755. the rendering order will continue to be rendered.
  756. The compositor will handle the position and dimensions of the window
  757. while it is fullscreen. The set_position and propose_dimensions requests
  758. shall not affect the current position and dimensions of a fullscreen
  759. window.
  760. When a fullscreen request is made, the server must send a dimensions
  761. event in response as soon as possible. It may not be possible to send a
  762. dimensions event in the very next render sequence if, for example, the
  763. window takes too long to respond. In this case, the server will send the
  764. dimensions event in a future render sequence.
  765. The compositor will clip window content, decoration surfaces, and
  766. borders to the given output's dimensions while the window is fullscreen.
  767. The effects of set_clip_box and set_content_clip_box are ignored while
  768. the window is fullscreen.
  769. If the output on which a window is currently fullscreen is removed, the
  770. windowing state is modified as if there were an exit_fullscreen request
  771. made in the same manage sequence as the river_output_v1.removed event.
  772. This request does not inform the window that it is fullscreen, see the
  773. river_window_v1.inform_fullscreen and inform_not_fullscreen requests.
  774. This request modifies window management state and may only be made as
  775. part of a manage sequence, see the river_window_manager_v1 description.
  776. </description>
  777. <arg name="output" type="object" interface="river_output_v1"
  778. summary="fullscreen output"/>
  779. </request>
  780. <request name="exit_fullscreen">
  781. <description summary="make the window not fullscreen">
  782. Make the window not fullscreen.
  783. The position and dimensions are undefined after this request is made
  784. until a manage sequence in which the window manager makes the
  785. propose_dimensions and set_position requests is completed.
  786. The window manager should make propose_dimensions and set_position
  787. requests in the same manage sequence as the exit_fullscreen request for
  788. frame perfection.
  789. This request does not inform the window that it is fullscreen, see the
  790. river_window_v1.inform_fullscreen and inform_not_fullscreen requests.
  791. This request modifies window management state and may only be made as
  792. part of a manage sequence, see the river_window_manager_v1 description.
  793. </description>
  794. </request>
  795. <event name="minimize_requested">
  796. <description summary="the window requested to be minimized">
  797. The xdg-shell protocol for example allows windows to request to be
  798. minimized.
  799. The window manager is free to ignore this request, hide the window, or
  800. do whatever else it chooses.
  801. This event will be followed by a manage_start event after all other new
  802. state has been sent by the server.
  803. </description>
  804. </event>
  805. <request name="set_clip_box" since="2">
  806. <description summary="clip the window to a given box">
  807. Clip the window, including borders and decoration surfaces, to the box
  808. specified by the x, y, width, and height arguments. The x/y position of
  809. the box is relative to the top left corner of the window.
  810. The width and height arguments must be greater than or equal to 0.
  811. Setting a clip box with 0 width or height disables clipping.
  812. The clip box is ignored while the window is fullscreen.
  813. Both set_clip_box and set_content_clip_box may be enabled simultaneously.
  814. This request modifies rendering state and may only be made as part of a
  815. render sequence, see the river_window_manager_v1 description.
  816. </description>
  817. <arg name="x" type="int" summary="x relative to top left window corner"/>
  818. <arg name="y" type="int" summary="y relative to top left window corner"/>
  819. <arg name="width" type="int" summary="clip box width"/>
  820. <arg name="height" type="int" summary="clip box height"/>
  821. </request>
  822. <event name="unreliable_pid" since="2">
  823. <description summary="unreliable PID of the window's creator">
  824. This event gives an unreliable PID of the process that created the
  825. window. Obtaining this information is inherently racy due to PID reuse.
  826. Therefore, this PID must not be used for anything security sensitive.
  827. Note also that a single process may create multiple windows, so there is
  828. not necessarily a 1-to-1 mapping from PID to window. Multiple windows
  829. may have the same PID.
  830. This event is sent once when the river_window_v1 is created and never
  831. sent again.
  832. </description>
  833. <arg name="unreliable_pid" type="int" summary="unreliable PID"/>
  834. </event>
  835. <request name="set_content_clip_box" since="3">
  836. <description summary="clip the window content to a given box">
  837. Clip the content of the window, excluding borders and decoration
  838. surfaces, to the box specified by the x, y, width, and height arguments.
  839. The x/y position of the box is relative to the top left corner of the
  840. window.
  841. Borders drawn by the compositor (see set_borders) are placed around the
  842. intersection of the window content (as defined by the dimensions event)
  843. and the content clip box when content clipping is enabled.
  844. The width and height arguments must be greater than or equal to 0.
  845. Setting a box with 0 width or height disables content clipping.
  846. The content clip box is ignored while the window is fullscreen.
  847. Both set_clip_box and set_content_clip_box may be enabled simultaneously.
  848. This request modifies rendering state and may only be made as part of a
  849. render sequence, see the river_window_manager_v1 description.
  850. </description>
  851. <arg name="x" type="int" summary="x relative to top left window corner"/>
  852. <arg name="y" type="int" summary="y relative to top left window corner"/>
  853. <arg name="width" type="int" summary="clip box width"/>
  854. <arg name="height" type="int" summary="clip box height"/>
  855. </request>
  856. <event name="presentation_hint" since="4">
  857. <description summary="presentation hint set by the window">
  858. This event communicates the window's preferred presentation mode.
  859. This event will be followed by a render_start event after all other new
  860. state has been sent by the server.
  861. </description>
  862. <arg name="hint" type="uint" enum="river_output_v1.presentation_mode"
  863. summary="presentation hint"/>
  864. </event>
  865. <event name="identifier" since="4">
  866. <description summary="unique window identifier">
  867. The identifier is a string that contains up to 32 printable ASCII bytes.
  868. The identifier must not be an empty string.
  869. It is compositor policy how the identifier is generated, but the following
  870. properties must be upheld:
  871. 1. The identifier must uniquely identify the window. Two windows must not
  872. share the same identifier.
  873. 2. The identifier must not be reused. This avoids races around window
  874. creation/destruction when identifiers are used in out-of-band IPC.
  875. If the compositor implements the ext-foreign-toplevel-list-v1 protocol,
  876. the river_window_v1.identifier event must match the corresponding
  877. ext_foreign_toplevel_handle_v1.identifier event.
  878. This event is sent once when the river_window_v1 is created and never
  879. sent again.
  880. </description>
  881. <arg name="identifier" type="string" summary="unique identifier"/>
  882. </event>
  883. <request name="set_dimension_bounds" since="4">
  884. <description summary="recommend maximum dimensions to the window">
  885. Recommend that the window keep its dimensions within a given
  886. maximum width/height. This recommendation is only a hint and the window
  887. may ignore it.
  888. Setting the width and height to 0 indicates that there are no bounds
  889. and is equivalent to having never made this request.
  890. Setting width or height to a negative value is a protocol error.
  891. The server should communicate this hint to an xdg_toplevel window with
  892. the xdg_toplevel.configure_bounds event for example.
  893. This request modifies window management state and may only be made as
  894. part of a manage sequence, see the river_window_manager_v1 description.
  895. </description>
  896. <arg name="max_width" type="int" summary="maximum width"/>
  897. <arg name="max_height" type="int" summary="maximum height"/>
  898. </request>
  899. <event name="capture_sessions" since="5">
  900. <description summary="window screen capture sessions">
  901. This event informs the window manager of the number of active screen
  902. capture sessions for the window.
  903. This event is sent once when the river_window_v1 is created and again
  904. whenever the number of capture sessions changes.
  905. This event will be followed by a manage_start event after all other new
  906. state has been sent by the server.
  907. </description>
  908. <arg name="count" type="uint" summary="count of screen capture sessions"/>
  909. </event>
  910. </interface>
  911. <interface name="river_decoration_v1" version="5">
  912. <description summary="a window decoration">
  913. The rendering order of windows with decorations is follows:
  914. 1. Decorations created with get_decoration_below at the bottom
  915. 2. Window content
  916. 3. Borders configured with river_window_v1.set_borders
  917. 4. Decorations created with get_decoration_above at the top
  918. The relative ordering of decoration surfaces above/below a window is
  919. undefined by this protocol and left up to the compositor.
  920. </description>
  921. <enum name="error">
  922. <entry name="no_commit" value="0"
  923. summary="failed to commit the surface before the window manager commit"/>
  924. </enum>
  925. <request name="destroy" type="destructor">
  926. <description summary="destroy the decoration object">
  927. This request indicates that the client will no longer use the decoration
  928. object and that it may be safely destroyed.
  929. </description>
  930. </request>
  931. <request name="set_offset">
  932. <description summary="set offset from the window's top left corner">
  933. This request sets the offset of the decoration surface from the top left
  934. corner of the window.
  935. If this request is never sent, the x and y offsets are undefined by this
  936. protocol and left up to the compositor.
  937. This request modifies rendering state and may only be made as part of a
  938. render sequence, see the river_window_manager_v1 description.
  939. </description>
  940. <arg name="x" type="int" summary="x relative to top left window corner"/>
  941. <arg name="y" type="int" summary="y relative to top left window corner"/>
  942. </request>
  943. <request name="sync_next_commit">
  944. <description summary="sync next commit with other rendering state">
  945. Synchronize application of the next wl_surface.commit request on the
  946. decoration surface with rest of the state atomically applied with the
  947. next river_window_manager_v1.render_finish request.
  948. The client must make a wl_surface.commit request on the decoration
  949. surface after this request and before the render_finish request, failure
  950. to do so is a protocol error.
  951. This request modifies rendering state and may only be made as part of a
  952. render sequence, see the river_window_manager_v1 description.
  953. </description>
  954. </request>
  955. </interface>
  956. <interface name="river_shell_surface_v1" version="5">
  957. <description summary="a surface for window manager UI">
  958. The window manager might use a shell surface to display a status bar,
  959. background image, desktop notifications, launcher, desktop menu, or
  960. whatever else it wants.
  961. </description>
  962. <enum name="error">
  963. <entry name="node_exists" value="0"
  964. summary="shell surface already has a node object"/>
  965. <entry name="no_commit" value="1"
  966. summary="failed to commit the surface before the window manager commit"/>
  967. </enum>
  968. <request name="destroy" type="destructor">
  969. <description summary="destroy the shell surface object">
  970. This request indicates that the client will no longer use the shell
  971. surface object and that it may be safely destroyed.
  972. </description>
  973. </request>
  974. <request name="get_node">
  975. <description summary="get the shell surface's render list node">
  976. Get the node in the render list corresponding to the shell surface.
  977. It is a protocol error to make this request more than once for a single
  978. shell surface.
  979. </description>
  980. <arg name="id" type="new_id" interface="river_node_v1" summary="new node"/>
  981. </request>
  982. <request name="sync_next_commit">
  983. <description summary="sync next surface commit to window manager commit">
  984. Synchronize application of the next wl_surface.commit request on the
  985. shell surface with rest of the rendering state atomically applied with
  986. the next river_window_manager_v1.render_finish request.
  987. The client must make a wl_surface.commit request on the shell surface
  988. after this request and before the render_finish request, failure to do
  989. so is a protocol error.
  990. This request modifies rendering state and may only be made as part of a
  991. render sequence, see the river_window_manager_v1 description.
  992. </description>
  993. </request>
  994. </interface>
  995. <interface name="river_node_v1" version="5">
  996. <description summary="a node in the render list">
  997. The render list is a list of nodes that determines the rendering order of
  998. the compositor. Nodes may correspond to windows or shell surfaces. The
  999. relative ordering of nodes may be changed with the place_above and
  1000. place_below requests, changing the rendering order.
  1001. The initial position of a node in the render list is undefined, the window
  1002. manager client must use the place_above or place_below request to
  1003. guarantee a specific rendering order.
  1004. </description>
  1005. <request name="destroy" type="destructor">
  1006. <description summary="destroy the decoration object">
  1007. This request indicates that the client will no longer use the node
  1008. object and that it may be safely destroyed.
  1009. </description>
  1010. </request>
  1011. <request name="set_position">
  1012. <description summary="set absolute position of the node">
  1013. Set the absolute position of the node in the compositor's logical
  1014. coordinate space. The x and y coordinates may be positive or negative.
  1015. Note that the position of a river_window_v1 refers to the position of
  1016. the window content and is unaffected by the presence of borders or
  1017. decoration surfaces.
  1018. If this request is never sent, the position of the node is undefined by
  1019. this protocol and left up to the compositor.
  1020. This request modifies rendering state and may only be made as part of a
  1021. render sequence, see the river_window_manager_v1 description.
  1022. </description>
  1023. <arg name="x" type="int" summary="global x coordinate"/>
  1024. <arg name="y" type="int" summary="global y coordinate"/>
  1025. </request>
  1026. <request name="place_top">
  1027. <description summary="place node above all other nodes">
  1028. This request places the node above all other nodes in the compositor's
  1029. render list.
  1030. This request modifies rendering state and may only be made as part of a
  1031. render sequence, see the river_window_manager_v1 description.
  1032. </description>
  1033. </request>
  1034. <request name="place_bottom">
  1035. <description summary="place node below all other nodes">
  1036. This request places the node below all other nodes in the compositor's
  1037. render list.
  1038. This request modifies rendering state and may only be made as part of a
  1039. render sequence, see the river_window_manager_v1 description.
  1040. </description>
  1041. </request>
  1042. <request name="place_above">
  1043. <description summary="place node above another node">
  1044. This request places the node directly above another node in the
  1045. compositor's render list.
  1046. Attempting to place a node above itself has no effect.
  1047. Given nodes A, B, C currently rendered in that order with C on top
  1048. and A on the bottom, the following example demonstrates the behavior
  1049. of this request and the meaning of "directly above":
  1050. 1. A.place_above(C) -> B, C, A
  1051. 2. A.place_above(B) -> B, A, C
  1052. 3. B.place_above(A) -> A, B, C
  1053. This request modifies rendering state and may only be made as part of a
  1054. render sequence, see the river_window_manager_v1 description.
  1055. </description>
  1056. <arg name="other" type="object" interface="river_node_v1"
  1057. summary="other node"/>
  1058. </request>
  1059. <request name="place_below">
  1060. <description summary="place node below another node">
  1061. This request places the node directly below another node in the
  1062. compositor's render list.
  1063. Attempting to place a node below itself has no effect.
  1064. Given nodes A, B, C currently rendered in that order with C on top
  1065. and A on the bottom, the following example demonstrates the behavior
  1066. of this request and the meaning of "directly below":
  1067. 1. C.place_below(A) -> C, A, B
  1068. 2. C.place_below(B) -> A, C, B
  1069. 3. B.place_below(C) -> A, B, C
  1070. This request modifies rendering state and may only be made as part of a
  1071. render sequence, see the river_window_manager_v1 description.
  1072. </description>
  1073. <arg name="other" type="object" interface="river_node_v1"
  1074. summary="other node"/>
  1075. </request>
  1076. </interface>
  1077. <interface name="river_output_v1" version="5">
  1078. <description summary="a logical output">
  1079. An area in the compositor's logical coordinate space that should be
  1080. treated as a single output for window management purposes. This area may
  1081. correspond to a single physical output or multiple physical outputs in the
  1082. case of mirroring or tiled monitors depending on the hardware and
  1083. compositor configuration.
  1084. </description>
  1085. <request name="destroy" type="destructor">
  1086. <description summary="destroy the output object">
  1087. This request indicates that the client will no longer use the output
  1088. object and that it may be safely destroyed.
  1089. This request should be made after the river_output_v1.removed event is
  1090. received to complete destruction of the output.
  1091. </description>
  1092. </request>
  1093. <event name="removed">
  1094. <description summary="the output is removed">
  1095. This event indicates that the logical output is no longer conceptually
  1096. part of window management space.
  1097. The server will send no further events on this object and ignore any
  1098. request (other than river_output_v1.destroy) made after this event is
  1099. sent. The client should destroy this object with the
  1100. river_output_v1.destroy request to free up resources.
  1101. This event may be sent because a corresponding physical output has been
  1102. physically unplugged or because some output configuration has changed.
  1103. This event will be followed by a manage_start event after all other new
  1104. state has been sent by the server.
  1105. </description>
  1106. </event>
  1107. <event name="wl_output">
  1108. <description summary="corresponding wl_output">
  1109. The wl_output object corresponding to the river_output_v1. The argument
  1110. is the global name of the wl_output advertised with wl_registry.global.
  1111. It is guaranteed that the corresponding wl_output is advertised before
  1112. this event is sent.
  1113. This event is sent exactly once. The wl_output associated with a
  1114. river_output_v1 cannot change. It is guaranteed that there is a 1-to-1
  1115. mapping between wl_output and river_output_v1 objects.
  1116. The global_remove event for the corresponding wl_output may be sent
  1117. before the river_output_v1.removed event. This is due to the fact that
  1118. river_output_v1 state changes are synced to the river window management
  1119. manage sequence while changes to globals are not.
  1120. Rationale: The window manager may need information provided by the
  1121. wl_output interface such as the name/description. It also may need the
  1122. wl_output object to start screencopy for example.
  1123. </description>
  1124. <arg name="name" type="uint" summary="name of the wl_output global"/>
  1125. </event>
  1126. <event name="position">
  1127. <description summary="output position">
  1128. This event indicates the position of the output in the compositor's
  1129. logical coordinate space. The x and y coordinates may be positive or
  1130. negative.
  1131. This event is sent once when the river_output_v1 is created and again
  1132. whenever the position changes.
  1133. This event will be followed by a manage_start event after all other new
  1134. state has been sent by the server.
  1135. The server must guarantee that the position and dimensions events do not
  1136. cause the areas of multiple logical outputs to overlap when the
  1137. corresponding manage_start event is received.
  1138. </description>
  1139. <arg name="x" type="int" summary="global x coordinate"/>
  1140. <arg name="y" type="int" summary="global y coordinate"/>
  1141. </event>
  1142. <event name="dimensions">
  1143. <description summary="output dimensions">
  1144. This event indicates the dimensions of the output in the compositor's
  1145. logical coordinate space. The width and height will always be strictly
  1146. greater than zero.
  1147. This event is sent once when the river_output_v1 is created and again
  1148. whenever the dimensions change.
  1149. This event will be followed by a manage_start event after all other new
  1150. state has been sent by the server.
  1151. The server must guarantee that the position and dimensions events do not
  1152. cause the areas of multiple logical outputs to overlap when the
  1153. corresponding manage_start event is received.
  1154. </description>
  1155. <arg name="width" type="int" summary="output width"/>
  1156. <arg name="height" type="int" summary="output height"/>
  1157. </event>
  1158. <enum name="error" since="4">
  1159. <entry name="invalid_presentation_mode" value="0" since="4"
  1160. summary="invalid presentation mode enum value"/>
  1161. </enum>
  1162. <enum name="presentation_mode" since="4">
  1163. <entry name="vsync" value="0">
  1164. <description summary="tearing-free presentation">
  1165. Output page-flips should be synchronized to the vertical blanking
  1166. period, eliminating tearing. This is the default presentation mode.
  1167. </description>
  1168. </entry>
  1169. <entry name="async" value="1">
  1170. <description summary="asynchronous presentation">
  1171. Output page-flips should not be synchronized to the vertical blanking
  1172. period, visual screen tearing may occur.
  1173. </description>
  1174. </entry>
  1175. </enum>
  1176. <request name="set_presentation_mode" since="4">
  1177. <description summary="set the preferred presentation mode">
  1178. Set the preferred presentation mode of the output. The compositor should
  1179. always respect the preference of the window manager if possible. If this
  1180. request is never made, the preferred presentation mode is vsync.
  1181. This request modifies rendering state and may only be made as part of a
  1182. render sequence, see the river_window_manager_v1 description.
  1183. </description>
  1184. <arg name="mode" type="uint" enum="presentation_mode"
  1185. summary="preferred presentation mode"/>
  1186. </request>
  1187. <event name="capture_sessions" since="5">
  1188. <description summary="output screen capture sessions">
  1189. This event informs the window manager of the number of active screen
  1190. capture sessions for the output.
  1191. This event is sent once when the river_output_v1 is created and again
  1192. whenever the number of capture sessions changes.
  1193. This event will be followed by a manage_start event after all other new
  1194. state has been sent by the server.
  1195. </description>
  1196. <arg name="count" type="uint" summary="count of screen capture sessions"/>
  1197. </event>
  1198. </interface>
  1199. <interface name="river_seat_v1" version="5">
  1200. <description summary="a window management seat">
  1201. This object represents a single user's collection of input devices. It
  1202. allows the window manager to route keyboard input to windows, get
  1203. high-level information about pointer input, define pointer bindings, etc.
  1204. For keyboard bindings, see the river-xkb-bindings-v1 protocol.
  1205. Since version 4: The cursor surface/shape set by the window manager on the
  1206. wl_pointer of this seat is used when no client has pointer focus, for
  1207. example during a pointer operation. Since the window manager is allowed to
  1208. set cursor surface/shape even when it does not have pointer focus, the
  1209. compositor must ignore the serial argument of wl_pointer.set_cursor and
  1210. wp_cursor_shape_device_v1.set_shape requests made by the window manager.
  1211. The most recent cursor surface/shape set by the window manager is
  1212. remembered by the compositor and restored whenever no client has pointer
  1213. focus. If the window manager never sets a cursor surface/shape, the
  1214. "default" shape is used.
  1215. </description>
  1216. <request name="destroy" type="destructor">
  1217. <description summary="destroy the seat object">
  1218. This request indicates that the client will no longer use the seat
  1219. object and that it may be safely destroyed.
  1220. This request should be made after the river_seat_v1.removed event is
  1221. received to complete destruction of the seat.
  1222. </description>
  1223. </request>
  1224. <event name="removed">
  1225. <description summary="the seat is removed">
  1226. This event indicates that seat is no longer in use and should be
  1227. destroyed.
  1228. The server will send no further events on this object and ignore any
  1229. request (other than river_seat_v1.destroy) made after this event is
  1230. sent. The client should destroy this object with the
  1231. river_seat_v1.destroy request to free up resources.
  1232. This event will be followed by a manage_start event after all other new
  1233. state has been sent by the server.
  1234. </description>
  1235. </event>
  1236. <event name="wl_seat">
  1237. <description summary="corresponding wl_seat">
  1238. The wl_seat object corresponding to the river_seat_v1. The argument is
  1239. the global name of the wl_seat advertised with wl_registry.global.
  1240. It is guaranteed that the corresponding wl_seat is advertised before
  1241. this event is sent.
  1242. This event is sent exactly once. The wl_seat associated with a
  1243. river_seat_v1 cannot change. It is guaranteed that there is a 1-to-1
  1244. mapping between wl_seat and river_seat_v1 objects.
  1245. The global_remove event for the corresponding wl_seat may be sent before
  1246. the river_seat_v1.removed event. This is due to the fact that
  1247. river_seat_v1 state changes are synced to the river window management
  1248. manage sequence while changes to globals are not.
  1249. Rationale: The window manager may want to trigger window management
  1250. state changes based on normal input events received by its shell
  1251. surfaces for example.
  1252. </description>
  1253. <arg name="name" type="uint" summary="name of the wl_seat global"/>
  1254. </event>
  1255. <request name="focus_window">
  1256. <description summary="give keyboard focus to a window">
  1257. Request that the compositor send keyboard input to the given window.
  1258. This request modifies window management state and may only be made as
  1259. part of a manage sequence, see the river_window_manager_v1 description.
  1260. </description>
  1261. <arg name="window" type="object" interface="river_window_v1"
  1262. summary="window to focus"/>
  1263. </request>
  1264. <request name="focus_shell_surface">
  1265. <description summary="give keyboard focus to a shell_surface">
  1266. Request that the compositor send keyboard input to the given shell
  1267. surface.
  1268. This request modifies window management state and may only be made as
  1269. part of a manage sequence, see the river_window_manager_v1 description.
  1270. </description>
  1271. <arg name="shell_surface" type="object" interface="river_shell_surface_v1"
  1272. summary="shell surface to focus"/>
  1273. </request>
  1274. <request name="clear_focus">
  1275. <description summary="clear keyboard focus">
  1276. Request that the compositor not send keyboard input to any client.
  1277. This request modifies window management state and may only be made as
  1278. part of a manage sequence, see the river_window_manager_v1 description.
  1279. </description>
  1280. </request>
  1281. <event name="pointer_enter">
  1282. <description summary="pointer entered a window">
  1283. The seat's pointer entered the given window's area.
  1284. The area of a window is defined to include the area defined by the
  1285. window dimensions, borders configured using river_window_v1.set_borders,
  1286. and the input regions of decoration surfaces. In particular, it does not
  1287. include input regions of surfaces belonging to the window that extend
  1288. outside the window dimensions.
  1289. The pointer of a seat may only enter a single window at a time. When the
  1290. pointer moves between windows, the pointer_leave event for the old
  1291. window must be sent before the pointer_enter event for the new window.
  1292. This event will be followed by a manage_start event after all other new
  1293. state has been sent by the server.
  1294. </description>
  1295. <arg name="window" type="object" interface="river_window_v1"
  1296. summary="window entered"/>
  1297. </event>
  1298. <event name="pointer_leave">
  1299. <description summary="pointer left the entered window">
  1300. The seat's pointer left the window for which pointer_enter was most
  1301. recently sent. See pointer_enter for details.
  1302. This event will be followed by a manage_start event after all other new
  1303. state has been sent by the server.
  1304. </description>
  1305. </event>
  1306. <event name="window_interaction">
  1307. <description summary="a window has been interacted with">
  1308. A window has been interacted with beyond the pointer merely passing over
  1309. it. This event might be sent due to a pointer button press or due to a
  1310. touch/tablet tool interaction with the window.
  1311. There are no guarantees regarding how this event is sent in relation to
  1312. the pointer_enter and pointer_leave events as the interaction may use
  1313. touch or tablet tool input.
  1314. Rationale: this event gives window managers necessary information to
  1315. determine when to send keyboard focus, raise a window that already has
  1316. keyboard focus, etc. Rather than expose all pointer, touch, and tablet
  1317. events to window managers, a policy over mechanism approach is taken.
  1318. This event will be followed by a manage_start event after all other new
  1319. state has been sent by the server.
  1320. </description>
  1321. <arg name="window" type="object" interface="river_window_v1"
  1322. summary="window interacted with"/>
  1323. </event>
  1324. <event name="shell_surface_interaction">
  1325. <description summary="a shell surface has been interacted with">
  1326. A shell surface has been interacted with beyond the pointer merely
  1327. passing over it. This event might be sent due to a pointer button press
  1328. or due to a touch/tablet tool interaction with the shell_surface.
  1329. There are no guarantees regarding how this event is sent in relation to
  1330. the pointer_enter and pointer_leave events as the interaction may use
  1331. touch or tablet tool input.
  1332. Rationale: While the shell surface does receive all wl_pointer,
  1333. wl_touch, etc. input events for the surface directly, these events do
  1334. not necessarily trigger a manage sequence and therefore do not allow the
  1335. window manager to update focus or perform other actions in response to
  1336. the input in a race-free way.
  1337. This event will be followed by a manage_start event after all other new
  1338. state has been sent by the server.
  1339. </description>
  1340. <arg name="shell_surface" type="object" interface="river_shell_surface_v1"
  1341. summary="shell surface interacted with"/>
  1342. </event>
  1343. <request name="op_start_pointer">
  1344. <description summary="start an interactive pointer operation">
  1345. Start an interactive pointer operation. During the operation, op_delta
  1346. events will be sent based on pointer input.
  1347. When all pointer buttons are released, the op_release event is sent.
  1348. The pointer operation continues until the op_end request is made during
  1349. a manage sequence and that manage sequence is finished.
  1350. The window manager may use this operation to implement interactive
  1351. move/resize of windows by setting the position of windows and proposing
  1352. dimensions based off of the op_delta events.
  1353. This request is ignored if an operation is already in progress.
  1354. The compositor must ensure that no client has pointer focus from this
  1355. seat during the pointer operation. This means that the window manager
  1356. has control over the pointer's cursor surface/shape during the pointer
  1357. operation. See the river_seat_v1 description.
  1358. This request modifies window management state and may only be made as
  1359. part of a manage sequence, see the river_window_manager_v1 description.
  1360. </description>
  1361. </request>
  1362. <event name="op_delta">
  1363. <description summary="total cumulative motion since op start">
  1364. This event indicates the total change in position since the start of the
  1365. operation of the pointer/touch point/etc.
  1366. This event will be followed by a manage_start event after all other new
  1367. state has been sent by the server.
  1368. </description>
  1369. <arg name="dx" type="int" summary="total change in x"/>
  1370. <arg name="dy" type="int" summary="total change in y"/>
  1371. </event>
  1372. <event name="op_release">
  1373. <description summary="operation input has been released">
  1374. The input driving the current interactive operation has been released.
  1375. For a pointer op for example, all pointer buttons have been released.
  1376. Depending on the op type, op_delta events may continue to be sent until
  1377. the op is ended with the op_end request.
  1378. This event is sent at most once during an interactive operation.
  1379. This event will be followed by a manage_start event after all other new
  1380. state has been sent by the server.
  1381. </description>
  1382. </event>
  1383. <request name="op_end">
  1384. <description summary="end an interactive operation">
  1385. End an interactive operation.
  1386. This request is ignored if there is no operation in progress.
  1387. This request modifies window management state and may only be made as
  1388. part of a manage sequence, see the river_window_manager_v1 description.
  1389. </description>
  1390. </request>
  1391. <enum name="modifiers" bitfield="true">
  1392. <description summary="a set of keyboard modifiers">
  1393. This enum is used to describe the keyboard modifiers that must be held
  1394. down to trigger a key binding or pointer binding.
  1395. Note that river and wlroots use the values 2 and 16 for capslock and
  1396. numlock internally. It doesn't make sense to use locked modifiers for
  1397. bindings however so these values are not included in this enum.
  1398. </description>
  1399. <entry name="none" value="0"/>
  1400. <entry name="shift" value="1"/>
  1401. <entry name="ctrl" value="4"/>
  1402. <entry name="mod1" value="8" summary="commonly called alt"/>
  1403. <entry name="mod3" value="32"/>
  1404. <entry name="mod4" value="64" summary="commonly called super or logo"/>
  1405. <entry name="mod5" value="128"/>
  1406. </enum>
  1407. <request name="get_pointer_binding">
  1408. <description summary="define a new pointer binding">
  1409. Define a pointer binding in terms of a pointer button, keyboard
  1410. modifiers, and other configurable properties.
  1411. The button argument is a Linux input event code defined in the
  1412. linux/input-event-codes.h header file (e.g. BTN_RIGHT).
  1413. The new pointer binding is not enabled until initial configuration is
  1414. completed and the enable request is made during a manage sequence.
  1415. </description>
  1416. <arg name="id" type="new_id" interface="river_pointer_binding_v1"
  1417. summary="new pointer binding"/>
  1418. <arg name="button" type="uint" summary="a Linux input event code"/>
  1419. <arg name="modifiers" type="uint" enum="modifiers"
  1420. summary="keyboard modifiers"/>
  1421. </request>
  1422. <request name="set_xcursor_theme" since="2">
  1423. <description summary="set the xcursor theme for the seat">
  1424. Set the XCursor theme for the seat. This theme is used for cursors
  1425. rendered by the compositor, but not necessarily for cursors rendered by
  1426. clients.
  1427. Note: The window manager may also wish to set the XCURSOR_THEME and
  1428. XCURSOR_SIZE environment variable for programs it starts.
  1429. </description>
  1430. <arg name="name" type="string" summary="xcursor theme name"/>
  1431. <arg name="size" type="uint" summary="cursor size"/>
  1432. </request>
  1433. <event name="pointer_position" since="2">
  1434. <description summary="The current position of the pointer">
  1435. The current position of the pointer in the compositor's logical
  1436. coordinate space.
  1437. This state is special in that a change in pointer position alone must
  1438. not cause the compositor to start a manage sequence.
  1439. Assuming the seat has a pointer, this event must be sent in every manage
  1440. sequence unless there is no change in x/y position since the last time this
  1441. event was sent.
  1442. </description>
  1443. <arg name="x" type="int" summary="global x coordinate"/>
  1444. <arg name="y" type="int" summary="global y coordinate"/>
  1445. </event>
  1446. <request name="pointer_warp" since="3">
  1447. <description summary="warp the pointer to a given position">
  1448. Warp the pointer to the given position in the compositor's logical
  1449. coordinate space.
  1450. If the given position is outside the bounds of all outputs, the pointer
  1451. will be warped to the closest point inside an output instead.
  1452. If an op_start_pointer request is made during the same manage sequence
  1453. as a pointer_warp request, the warp is applied first by the server
  1454. regardless of the relative ordering of the two requests.
  1455. This request modifies window management state and may only be made as
  1456. part of a manage sequence, see the river_window_manager_v1 description.
  1457. </description>
  1458. <arg name="x" type="int" summary="global x coordinate"/>
  1459. <arg name="y" type="int" summary="global y coordinate"/>
  1460. </request>
  1461. </interface>
  1462. <interface name="river_pointer_binding_v1" version="5">
  1463. <description summary="configure a pointer binding, receive trigger events">
  1464. This object allows the window manager to configure a pointer binding and
  1465. receive events when the binding is triggered.
  1466. The new pointer binding is not enabled until the enable request is made
  1467. during a manage sequence.
  1468. Normally, all pointer button events are sent to the surface with pointer
  1469. focus by the compositor. Pointer button events that trigger a pointer
  1470. binding are not sent to the surface with pointer focus.
  1471. If multiple pointer bindings would be triggered by a single physical
  1472. pointer event on the compositor side, it is compositor policy which
  1473. pointer binding(s) will receive press/release events or if all of the
  1474. matched pointer bindings receive press/release events.
  1475. </description>
  1476. <request name="destroy" type="destructor">
  1477. <description summary="destroy the pointer binding object">
  1478. This request indicates that the client will no longer use the pointer
  1479. binding object and that it may be safely destroyed.
  1480. </description>
  1481. </request>
  1482. <request name="enable">
  1483. <description summary="enable the pointer binding">
  1484. This request should be made after all initial configuration has been
  1485. completed and the window manager wishes the pointer binding to be able
  1486. to be triggered.
  1487. This request modifies window management state and may only be made as
  1488. part of a manage sequence, see the river_window_manager_v1 description.
  1489. </description>
  1490. </request>
  1491. <request name="disable">
  1492. <description summary="disable the pointer binding">
  1493. This request may be used to temporarily disable the pointer binding. It
  1494. may be later re-enabled with the enable request.
  1495. This request modifies window management state and may only be made as
  1496. part of a manage sequence, see the river_window_manager_v1 description.
  1497. </description>
  1498. </request>
  1499. <event name="pressed">
  1500. <description summary="the bound pointer button has been pressed">
  1501. This event indicates that the pointer button triggering the binding has
  1502. been pressed.
  1503. This event will be followed by a manage_start event after all other new
  1504. state has been sent by the server.
  1505. The compositor should wait for the manage sequence to complete before
  1506. processing further input events. This allows the window manager client
  1507. to, for example, modify key bindings and keyboard focus without racing
  1508. against future input events. The window manager should of course respond
  1509. as soon as possible as the capacity of the compositor to buffer incoming
  1510. input events is finite.
  1511. </description>
  1512. </event>
  1513. <event name="released">
  1514. <description summary="the bound pointer button has been released">
  1515. This event indicates that the pointer button triggering the binding has
  1516. been released.
  1517. Releasing the modifiers for the binding without releasing the pointer
  1518. button does not trigger the release event. This event is sent when the
  1519. pointer button is released, even if the modifiers have changed since the
  1520. pressed event.
  1521. This event will be followed by a manage_start event after all other new
  1522. state has been sent by the server.
  1523. The compositor should wait for the manage sequence to complete before
  1524. processing further input events. This allows the window manager client
  1525. to, for example, modify key bindings and keyboard focus without racing
  1526. against future input events. The window manager should of course respond
  1527. as soon as possible as the capacity of the compositor to buffer incoming
  1528. input events is finite.
  1529. </description>
  1530. </event>
  1531. </interface>
  1532. </protocol>