After 6 months of development, the first preview release of the Xfwl4 composite server, which uses the Wayland protocol, is presented. Xfwl4 is written in Rust using the Smithay library. The reason for creating a new composite server is attributed to the unsuccessful attempt to implement simultaneous support for X11 and Wayland in the existing codebase of the xfwm4 window manager, which was originally designed with tight integration of the X11 protocol in mind, making it difficult to separate the common logic of window management from X11 specifics.
Xfwl4 is being developed from scratch and does not intersect with the codebase of the xfwm4 window manager, but aims to implement all the functionality present in xfwm4, including the possibility of using existing xfconf settings and the configuration interface, taking into account the specifics of using Wayland instead of X11. There are plans to bring Xfwl4's functionality to a level where the user can switch between Xfwl4 and xfwm4 without noticing any differences.
Among the extended features of Xfwl4 is a significant redesign of session management logic, the implementation of the Wayland protocol for xdg-session-management, and support for launching X11 applications using XWayland. The Xfwl4 code is distributed under the GPLv3 license (for comparison, the code of the xfwm4 window manager is distributed under GPLv2).
Xfwl4 is built on top of the Smithay library, which provides implementations of almost all official Wayland protocol extensions, as well as the wlroots and KDE protocols. Smithay is used in projects such as Cosmic and Niri. Similar to wlroots, the Smithay library provides high-level abstractions while allowing low-level system interventions and the adaptation of graphics output methods, input device handling, Wayland protocol behaviors, and desktop-related task processing. Rust was chosen for its difficulty in making memory-related errors and its reduction of issues that lead to crashes.
The project to gradually add Wayland support to xfwm4 has been abandoned due to concerns about stability and the introduction of new bugs during the refactoring process. It turned out to be simpler to keep xfwm4 tied to X11 while simultaneously developing a new composite server for Wayland. server The reasons for creating a new server It is also mentioned that some concepts of managing X11 windows cannot be adapted for Wayland, and there is a need to use the C language and the wlroots library if development of xfwm4 continues, despite better alternatives being available.
The first release of Xfwl4 is at an alpha quality level and does not implement all the intended functionality. Features that are not yet available in the first test release include:
- Mouse and touchpad settings dialog.
- Settings dialog. virtual desktops.
- Defining areas at the edges of the screen where window placement is excluded.
- Minimizing a window with an icon display and a menu shown when clicking the middle mouse button.
- Displaying thumbnails with the contents of virtual desktops in the panel.
- Key combinations for switching between applications and application windows.
- Restoring the previous window positions after restarting applications.
Source: opennet.ru
