Skip to content
Commits on Source (11)
  • Alexandros Frantzis's avatar
    linux-explicit-synchronization: Allow fences with opaque EGL buffers · 47914962
    Alexandros Frantzis authored and Pekka Paalanen's avatar Pekka Paalanen committed
    
    
    Add opaque EGL buffers to the supported buffer types for use with the
    explicit synchronization protocol. Opaque EGL buffers rely on the same
    EGL implementation in both the compositor and clients, which makes it
    straightforward to manage client expectations about fence support for
    such buffers.
    
    Also make it clearer that implementations are free to support other
    buffer types beyond the required ones.
    
    Signed-off-by: default avatarAlexandros Frantzis <alexandros.frantzis@collabora.com>
    Reviewed-by: default avatarPekka Paalanen <pekka.paalanen@collabora.com>
    47914962
  • Alexandros Frantzis's avatar
    linux-explicit-synchronization: Warn about using the protocol while using graphics APIs · 08903bdf
    Alexandros Frantzis authored and Pekka Paalanen's avatar Pekka Paalanen committed
    
    
    Graphics APIs are expected to use this protocol under the hood, and
    since there can only be one user of explicit synchronization per
    surface, warn about using the protocol directly in such cases.
    
    Signed-off-by: default avatarAlexandros Frantzis <alexandros.frantzis@collabora.com>
    Reviewed-by: default avatarPekka Paalanen <pekka.paalanen@collabora.com>
    08903bdf
  • Alexandros Frantzis's avatar
    linux-explicit-synchronization: Clarify implicit synchronization guarantees of release events · 57423eac
    Alexandros Frantzis authored and Pekka Paalanen's avatar Pekka Paalanen committed
    
    
    Clarify that after zwp_buffer_release_v1 events, otherwise unused
    buffers can be reused without any additional implicit synchronization.
    This is in contrast to wl_buffer.release, which doesn't guarantee that
    implicit synchronization is not required to safely use a buffer after
    the event is received.
    
    Signed-off-by: default avatarAlexandros Frantzis <alexandros.frantzis@collabora.com>
    Reviewed-by: default avatarPekka Paalanen <pekka.paalanen@collabora.com>
    57423eac
  • Sebastian Krzyszkowiak's avatar
    xdg-shell: fix a typo · 70ed9d7e
    Sebastian Krzyszkowiak authored and Pekka Paalanen's avatar Pekka Paalanen committed
    
    
    Signed-off-by: default avatarSebastian Krzyszkowiak <dos@dosowisko.net>
    Reviewed-by: default avatarPekka Paalanen <pekka.paalanen@collabora.com>
    70ed9d7e
  • Chia-I Wu's avatar
    linux-dmabuf: clarify DRM_FORMAT_MOD_INVALID · fb9b2a87
    Chia-I Wu authored and Daniel Stone's avatar Daniel Stone committed
    
    
    DRM_FORMAT_MOD_INVALID means to derive the modifier from the dmabuf.
    It provides legacy support and makes it easier to replace wl_drm.
    
    v3: DRM_FORMAT_MOD_INVALID must be advertised to be supported (which
        requires a version bump)
    v4: no version bump, but a note for now
    
    Signed-off-by: default avatarChia-I Wu <olvaffe@gmail.com>
    Reviewed-by: default avatarPekka Paalanen <pekka.paalanen@collabora.com>
    Reviewed-by: Simon Ser's avatarSimon Ser <contact@emersion.fr>
    Reviewed-by: default avatarDaniel Stone <daniels@collabora.com>
    fb9b2a87
  • Jonas Ådahl's avatar
    xdg-shell/README: Update E-mail address · 53624311
    Jonas Ådahl authored
    
    
    As requested by Mike, update the E-mail address listed in the README.
    
    Signed-off-by: default avatarJonas Ådahl <jadahl@gmail.com>
    53624311
  • Simon Ser's avatar
    xdg-output: deprecate the xdg_output.done event · 962dd535
    Simon Ser authored and Jonas Ådahl's avatar Jonas Ådahl committed
    
    
    This commit makes it so a wl_output.done event is guaranteed to be sent with a
    xdg_output.done event.
    
    This protocol change has been discussed in a recent xorg-devel discussions [1].
    
    First let's recap why a change is needed: Xwayland listens to both wl_output and
    xdg_output changes. When an output's properties change, Xwayland expects to
    receive both a wl_output.done event and an xdg_output.done event. If that's not
    the case, Xwayland doesn't update its state (so old state is still exposed to
    X11 clients).
    
    Most of the time, both objects will be updated at the same time (e.g. the
    current mode is changed, so both wl_output.mode and xdg_output.logical_size are
    sent) so this won't be an issue. However in some situations only one of
    wl_output or xdg_output changes. For instance:
    
    - The mode is changed at the same time as the scale, resulting in the same
      logical_size.
    - The compositor doesn't expose the outputs' position via wl_output, so whenever
      the position changes only xdg_output is updated.
    
    Both KDE [2] and wlroots [3] have experienced this issue.
    
    For this reason, I'd like to update the xdg-output protocol to make it mandatory
    to always send a wl_output.done event after xdg_output changes. This effectively
    makes wl_output.done atomically apply all output state (including the state of
    add-on objects like xdg_output). This approach is pretty similar to
    wl_surface.commit: this request will atomically apply surface state including
    the state of e.g. the xdg_surface object tied to the wl_surface.
    
    To update the protocol to reflect this new requirement we can either:
    
    - **Bump xdg_output version**. The current protocol doesn't specify that
      wl_output.done must be sent, adding this new requirement would be a breaking
      change. We need to fix Xwayland for the current xdg_output version (maybe make
      it non-atomic for the current version, atomic for the new one?). Should we
      deprecate xdg_output.done in the new version?
    - **Don't bump xdg_output version**. This clarifies what is expected in practice
      by Xwayland, a major xdg_output consumer, and what is currently implemented by
      all compositors.
    
    There's one issue with the "don't bump" approach: indeed in practice compositors
    always send wl_output.done and xdg_output.done in pairs, however the ordering
    between those two events is not guaranteed. This means some compositors might
    send this sequence:
    
        wl_output.geometry(…)
        wl_output.done()
        xdg_output.logical_position(…)
        xdg_output.done()
    
    In this case the wl_output.done event fails to atomically apply the xdg_output
    state.
    
    For this reason, I think bumping the version is a better approach.
    
    This commit also deprecates xdg_output.done, which doesn't have any purpose
    anymore.
    
    [1]: https://lists.x.org/archives/xorg-devel/2019-April/058148.html
    [2]: https://phabricator.kde.org/D19253
    [3]: https://github.com/swaywm/sway/issues/4064
    
    Signed-off-by: Simon Ser's avatarSimon Ser <contact@emersion.fr>
    Reviewed-by: default avatarOlivier Fourdan <ofourdan@redhat.com>
    Reviewed-by: default avatarJonas Ådahl <jadahl@gmail.com>
    962dd535
  • Simon Ser's avatar
    pointer-gestures: add a release request · b9d427db
    Simon Ser authored and Jonas Ådahl's avatar Jonas Ådahl committed
    
    
    This allows clients to destroy a gesture object before they disconnect.
    
    The request isn't named "destroy", as this would conflict with
    wayland-scanner's auto-generated destructor (which just destroys the
    client-side object without sending any request).
    
    Signed-off-by: Simon Ser's avatarSimon Ser <contact@emersion.fr>
    Reviewed-by: default avatarJonas Ådahl <jadahl@gmail.com>
    b9d427db
  • Jan-Marek Glogowski's avatar
    xdg-shell: use case to change the app ID at runtime · e0d6ad1d
    Jan-Marek Glogowski authored and Jonas Ådahl's avatar Jonas Ådahl committed
    
    
    LibreOffice is one big binary with explicit brandings for different
    application modules. This is represented in X11 by a different
    WM_CLASS setting for a window. The WM_CLASS is changed based on the
    loaded document at runtime. As a result LibreOffice already offers
    multiple desktop files with different icons, StartupWMClass
    entries and application names.
    
    This amendment of the set_app_id request just explicitly specifies
    the use case to change a surfaces' app ID at runtime, so a compositor
    implementor is made aware of it. Just as the WM_CLASS, a change of
    the app ID should result in an update of the propertes of a surface
    depending on the app ID, like the window icon specified in the
    desktop file or a re-grouping of the surfaces in a task manager.
    
    Signed-off-by: default avatarJan-Marek Glogowski <glogow@fbihome.de>
    Reviewed-by: default avatarJonas Ådahl <jadahl@gmail.com>
    Reviewed-by: Simon Ser's avatarSimon Ser <contact@emersion.fr>
    e0d6ad1d
  • Simon Ser's avatar
    xdg-output: make xdg_output.description mutable · 048102f2
    Simon Ser authored and Jonas Ådahl's avatar Jonas Ådahl committed
    
    
    The output description is a human-readable text describing the output. Unlike
    the name which uniquely identifies the output, it's intended to be displayed to
    the user.
    
    It might be desirable for a compositor to update an output's description. For
    instance, when only one output is plugged in, it's not necessary to dump make,
    model, serial and connector to the description, something like "Dell U2717D" is
    enough. However when two identical outputs are plugged in it's necessary to add
    e.g. the connector type to tell them apart ("Dell U2717D on HDMI"). See [1] for
    a discussion about this.
    
    This commit bumps xdg_output's version to allow compositors to update the
    property.
    
    [1]: https://github.com/swaywm/wlroots/issues/1623
    
    Signed-off-by: Simon Ser's avatarSimon Ser <contact@emersion.fr>
    Reviewed-by: default avatarJonas Ådahl <jadahl@gmail.com>
    Acked-by: default avatarOlivier Fourdan <ofourdan@redhat.com>
    048102f2
  • Jonas Ådahl's avatar
    configure.ac: Bump version to 1.18 · 630fb089
    Jonas Ådahl authored
    
    
    Signed-off-by: default avatarJonas Ådahl <jadahl@gmail.com>
    630fb089
