September 20, 2016 - Bryce Harrington
What’s New in Wayland and Weston 1.12?
The 1.12 release of the Wayland core protocol and its reference compositor Weston will be later today; this post will give an overview of the major changes since the last release.
New Features and Improvements to Wayland
The Wayland core protocol documentation has received numerous refinements to improve its clarity and consistency. Along with this, many blank areas of the protocol documentation have been fleshed out.
A new wl_display_add_protocol logger API provides a new, interactive way to debug requests; along with this are new APIs for examining clients and their resources. This is analogous to using WAYLAND_DEBUG=1, but more powerful since it allows run time review of log data such as through a UI view.
There have been improvements to how the protocol XML scanner handles version identification in protocol headers. This enables better detection and fallback handling when compositors and clients support differt versions of their protocols.
New Features and Improvements to Weston
Weston’s internal code has been restructured into a new software library, libweston. This has been done primarily for other compositor efforts that want to more easily utilize Weston’s internal functionalities. Weston’s own compositor now uses this library.
Additionally, another new library named libweston-desktop provides an additional level of functionality relevant to compositors that are implementing a desktop metaphor style of graphical interface. This library API is designed around xdg_shell functionality, providing the handling of popups, window state, and interfacing with Xwayland.
Both libweston and libweston-desktop should be treated as unstable libraries (i.e. their APIs are subject to change). A versioning scheme has been adopted for their ABI provisioning to enable compile-time detection of breaks. This enables users to detect incompatibilities in their packaging system at install-time rather than when they try to actually use the software. The system is designed to help not only with released Weston components, but also to flag inconsistencies when using development snapshots of the libraries to help developers avoid problems due to inconsistencies too.
Support for the new version 6 of the xdg_shell protocol has been implemented in the Weston compositor, and all clients are ported to it. See the wayland-protocols 1.7 release notes for details on the included changes.
A pointer locking and confinement API has been implemented for Weston, using the wp_pointer_constraints protocol, to allow clients to define window regions to confine the pointer to. These regions can be irregular; a client is included to demonstrate confinement to a H-shaped region, for example. A relative pointer protocol (using wl_relative_pointer) has also been introduced that allows clients to continue receiving pointer movement deltas even when the pointer’s absolute position is clipped, such as on the edge of the monitor.
The Raspberry Pi backend (rpi-backend) and renderer have been dropped. This code was reliant on a proprietary driver stack, and proved not to be maintainable within Weston.
Taking a Look at the Numbers
Wayland 1.12 had 7 contributors who made 44 commits that changed 1,315 lines of code. The average time to commit was just over 8 days (based on the time difference between the author and commit dates).
There were a total of 19 contributors to version 1.12 of Weston, resulting in 243 commits and 25,844 changed lines of code. The average time to commit for the community was about 49.5 days. These numbers were pushed higher because of the series of patches that finally landed for version 6 of xdg_shell in late July that had been queuing up since version 5.
Looking Forward to 1.13
Further work can be expected on libweston and libweston-desktop to add polish and expand functionality. Weston’s EGL support has been receiving a fair amount of attention and the number of patches still under review suggest this will also be an area of continuing work.
With all the major desktop environments now implementing Wayland in their display servers, attention is notably focusing on compatibility issues. We can expect to see further work on new protocols to help smooth interoperation with legacy applications running under Xwayland.
A idle inhibition protocol has been under development for quite some time now, so it can be hoped that it will finally be accepted during the 1.13 cycle. This enables clients to prevent screen power savings from kicking on while giving presentations or watching videos.
The 1.13 release is expected to arrive some time in February 2017.
About Bryce Harrington
Bryce Harrington is a Senior Open Source Developer at the Samsung Open Source Group focusing on Open Source Graphics. Prior to Samsung, he lead Canonical, Ltd.'s Ubuntu X.org team, and focused on stabilization of the graphics and input infrastructures for the Ubuntu distribution. Bryce began his career in the aerospace industry as a spacecraft propulsions engineer at The Aerospace Corporation, Hughes Space and Communications and TRW. Later, he joined the Open Source Development Labs as a Senior Performance Engineer working on NFSv4 testing and development of automated test systems. He is a founder and developer of the Inkscape project and serves as Chairman of the Inkscape Board. Bryce has a BS-AE from USC and an MS-AE from Caltech.
Image Credits: Kristian Høgsberg