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>
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>
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)
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>
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>
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>
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>
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>
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>
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
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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
Role assigned to wl_surface cannot be removed.
Delete contradicting text from wl_subsurface::destroy documentation.
Signed-off-by: Mikhail Gusarov <dottedmag@dottedmag.net>
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>
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>
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>
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 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>
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>