AC_PREREQ([2.64])
m4_define([wayland_protocols_major_version], [1])
m4_define([wayland_protocols_minor_version], [17])
m4_define([wayland_protocols_minor_version], [18])
m4_define([wayland_protocols_version],
[wayland_protocols_major_version.wayland_protocols_minor_version])
......
......@@ -2,4 +2,4 @@ xdg shell protocol
Maintainers:
Jonas Ådahl <jadahl@gmail.com>
Mike Blumenkrantz <zmike@osg.samsung.com>
Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
......@@ -101,7 +101,7 @@
<description summary="check if the client is alive">
The ping event asks the client if it's still alive. Pass the
serial specified in the event back to the compositor by sending
a "pong" request back with the specified serial. See xdg_wm_base.ping.
a "pong" request back with the specified serial. See xdg_wm_base.pong.
Compositors can use this to determine if the client is still
alive. It's unspecified what will happen if the client doesn't
......@@ -604,6 +604,9 @@
For example, "org.freedesktop.FooViewer" where the .desktop file is
"org.freedesktop.FooViewer.desktop".
Like other properties, a set_app_id request can be sent after the
xdg_toplevel has been mapped to update the property.
See the desktop-entry specification [0] for more details on
application identifiers and how they relate to well-known D-Bus
names and .desktop files.
......
......@@ -28,6 +28,7 @@
<description summary="factory for creating dmabuf-based wl_buffers">
Following the interfaces from:
https://www.khronos.org/registry/egl/extensions/EXT/EGL_EXT_image_dma_buf_import.txt
https://www.khronos.org/registry/EGL/extensions/EXT/EGL_EXT_image_dma_buf_import_modifiers.txt
and the Linux DRM sub-system's AddFb2 ioctl.
This interface offers ways to create generic dmabuf-based
......@@ -129,8 +130,16 @@
binds to this interface. A roundtrip after binding guarantees that
the client has received all supported format-modifier pairs.
For legacy support, DRM_FORMAT_MOD_INVALID (that is, modifier_hi ==
0x00ffffff and modifier_lo == 0xffffffff) is allowed in this event.
It indicates that the server can support the format with an implicit
modifier. When a plane has DRM_FORMAT_MOD_INVALID as its modifier, it
is as if no explicit modifier is specified. The effective modifier
will be derived from the dmabuf.
For the definition of the format and modifier codes, see the
zwp_linux_buffer_params_v1::create request.
zwp_linux_buffer_params_v1::create and zwp_linux_buffer_params_v1::add
requests.
</description>
<arg name="format" type="uint" summary="DRM_FORMAT code"/>
<arg name="modifier_hi" type="uint"
......@@ -197,6 +206,11 @@
compression, etc. driver-specific modifications to the base format
defined by the DRM fourcc code.
Warning: It should be an error if the format/modifier pair was not
advertised with the modifier event. This is not enforced yet because
some implementations always accept DRM_FORMAT_MOD_INVALID. Also
version 2 of this protocol does not have the modifier event.
This request raises the PLANE_IDX error if plane_idx is too large.
The error PLANE_SET is raised if attempting to set a plane that
was already set.
......
......@@ -26,7 +26,7 @@
DEALINGS IN THE SOFTWARE.
</copyright>
<interface name="zwp_linux_explicit_synchronization_v1" version="1">
<interface name="zwp_linux_explicit_synchronization_v1" version="2">
<description summary="protocol for providing explicit synchronization">
This global is a factory interface, allowing clients to request
explicit synchronization for buffers on a per-surface basis.
......@@ -66,6 +66,12 @@
If the given wl_surface already has an explicit synchronization object
associated, the synchronization_exists protocol error is raised.
Graphics APIs, like EGL or Vulkan, that manage the buffer queue and
commits of a wl_surface themselves, are likely to be using this
extension internally. If a client is using such an API for a
wl_surface, it should not directly use this extension on that surface,
to avoid raising a synchronization_exists protocol error.
</description>
<arg name="id" type="new_id"
......@@ -76,7 +82,7 @@
</request>
</interface>
<interface name="zwp_linux_surface_synchronization_v1" version="1">
<interface name="zwp_linux_surface_synchronization_v1" version="2">
<description summary="per-surface explicit synchronization support">
This object implements per-surface explicit synchronization.
......@@ -101,8 +107,13 @@
Each surface can be associated with only one object of this interface at
any time.
Explicit synchronization is guaranteed to be supported only for buffers
created with any version of the wp_linux_dmabuf buffer factory.
In version 1 of this interface, explicit synchronization is only
guaranteed to be supported for buffers created with any version of the
wp_linux_dmabuf buffer factory. Version 2 additionally guarantees
explicit synchronization support for opaque EGL buffers, which is a type
of platform specific buffers described in the EGL_WL_bind_wayland_display
extension. Compositors are free to support explicit synchronization for
additional buffer types.
</description>
<request name="destroy" type="destructor">
......@@ -215,6 +226,11 @@
signaled when all operations by the compositor on that buffer for that
commit have finished.
Once the fence has signaled, and assuming the associated buffer is not
pending release from other wl_surface.commit requests, no additional
explicit or implicit synchronization is required to safely reuse or
destroy the buffer.
This event destroys the zwp_linux_buffer_release_v1 object.
</description>
<arg name="fence" type="fd" summary="fence for last operation on buffer"/>
......@@ -227,6 +243,11 @@
using it, or has a guarantee that all its operations on that buffer for
that commit have finished.
Once this event is received, and assuming the associated buffer is not
pending release from other wl_surface.commit requests, no additional
explicit or implicit synchronization is required to safely reuse or
destroy the buffer.
This event destroys the zwp_linux_buffer_release_v1 object.
</description>
</event>
......
<?xml version="1.0" encoding="UTF-8"?>
<protocol name="pointer_gestures_unstable_v1">
<interface name="zwp_pointer_gestures_v1" version="1">
<interface name="zwp_pointer_gestures_v1" version="2">
<description summary="touchpad gestures">
A global interface to provide semantic touchpad gestures for a given
pointer.
......@@ -37,9 +37,18 @@
<arg name="id" type="new_id" interface="zwp_pointer_gesture_pinch_v1"/>
<arg name="pointer" type="object" interface="wl_pointer"/>
</request>
<!-- Version 2 additions -->
<request name="release" type="destructor" since="2">
<description summary="destroy the pointer gesture object">
Destroy the pointer gesture object. Swipe and pinch objects created via this
gesture object remain valid.
</description>
</request>
</interface>
<interface name="zwp_pointer_gesture_swipe_v1" version="1">
<interface name="zwp_pointer_gesture_swipe_v1" version="2">
<description summary="a swipe gesture object">
A swipe gesture object notifies a client about a multi-finger swipe
gesture detected on an indirect input device such as a touchpad.
......@@ -102,7 +111,7 @@
</event>
</interface>
<interface name="zwp_pointer_gesture_pinch_v1" version="1">
<interface name="zwp_pointer_gesture_pinch_v1" version="2">
<description summary="a pinch gesture object">
A pinch gesture object notifies a client about a multi-finger pinch
gesture detected on an indirect input device such as a touchpad.
......
......@@ -54,7 +54,7 @@
reset.
</description>
<interface name="zxdg_output_manager_v1" version="2">
<interface name="zxdg_output_manager_v1" version="3">
<description summary="manage xdg_output objects">
A global factory interface for xdg_output objects.
</description>
......@@ -77,12 +77,17 @@
</request>
</interface>
<interface name="zxdg_output_v1" version="2">
<interface name="zxdg_output_v1" version="3">
<description summary="compositor logical output region">
An xdg_output describes part of the compositor geometry.
This typically corresponds to a monitor that displays part of the
compositor space.
For objects version 3 onwards, after all xdg_output properties have been
sent (when the object is created and when properties are updated), a
wl_output.done event is sent. This allows changes to the output
properties to be seen as atomic, even if they happen via multiple events.
</description>
<request name="destroy" type="destructor">
......@@ -157,6 +162,10 @@
This allows changes to the xdg_output properties to be seen as
atomic, even if they happen via multiple events.
For objects version 3 onwards, this event is deprecated. Compositors
are not required to send it anymore and must send wl_output.done
instead.
</description>
</event>
......@@ -197,10 +206,12 @@
output via :1'.
The description event is sent after creating an xdg_output (see
xdg_output_manager.get_xdg_output). This event is only sent once per
xdg_output_manager.get_xdg_output) and whenever the description
changes. The description is optional, and may not be sent at all.
For objects of version 2 and lower, this event is only sent once per
xdg_output, and the description does not change over the lifetime of
the wl_output global. The description is optional, and may not be sent
at all.
the wl_output global.
</description>
<arg name="description" type="string" summary="output description"/>
</event>
......