aboutsummaryrefslogtreecommitdiffstats
path: root/protocol
Commit message (Collapse)AuthorAgeFilesLines
* Add wl_fixes.ack_global_remove()Vlad Zahorodnii13 days1-1/+39
| | | | | | | | | | | | | | | | | | | | | | | | The wl_global_remove() function was introduce to help mitigate clients getting unintentionally disconnected if a global is added and removed in a short burst. The intended usage was: - the compositor calls wl_global_remove() - after a certain period of time, the compositor calls wl_global_destroy() Unfortunately, it did not fully fix the issue due to the way monotonic clock works on Linux. Specifically, it can tick even during sleep. This change adds a slightly better way to handle global removal. With the proposed changes, the clients need to signal to the compositor that they won't bind the global anymore. After all clients have acknowledged a wl_registry.global_remove, the compositor can finally destroy the global. Signed-off-by: Vlad Zahorodnii <vlad.zahorodnii@kde.org>
* doc: add frozen=true interface attributeIsaac Freund2026-03-052-2/+3
| | | | | | | | | | This is useful for scanners that use knowledge of the object creation hierarchy such as zig-wayland [1]. Currently zig-wayland uses a hardcoded list of frozen interfaces. [1]: https://codeberg.org/ifreund/zig-wayland Signed-off-by: Isaac Freund <mail@isaacfreund.com>
* protocol: elaborate on drm_fourcc.h and wl_shm.format codesManuel Stoeckl2026-02-281-1/+6
| | | | | | | | | | | Wayland clients should not assume the format list will not grow, or assume the format descriptions in the Wayland protocol are complete. (The latter fact is clear for descriptionless enum entries like XRGB8888_A8; but, for example, the full XRGB16161616F format description explicitly requires IEEE 754 binary16 floats instead of bfloat16 or ARM's alternative half precision variant.) Signed-off-by: Manuel Stoeckl <code@mstoeckl.com>
* protocol: add wl_data_device_manager destructorsJulian Orth2026-02-281-4/+13
| | | | Signed-off-by: Julian Orth <ju.orth@gmail.com>
* protocol: add wl_compositor destructorJulian Orth2026-02-281-1/+9
| | | | Signed-off-by: Julian Orth <ju.orth@gmail.com>
* protocol: fix wl_region versionJulian Orth2026-02-281-1/+1
| | | | | | | wl_region is not a frozen interface and therefore should have the version of the parent object, wl_compositor. Signed-off-by: Julian Orth <ju.orth@gmail.com>
* protocol: introduce wl_surface.get_releaseSimon Ser2026-02-281-5/+34
| | | | | | | | | | | | | | This new request allows clients to get per-surface-commit buffer release events. It supersedes wl_buffer.release. This functionality is also available via the linux-explicit-synchronization protocol, but requires the compositor to also support Linux synchronization fences. Adding this new request to the core protocol allows any compositor to implement the functionality. Signed-off-by: Simon Ser <contact@emersion.fr> Closes: https://gitlab.freedesktop.org/wayland/wayland/-/issues/203 References: https://gitlab.freedesktop.org/wayland/wayland/-/issues/46
* protocol: reindent wayland.xmlJulian Orth2026-02-021-1387/+1387
| | | | | | | | | | The file used a mixture of tabs and spaces. According to .editorconfig, all xml files should be indented with spaces, so this seems like the correct choice if we wanted to reindent the file. I used vim's :retab command to expand all tabs to 8 spaces. Signed-off-by: Julian Orth <ju.orth@gmail.com>
* protocol: Define Content Update behaviorSebastian Wick2026-01-221-69/+64
| | | | | | | | | | | | | | | | | | | The protocol currently is in a state where we define that commits create content updates and they are queued up until they are applied, and the old view that commit applies the state or caches it in the parent state. This commit moves the protocol completely to the new model which retains the old behavior when no constraints are being used but allows for constraints to be used to hold back a group of synchronized content updates. To convince yourself that this indeed retains the original behavior I suggest to play around with a few examples and look at the resulting graphs, as is done here: https://gitlab.freedesktop.org/wayland/wayland/-/issues/457#note_2403135 Signed-off-by: Sebastian Wick <sebastian.wick@redhat.com>
* protocol: add new formatsJulian Orth2025-11-261-0/+20
| | | | | | Generated from libdrm 2.4.129. Signed-off-by: Julian Orth <ju.orth@gmail.com>
* protocol: drop reference to linux-explicit-synchronizationSimon Ser2025-05-201-1/+2
| | | | | | | | This protocol has been superseded. Replace this outdated reference with a generic hint that protocol extensions may provide this functionality. Signed-off-by: Simon Ser <contact@emersion.fr>
* protocol: Clarify sending of wl_seat.capabilitiesDavid Edmundson2025-05-201-6/+7
| | | | | | | | | | | It wasn't explicitly stated that wl_seat.capabilities should also be sent on bind. Everyone did because it was obviously sensible. This also clarifies that static seat name should be sent before announcing capabilities so clients can associate these devices with the right seat name. Signed-off-by: David Edmundson <davidedmundson@kde.org>
* protocol: Clarify wl_buffer.release descriptionMichel Dänzer2025-03-151-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | Sebastian pointed out that the existing text could be read as wl_buffer.destroy not being allowed before the wl_buffer.release event arrives, contrary to what the wl_surface.attach description says. Clarify to be consistent with the latter. This is a follow-up for https://gitlab.freedesktop.org/wayland/wayland/-/merge_requests/141 . Signed-off-by: Michel Dänzer <mdaenzer@redhat.com> v2: * Simplify clarification, don't talk about callbacks. (Julian Orth) * Add reference to details in the description of wl_surface.attach. (Daniel Stone) v3: * Tweak clarification again. (Sebastian Wick) v4: * Make clarification even less ambiguous. (Simon Ser, Julian Orth) v5: * Just refer to the description of wl_surface.attach instead of trying to clarify anything here. (Sebastian Wick)
* protocol: add wl_fixes interfaceJulian Orth2024-11-181-0/+27
| | | | | | | | | | | | | | | | | This commit describes a new wl_fixes interface that can be used to destroy wl_registry objects. Users of libwayland-client should use it as follows: - call wl_fixes_destroy_registry(registry) - call wl_registry_destroy(registry) Users of libwayland-server should, in their implementation of the request, call wl_resource_destroy(registry). It should be similar in other protocol implementations. Signed-off-by: Julian Orth <ju.orth@gmail.com>
* protocol: document that wl_surface.offset is role-specificSimon Ser2024-10-051-0/+3
| | | | | | | | This request doesn't make sense for all surface roles. For instance, for maximized/tiled/fullscreen xdg_toplevel, for xdg_popup, for layer-shell surfaces, etc. Signed-off-by: Simon Ser <contact@emersion.fr>
* Add wl_keyboard key repeat eventsAndri Yngvason2024-09-231-4/+18
| | | | | | | This allows the compositor to take over the responsibility of repeating keys. Signed-off-by: Andri Yngvason <andri@yngvason.is>
* protocol: clients should not emulate key-press events on enterJulian Orth2024-09-101-0/+3
| | | | | | | The previous change introducing the logical state caused some confusion. Clarify that most application should not use the list of pressed keys. Signed-off-by: Julian Orth <ju.orth@gmail.com>
* protocol: clarify divergence in compositor behaviourHugo Osvaldo Barrera2024-05-291-3/+9
| | | | | | | | This is intended to only document the current situation. Whether further behaviour will be defined is out of scope and left for protocol v7. See: https://gitlab.freedesktop.org/wayland/wayland/-/merge_requests/363 Signed-off-by: Hugo Osvaldo Barrera <hugo@whynothugo.nl>
* protocol: explicitly describe wl_keyboard stateJulian Orth2024-05-091-7/+31
| | | | | | | | | And the allowed state transitions. There has been some confusion regarding which state transitions are allowed. This change should clarify this. Signed-off-by: Julian Orth <ju.orth@gmail.com>
* protocol: define content updates and their internal queueSebastian Wick2024-04-241-9/+11
| | | | | | | | | | | Multiple protocols use the term content update without a fill definition. It makes sense to define it in the core protocol so that not every other protocol has to define it. This is supposed to retain the current semantics and only changes the documentation while defining new terms. Signed-off-by: Sebastian Wick <sebastian.wick@redhat.com>
* protocol: mark wl_pointer.axis_discrete as deprecatedSimon Ser2024-04-241-1/+1
| | | | | | Since version 8, this event isn't sent anymore. Signed-off-by: Simon Ser <contact@emersion.fr>
* Add support for the deprecated-since XML attributeSimon Ser2024-04-241-0/+3
| | | | | | | | | | | | | | This marks a request, event or enum entry as deprecated since a given version. Note that it's not clear what it means if an entry is deprecated at some version, and the enum is used from some completely different interface than where it was defined. However, that's a more general issue with enums, see: https://gitlab.freedesktop.org/wayland/wayland/-/issues/435 Signed-off-by: Simon Ser <contact@emersion.fr> References: https://gitlab.freedesktop.org/wayland/wayland/-/issues/89
* Clarify behavior of buffer transformationsJulian Orth2024-04-231-12/+13
| | | | | | | | | | | | | | | | | | | | | | | The new text describes how - Mutter - Plasma - Sway 1.8 - Jay behave. Sway 1.9 flipped the behavior of 90 degree and 270 degree set_buffer_transform requests. [mpv] also changed the behavior of its vo_wayland_dmabuf backend which makes it only work correctly on sway 1.9. [mpv]: https://github.com/mpv-player/mpv/pull/12509 It seems that the previous text was open to interpretation or at least caused some amount of confusion. Signed-off-by: Julian Orth <ju.orth@gmail.com>
* protocol: Undefine wl_display_sync callback dataColin Kinloch2024-04-231-1/+1
| | | | Signed-off-by: Colin Kinloch <colin.kinloch@collabora.com>
* wl_touch.cancel: document lack of frame eventIsaac Freund2024-03-281-0/+2
| | | | | | | | This appears to be what at least wlroots-based compositors and kwin do in practice. However, it's not abundantly clear from the protocol text what the expected behavior here is. This patch fixes that. Signed-off-by: Isaac Freund <mail@isaacfreund.com>
* protocol: document that color channels provide electrical valuesSimon Ser2024-03-121-2/+4
| | | | | | | | | | Expand the work done in [1] to document that all channels store electrical values. See the discussion in [2]. [1]: https://gitlab.freedesktop.org/wayland/wayland/-/merge_requests/316 [2]: https://gitlab.freedesktop.org/wayland/wayland/-/merge_requests/250#note_2311377 Signed-off-by: Simon Ser <contact@emersion.fr>
* protocol: mention wl_surface events from wl_output.{scale,transform}Simon Ser2024-02-211-6/+7
| | | | | | | | The wl_output events should not be used anymore for guessing the preferred scale and transform of a surface. We have explicit events for that now. Signed-off-by: Simon Ser <contact@emersion.fr>
* protocol: clarify pending wl_buffer destructionKirill Primak2024-01-271-2/+3
| | | | | | | This matches the current behavior of KWin, Mutter, and Weston. References: https://gitlab.freedesktop.org/wayland/wayland/-/issues/387 Signed-off-by: Kirill Primak <vyivel@eclair.cafe>
* protocol: add wl_shm.release requestSimon Ser2024-01-191-2/+13
| | | | | | | Allows clients to cleanly release wl_shm objects. Useful for clients using multiple wl_registry objects (e.g. via libraries). Signed-off-by: Simon Ser <contact@emersion.fr>
* protocol: clarify scale expecationsBen Widawsky2024-01-191-4/+7
| | | | | | | Since the positivity of zero is debatable, and, in some cases scale was simply underspecified, clarify the situation. Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
* protocol: document wl_surface.offset for sub-surfacesSimon Ser2024-01-191-0/+3
| | | | | | | Document that the request is ignored, since this is the behavior of most compositors. Signed-off-by: Simon Ser <contact@emersion.fr>
* protocol: wl_subsurface will never be focusedJulian Orth2023-12-271-0/+2
| | | | | | | | | | | | | The spec does not describe which actions cause the compositor to assign keyboard focus to a surface, leaving this up to the compositor. Compositors differ in their behavior when the user clicks on a sub-surface. Some will move the keyboard focus to the subsurface whereas others will only ever assign the keyboard focus to toplevel surfaces. Some applications (e.g. firefox) seem to require the second behavior. This patch specifies that sub-surfaces never get the keyboard focus. Signed-off-by: Julian Orth <ju.orth@gmail.com>
* protocol: improve wl_subsurface.{set_position,place_above} descriptionKirill Primak2023-11-211-6/+2
| | | | | | | Don't mention when the parent surface state is applied; the parent surface isn't necessarily a sub-surface. Signed-off-by: Kirill Primak <vyivel@eclair.cafe>
* protocol: clarify defaults with wl_compositor@v6Kirill Chibisov2023-11-211-0/+6
| | | | | | | | This should be sufficient for clients to not decide to fallback to output based logic to determine scaling/transform when compositor doesn't send any of the v6 events. Signed-off-by: Kirill Chibisov <contact@kchibisov.com>
* protocol: refer to wl_surface.offset in wl_data_device.start_dragSimon Ser2023-11-211-1/+1
| | | | | | | Passing an offset to wl_surface.attach is not supported in the latest version of the interface. Signed-off-by: Simon Ser <contact@emersion.fr>
* protocol: fix whitespaceSimon Ser2023-07-191-9/+9
| | | | | | This file uses tabs instead of 8 spaces. Signed-off-by: Simon Ser <contact@emersion.fr>
* protocol: refer to wl_surface.offset in set_cursorSimon Ser2023-05-231-2/+2
| | | | | | | | The offset in wl_surface.attach has been superseded by wl_surface.offset. Refer to the new request instead of using the deprecated one. Signed-off-by: Simon Ser <contact@emersion.fr>
* protocol: specify the exact form of premultiplicationSebastian Wick2023-05-091-2/+2
| | | | | | | | | | | | | | | There are two ways to do pre-multiplication of the alpha channel into the color channels: on optical values or on electrical values. While pre-multiplication with optical values is arguably more correct, because operations like blending or scaling require pre-multiplied, optical color channels, wayland and compositors by default work with pre-multiplied electrical values. This is most likely a convention that Wayland took from Cairo. This commit makes sure that the expectation of pre-multiplied electrical values is properly documented. Signed-off-by: Sebastian Wick <sebastian.wick@redhat.com>
* protocol: add new shm formatsManuel Stoeckl2023-05-031-0/+15
| | | | | | This brings the format list up to date with libdrm 2.4.115. Signed-off-by: Manuel Stoeckl <code@mstoeckl.com>
* protocol: improve wl_keyboard focus documentationXaver Hugl2023-04-121-2/+15
| | | | | | | | The compositor must not send any key events while a surface is not focused, but in order to allow for common actions like ctrl+scroll for zooming to work with unfocused surfaces it may do so with modifiers. Signed-off-by: Xaver Hugl <xaver.hugl@gmail.com>
* protocol: disallow re-using wl_data_sourceSimon Ser2023-04-041-0/+9
| | | | | | | | | | | | As pointed out in [1], re-using a wl_data_source for multiple start_drag or set_selection requests has bad consequences, because this object has events that allo tracking the state of a selection/drag-and-drop operation. Tracking two operations at the same time isn't possible with this interface. [1]: https://lists.freedesktop.org/archives/wayland-devel/2019-January/039936.html Signed-off-by: Simon Ser <contact@emersion.fr> Signed-off-by: Daniel Stone <daniels@collabora.com>
* protocol: Clarify meaning of input region for cursors, DnD iconsMikhail Gusarov2023-02-271-10/+5
| | | | | | | | Input region is ignored for cursors, DnD icons. Current wording implies that this state is temporary, but surfaces never lose the role once assigned, so reword to make it clearer. Signed-off-by: Mikhail Gusarov <dottedmag@dottedmag.net>
* protocol: reorder wl_data_offer.source_actions and wl_data_device.enterVlad Zahorodnii2023-02-271-2/+3
| | | | | | | | | | | | | | | | | | | Most compositors send the wl_data_offer.source_actions event before the wl_data_device.enter event, i.e. after creation of the data offer. This contradicts to the wayland spec. On the other hand, it's reasonable to send all the information useful to the client before the enter event, rather than send mime types before the enter event and source actions (that don't depend on drop target) after the enter event. On the client side, toolkits such as Qt and GTK already expect to see the source actions before receiving the enter event. Given all of that, this change adjusts the spec to match the behavior observed in the compositors in the wild. Signed-off-by: Vlad Zahorodnii <vlad.zahorodnii@kde.org>
* protocol: do not change pending x and y when attaching a bufferSebastian Wick2023-02-271-2/+3
| | | | | | | | | | | Attaching a buffer with interface version 5 requires clients to pass zero to x and y but it still affects the pending surface state. Attaching a buffer after a request to offset therefore sets the pending x and y to zero. The intent of version 5 was to allow exactly this sequence of requests to work so let's just make sure the protocol actually spells it out. Signed-off-by: Sebastian Wick <sebastian.wick@redhat.com>
* protocol: add wl_pointer's axis relative physical directionPeter Hutterer2023-02-211-4/+60
| | | | | | | | | | | | This event adds the physical direction of the axis motion, relative to the axis event we get. Right now, when natural scrolling is enabled things like virtual volume sliders move the wrong way round. By adding the axis motion direction, we can have toolkits swap the scroll direction for applicable widgets, getting the right behavior on all widgets. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Yong Bakos <ybakos@humanoriented.com>
* protocol: add wl_surface.preferred_buffer_transformSimon Ser2023-02-071-0/+13
| | | | | | | | | Same as the new wl_surface.preferred_buffer_scale event but for transform. No version bump needed since the previous commit did that. Signed-off-by: Simon Ser <contact@emersion.fr>
* protocol: add wl_surface.preferred_buffer_scaleSimon Ser2023-02-071-2/+17
| | | | | | | | | | | | | | | | | | | | | | Right now, clients need to bind to wl_output globals, listen to wl_output.scale, listen to wl_surface.enter/leave, pick the highest scale factor. This is an issue because it breaks Wayland's "policy, not mechanism" motto. Clients take the decision of which scale to use depending on the outputs they're on, compositors have no say in this (apart from faking output events, which isn't great). This commit introduces a new wl_surface.preferred_buffer_scale event to allow compositors to directly indicate the preferred scale factor for each surface. This unlocks features which require dynamically changing the scale such as: - Accessibility features such as screen magnifier - In a VR environment, render surfaces close to the eye at a higher scale - HiDPI screenshots on LoDPI screens Signed-off-by: Simon Ser <contact@emersion.fr> Closes: https://gitlab.freedesktop.org/wayland/wayland/-/issues/271
* protocol: wl_subsurface::destroy does not remove the roleMikhail Gusarov2023-01-161-2/+1
| | | | | | | Role assigned to wl_surface cannot be removed. Delete contradicting text from wl_subsurface::destroy documentation. Signed-off-by: Mikhail Gusarov <dottedmag@dottedmag.net>
* protocol: add note about wl_buffer/wl_callback versionSimon Ser2022-12-071-0/+6
| | | | | | | This is an exception which can be confusing. Add an explicit note about it in the protocol text. Signed-off-by: Simon Ser <contact@emersion.fr>
* protocol: add defunct_role_object errorKirill Primak2022-11-291-2/+5
| | | | | | | | | This commit adds wl_surface.defunct_role_object error, which has semantics similar to xdg_wm_base.defunct_surfaces error, and is sent when a client destroys a surface while the corresponding role object still exists. Signed-off-by: Kirill Primak <vyivel@eclair.cafe>