aboutsummaryrefslogtreecommitdiffstats
path: root/protocol
Commit message (Collapse)AuthorAgeFilesLines
* 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>
* protocol: remove wl_subsurface lifetime contradictionKirill Primak2022-11-291-6/+4
| | | | | | | | | This statement assumes that a wl_surface can be destroyed before the corresponding wl_subsurface, which is not true, as wl_surface description explicitly states that the role object must be destroyed before the wl_surface itself. Signed-off-by: Kirill Primak <vyivel@eclair.cafe>
* protocol: add wl_compositor.error.bad_parentSimon Ser2022-09-211-0/+6
| | | | | | This forbids loops in sub-surface trees. Signed-off-by: Simon Ser <contact@emersion.fr>
* protocol: mention protocol error name in wl_subcompositor.get_subsurfaceSimon Ser2022-09-211-2/+2
| | | | | | Let's be explicit here. Signed-off-by: Simon Ser <contact@emersion.fr>
* protocol: minor clarification for axis_discrete eventsPeter Hutterer2022-06-301-1/+2
| | | | | | | | | Explicitly spell out that multiple axis_discrete events *for the same axis* within the same wl_pointer.frame are not permitted. References: https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/911#note_1438099 Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
* wl_shell is not mandatoryDemi Marie Obenour2022-04-111-1/+2
| | | | | | | Even though it is part of wayland.xml, wl_shell is not mandatory for compositors to implement, and may be removed in a future version. Signed-off-by: Demi Marie Obenour <demiobenour@gmail.com>
* protocol: add the wl_pointer.axis_value120 eventsPeter Hutterer2022-03-281-4/+35
| | | | | | | | | These events are for high-resolution wheels. Each logical wheel click represents an axis value120 value of 120, fractions of a wheel click an integer fraction thereof. The new event replaces wl_pointer.axis_discrete for wl_pointer versions 8 and above. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
* protocol: wl_shm.format events are actually sent after bindMikhail Gusarov2022-02-211-2/+2
| | | | | | | | | Protocol documentation mistakenly specified that wl_shm.format events are sent at connection setup time, but that's impossible (clients do not yet know ID of wl_shm object at the time) and contradicts implementation in libwayland. Signed-off-by: Mikhail Gusarov <dottedmag@dottedmag.net>
* protocol: xkb_v1 is null-terminatedJulian Orth2022-01-311-1/+1
| | | | | | Closes #270 Signed-off-by: Julian Orth <ju.orth@gmail.com>
* doc: fix typo in wl_data_device.data_offershierote2022-01-101-1/+1
| | | | Signed-off-by: Taishi Eguchi <taishi2060@gmail.com>