The release of the wayland-protocols 1.38 package is now available, containing a set of protocols and extensions that complement the basic Wayland protocol and provide the necessary capabilities for building composite servers and user environments.
All protocols go through three phases: development, testing, and stabilization. After the development stage (the 'unstable' category) is completed, the protocol is moved to the 'staging' branch and officially included in the wayland-protocols set, and after testing is completed, it is moved to the stable category. Protocols in the 'staging' category can already be used in composite servers and clients where the related functionality is required. Unlike the 'unstable' category, changes that break compatibility are prohibited in 'staging', but if issues and deficiencies are identified during testing, the replacement of the protocol with a significant new version or another Wayland extension is not excluded.
In the new version, the following protocols have been added to the 'staging' category:
- xdg-system-bell â allows the output of a system signal that can be used, for example, as a warning in terminal emulators. The form of the signal output is determined at the discretion of the composite manager; it can be not only sound but also a visual response.
- fifo â implements a FIFO mechanism (first-come, first-served) for processing the queue of updates to the displayed surface. Practically, the protocol allows for using vertical synchronization (vblank) waiting instead of callback calls whenever ready to display a new frame, addressing the issue of high GPU load when using VSync.
- commit-timing â allows a time constraint to be tied to the surface content (the composite server must display the content change as close to the specified time as possible, but not earlier).
Currently, the wayland-protocols package includes the following stable protocols that ensure backward compatibility:
- âviewporterâ â allows clients to perform actions for scaling and cropping surface edges on the server side.
- âpresentation-timeâ â provides video display.
- âxdg-shellâ â an interface for creating and interacting with surfaces as windows, allowing them to be moved across the screen, minimized, maximized, resized, etc.
- âlinux-dmabufâ â enables the sharing of multiple video cards using DMA-BUF technology (allows creating a wl_buffer based on DMA-BUF).
- "tablet" â input organization from graphic tablets.
Protocols currently being tested in the 'staging' branch:
- drm-lease provides the resources necessary for forming a stereo image with different buffers for the left and right eye when outputting to virtual reality headsets.
- ext-session-lock defines session lock mechanisms, such as during the screensaver operation or the display of an authentication dialog.
- single-pixel-buffer allows the creation of single-pixel buffers that include four 32-bit RGBA values.
- xdg-activation enables focus transfer between different top-level surfaces (for example, using xdg-activation, one application can shift focus to another).
- content-type allows clients to convey information about the displayed content that can be used to optimize behavior based on content, such as setting specific DRM properties like 'content type'. Support is declared for the following content types: none (no information about data type), photo (output of digital photos requiring minimal processing), video (video or animation requiring more precise synchronization to avoid stuttering), and game (launching games requiring output with minimal latency). server ext-idle-notify allows composite servers to send notifications to clients about user inactivity, which can be used to activate additional power-saving modes after a certain period of inactivity.
- tearing-control allows disabling vertical synchronization (VSync) with frame-destroying pulse in fullscreen applications, used to prevent tearing during output. In multimedia applications, the appearance of artifacts due to tearing is an undesirable effect, but in gaming programs, artifacts can be tolerated if combating them leads to additional delays.
- ext-foreign-toplevel-list retrieves information about surfaces positioned at the very top level (toplevel) that allow the organization of window pinning over other content, for example, to connect custom panels and window switches.
- ext-foreign-toplevel-list retrieves information about surfaces positioned at the very top level (toplevel) that allow the organization of window pinning over other content, for example, to connect custom panels and window switches.
- security-context â allows identifying clients using sandbox isolation. A client can register a new connection to a composite server based on Wayland and attach a security context to it, after which the composite manager will restrict the capabilities available for the established connection according to the specified security context.
- cursor-shape â an alternative way to set the cursor appearance based on transmitting a series of cursor images instead of binding to a surface (wl_surface).
- «ext-transient-seat» â designed for creating temporary independent sessions (seat) intended for use with virtual input devices. For example, when implementing the ability to connect to a remote desktop the protocol allows creating a separate session with virtual keyboard and mouse for each user.
- «xdg-toplevel-drag» â extends the âdrag & dropâ mechanism by allowing the attachment of top-level windows to the movement operation, which can be used, for example, to organize mouse dragging of toolbars or browser tabs. The new protocol enables the creation of detachable parts of the window that, when dragged out of the original window, become new windows and can be moved above the existing window before reattaching.
- «xdg-dialog» â allows assigning top-level surfaces with properties specific to dialog windows, for example, it can create modal dialogs that block user interaction with the rest of the interface.
- «linux-drm-syncobj» â provides tools for explicit synchronization of buffers using DRM (Direct Rendering Manager) synchronization objects. It is expected that in the context of synchronization during rendering to a buffer, the proposed protocol will improve operations with drivers based on Vulkan and OpenGL graphics APIs (the implementation is based on handlers in the drivers). The new protocol allows ensuring that the rendering operation to the buffer is completed before the composite manager displays that buffer.
- alpha-modifier, allowing clients to change the transparency level of the surface and offloading transparency operations to the composite server, which can, in turn, redirect these operations to KMS.
- xdg-toplevel-icon â binding an icon to a top-level window.
- ext-image-capture-source and ext-image-copy-capture â organizing the capture of content displayed on the screen.
Protocols being developed in the âunstableâ branch:
- «fullscreen-shell» â management of fullscreen operation.
- «input-method» â processing of input methods.
- «idle-inhibit» â prevents the screensaver (screen saver) from starting.
- «input-timestamps» â timestamps for input events.
- «keyboard-shortcuts-inhibit» â manages the attachment of keyboard shortcuts and hotkeys.
- «linux-explicit-synchronization» â Linux-specific buffer synchronization mechanism related to surfaces.
- «pointer-gestures» â manages input from touch screens.
- «pointer constraints» â pointer restrictions (blocking).
- «primary-selection» â similar to X11, enables the primary clipboard (primary selection), where information is typically pasted using the middle mouse button.
- «relative pointer events» â relative pointer events.
- «text-input» â organization of text input.
- «xdg-foreign» â interface for interaction with 'foreign' client surfaces.
- «xdg-decoration» â rendering of window decorations on the server side.
- «xdg-output» â additional information about video output (used for fractional scaling).
- «xwayland-keyboard-grab» â input capture in XWayland applications.
Additionally, the proposal from a Valve employee to add another phase to the promotion of new Wayland protocolsâ'experimental'âwas noted, which would lower the barrier for including protocols in the Wayland-Protocols set and accelerate their implementation. Currently, to move a protocol to the staging phase, a support team must be formed and a certain number of acknowledgments (ACK) from reviewers must be obtained. In 'experimental', it is proposed to accept protocols not through obtaining confirmations, but based on the absence of objections (NACK) within a two-week review period. If necessary, reviewers can also extend the discussion for another two weeks by marking the status as 'WAIT'.
In the 'experimental' phase, it is also proposed to allow changes that disrupt compatibility and the addition of 'raw' protocols that can gradually be refined to the appropriate level. Thus, the 'experimental' phase will facilitate quick submission of new protocol prototypes to developers, encourage their implementation in existing projects, and gather feedback from users. The proposed process should free protocol developers from lengthy discussions and red tape before being included in Wayland-Protocols. For instance, the protocols xdg-system-bell, fifo, and commit-timing, accepted in the current release, were discussed for over a year.
Source: opennet.ru
