summaryrefslogtreecommitdiff
path: root/protocol
Commit message (Collapse)AuthorAgeFilesLines
* 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>
* protocol: clarify wl_shm_pool.resizeMax Ihlenfeldt2022-01-071-0/+6
| | | | | | | Add a note that the request only changes the size of the memory mapping and does not touch the mapped file. Signed-off-by: Max Ihlenfeldt <mihlenfeldt@igalia.com>
* protocol: clarify wl_data_offer::selectionJan Grulich2021-11-151-3/+4
| | | | | | | Clearly specify that switching focus within the same client doesn't mean a new selection will be send. Signed-off-by: Jan Grulich <jgrulich@redhat.com>
* protocol: sync wl_shm.format with libdrm 2.4.108Manuel Stoeckl2021-11-111-0/+4
| | | | | | | | | The four new formats added (all 16 bpc, RGB colorspace) are very useful for applications providing high bit depth content and rendering their buffers on CPU, as computations with 16 bit unsigned integers are often more efficient than with the (half float, 10 bit) alternative formats. Signed-off-by: Manuel Stoeckl <code@mstoeckl.com>
* protocol: wl_shm uses pre-multiplied alphaSimon Ser2021-11-041-0/+3
| | | | | | | | | Add a note about pre-multiplied alpha for all wl_shm formats. Include an escape hatch in the spec to allow other protocol extensions to override this. Signed-off-by: Simon Ser <contact@emersion.fr> Closes: https://gitlab.freedesktop.org/wayland/wayland/-/issues/61
* protocol: add wl_output.{name,description}Simon Ser2021-10-281-2/+58
| | | | | | | | | | | | | | | | | | This is inspired from xdg-output-unstable-v1. This allows clients to get the name and description without having to use xdg_output. This should eventually allow us to restrict xdg_output to clients like Xwayland. The name is a unique non-persistent user-friendly string that can be used to refer to an output. This can be used by Wayland clients to refer to a specific wl_output (e.g. across processes or in CLI arguments). The description is a non-unique user-friendly string that can be displayed to the user. Signed-off-by: Simon Ser <contact@emersion.fr> References: https://gitlab.freedesktop.org/wayland/wayland-protocols/-/issues/7
* protocol: add note about wl_output.done in eventsSimon Ser2021-10-281-0/+8
| | | | | | | Mention that geometry, mode and scale wl_output events are followed by a done event. Signed-off-by: Simon Ser <contact@emersion.fr>
* protocol: Add wl_surface.offsetJonas Ådahl2021-10-281-3/+32
| | | | | | | | | | | | | | This is meant to address the issue where the call to 'wl_surface.attach' is done by e.g. Vulkan, meaning applications cannot affect the values of the offset passed as the x and y arguments. The lack of ability to pass these is problematic when using the Vulkan for e.g. drawing DND surfaces, as the buffer offset is used to implement the drag icon hotspots. Closes: https://gitlab.freedesktop.org/wayland/wayland/-/issues/148 Signed-off-by: Jonas Ådahl <jadahl@gmail.com> Reviewed-by: Simon Ser <contact@emersion.fr>
* protocol: mention that buffers with alpha are assumed premultipliedMatt Hoosier2021-09-291-0/+4
| | | | | | | | | This turns out to be the default assumption by compositors, OpenGL, and the DRM framework. Let's say it explicitly to avoid misinterpretation. See https://lists.freedesktop.org/archives/wayland-devel/2021-September/041990.html. Signed-off-by: Matt Hoosier <matt.hoosier@garmin.com>
* protocol: mention that keymap mapping must be read-onlySimon Ser2021-09-161-1/+2
| | | | | | | It may be obvious that the mapping must be established in read-only mode, but it wasn't specified in the specification text. Signed-off-by: Simon Ser <contact@emersion.fr>
* protocol: clarify wl_seat.name descriptionSimon Ser2021-07-061-3/+16
| | | | | | Define the expected properties of the seat name. Signed-off-by: Simon Ser <contact@emersion.fr>
* protocol: allow immediate wl_buffer.destroy if not re-usedSimon Ser2021-06-111-3/+6
| | | | | | | | | | | | | | | | | | | Allow wl_buffer objects to be destroyed without having to wait for wl_buffer.release if the underlying storage isn't going to be re-used. The main motivation for this is to avoid glitches when a client is torn down. When a client disconnects, all of its objects are destroyed in arbitrary order. However some compositors will still need to access the destroyed buffer's underlying storage afterwards, e.g. for visual effects (fade-out) or for atomic layout updates (wait for other clients to commit a new buffer before hiding the buffer). It's still incorrect for clients to destroy a wl_buffer and mutate the underlying storage without waiting for wl_buffer.release. Signed-off-by: Simon Ser <contact@emersion.fr> Closes: https://gitlab.freedesktop.org/wayland/wayland/-/issues/185
* protocol: drop reference to wl_drmSimon Ser2021-05-271-4/+5
| | | | | | | Change the wl_drm reference to linux-dmabuf. wl_drm is a legacy, private Mesa protocol that shouldn't be used by regular clients. Signed-off-by: Simon Ser <contact@emersion.fr>
* Document serial param usage in wl_pointer.set_cursorNick Diego Yamane2021-05-041-0/+4
| | | | | | | | Serial is supposed to contain the latest wl_pointer.enter value received by clients but it was not even mentioned in the docs, so add it to avoid misinterpretations. Signed-off-by: Nick Diego Yamane <nickdiego@igalia.com>
* protocol: Specify wl_callback::done to be a destructor eventTadeo Kondrak2021-01-271-1/+1
| | | | | | | It's the only destructor event in the core protocol, and destructor events were previously unannotated. Signed-off-by: Tadeo Kondrak <me@tadeo.ca>
* protocol: Add type attribute to eventsTadeo Kondrak2021-01-271-0/+1
| | | | | | | This allows specifying events to be destructors, which is useful for non-C language bindings. It is unused in wayland-scanner. Signed-off-by: Tadeo Kondrak <me@tadeo.ca>
* protocol: sync wl_shm.format with libdrm 2.4.104Simon Ser2021-01-191-0/+4
| | | | | | | | This adds 4 new formats. Signed-off-by: Simon Ser <contact@emersion.fr> Reviewed-by: Jonas Ådahl <jadahl@gmail.com> Acked-by: Daniel Stone <daniels@collabora.com>
* protocol: deprecate non-current wl_output.modeSimon Ser2020-10-291-0/+4
| | | | | | | | | | | | | | | | | | | | | The current wl_output.mode event has several issues when used to advertise modes that aren't current: - It's not possible to remove some modes. This is an issue for virtual outputs and when the kernel prunes some modes because of link limitations. - wl_output.mode fails to carry metadata such as aspect ratio, which results in duplicated or missing modes. - It's not clear, given the current set of protocols, how non-current modes are useful to clients. Xwayland ignores non-current modes. GNOME and wlroots already only advertise the current mode because of these issues. If a protocol needs the clients to know about all available modes, it should advertise these modes itself instead of relying on wl_output.mode. Signed-off-by: Simon Ser <contact@emersion.fr> Closes: https://gitlab.freedesktop.org/wayland/wayland/-/issues/92
* protocol: make it clear wl_surface.enter/leave are not for frame throttlingSimon Ser2020-10-291-0/+6
| | | | | | | | | | | | | | | | | Some clients rely on wl_surface.enter/leave to start/stop their rendering loop. There are cases where this doesn't work: - Some compositors don't send wl_surface.leave when a toplevel is hidden. For instance Sway doesn't send this event when a toplevel is on an inactive workspace (but doesn't send wl_surface.frame events). - Some compositors might still want applications to continue to render even if away from outputs. For instance a compositor that allows to screen record individual toplevels might not send a wl_surface.enter event for hidden toplevels. Signed-off-by: Simon Ser <contact@emersion.fr>
* protocol: Clarify how clients can cancel a drag operationNick Diego Yamane2020-10-291-1/+2
| | | | | | | | | | Explicitly say that destroying a wl_data_source previously used in a wl_data_device::start_drag request will cancel the DND session. This is currently the only way to do it from client side (besides those "indirect" ones already documented) and all compositors work like that but it is not clear spec-wise it is the expected behaviour. Signed-off-by: Nick Diego Yamane <nickdiego@igalia.com>
* protocol: Minor gramatical fix.Christopher James Halse Rogers2020-08-141-1/+1
| | | | Signed-off-by: Christopher James Halse Rogers <christopher.halse.rogers@canonical.com>
* protocol: disambiguate key codes in wl_keyboard.keySimon Ser2020-06-161-0/+3
| | | | | | | | | | | Explain that wl_keyboard.key yields platform-specific key codes. Some compositors use Linux key codes (defined in the linux/input-event-codes.h header file, e.g. KEY_ESC), however clients should not assume that this is always the case. The only reliable way for clients to interpret key codes is to feed them into a keyboard mapping. Signed-off-by: Simon Ser <contact@emersion.fr>
* Clarify clients behavior on wl_keyboard.leaveKirill Chibisov2020-06-121-0/+3
| | | | | | | | | Clients must assume that every key, including modifiers, are lifted after getting wl_keyboard.leave event, not doing so could lead to key repeat keep going after the user changes focus, or stuck modifiers, when the user interacts with client without keyboard focus. Signed-off-by: Kirill Chibisov <contact@kchibisov.com>
* Clarify the order of wl_keyboard.modifiersKirill Chibisov2020-06-121-0/+6
| | | | | | | | | | | | | | | | Consider that we set the modifier for the modifier key as well, and that you have the option to change your layout when both shifts pressed. This realized by making the shift keys produce 'Group_switch' when you press the shift key and the shift modifier is already active. So sending modifier before the key event will result in 'Group_switch' each time you press shift. That being said, the order of modifiers should be updated after the key/enter event, so it'll only affect future keypresses, not the current one. See: https://lists.x.org/archives/xorg-devel/2014-July/043110.html Signed-off-by: Kirill Chibisov <contact@kchibisov.com>
* protocol: add seat missing_capability errorSimon Ser2020-06-051-3/+14
| | | | | | | | | | | | The protocol says: > It is a protocol violation to issue this request on a seat that > has never had the pointer capability. But never defines an error code. Signed-off-by: Simon Ser <contact@emersion.fr> Closes: https://gitlab.freedesktop.org/wayland/wayland/-/issues/165
* Replace initial 8 spaces with a tab for all xml filesPeter Hutterer2020-04-292-9/+9
| | | | | | | | | This is the style used in wayland.xml which is the only file we really care about for git blame information. So let's adjust all others to that style for consistency and fix editorconfig to avoid messing this up in the future. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
* protocol: add invalid_size error to wl_surfaceSimon Ser2020-03-051-2/+4
| | | | | | | | | This allows the compositor to send an error when the client submits a buffer whose size is not divisible by the buffer scale. Previously, the protocol said it was a client error but didn't specify any error code. Signed-off-by: Simon Ser <contact@emersion.fr> Closes: https://gitlab.freedesktop.org/wayland/wayland/issues/145
* protocol: add missing enums for wl_data_device_manager.dnd_actionSimon Ser2020-01-211-6/+12
| | | | Signed-off-by: Simon Ser <contact@emersion.fr>
* protocol: fix typo in wl_data_offer.set_actions descriptionMichael Forney2020-01-021-1/+1
| | | | Signed-off-by: Michael Forney <mforney@mforney.org>
* protocol: invalid_method is sent on malformed requestSimon Ser2019-09-101-1/+1
| | | | | | | | | | Currently libwayland sends a wl_display.invalid_method when arguments provided with a request are invalid (e.g. too short, see wl_client_connection_data). Clarify the protocol by adding that invalid_method can be sent on malformed request. Signed-off-by: Simon Ser <contact@emersion.fr>