Xfwl4 – The Roadmap for a Xfce Wayland Compositor

原始链接: https://alexxcons.github.io/blogpost_15.html

## Xfce 在 Wayland 上的未来:xfwl4 介绍 Xfce 团队宣布将资助开发者 Brian Tarricone 构建 **xfwl4**,一个全新的为 Xfce 设计的 Wayland 合成器,资金来源为社区捐赠。这是对 Xfce 未来的一项重大投资,旨在实现向 Wayland 的无缝过渡,同时保持当前 xfwm4 窗口管理器的熟悉感。 与之前尝试适配 xfwm4 不同,xfwl4 将使用 **Rust** 语言和 **smithay** 工具包进行完全重写。这可以加快开发速度,避免对现有的 X11 版本造成稳定性风险,并更好地处理 Wayland 不同的架构。Rust 的选择是基于其内存安全性和 Brian 的个人偏好。 该项目旨在实现与 xfwm4 的功能对等,包括重用现有的配置设置。关键任务包括适配 Wayland 会话启动,支持 XWayland 兼容性,以及升级构建系统以适应 Rust 代码。预计第一个开发版本将在 2026 年年中左右发布。 更多细节和进展可以在项目的 issue 和源代码中找到,问题可以在 #xfce-dev Matrix 频道中提出。

## Xfce Wayland 合成器路线图进展 Xfce 桌面环境的 Wayland 合成器新路线图已发布,引发了 Hacker News 上的讨论。目前,Xfce 缺乏原生 Wayland 支持,阻碍了那些优先考虑较新的显示协议的用户采用。 该项目将使用 Rust 进行完全重写,旨在吸引新的贡献者并提高稳定性——这对于 Wayland 环境至关重要。虽然一些用户表达了兴奋之情并呼吁向 Xfce 的 Open Collective 捐款,但另一些用户则对转向 Wayland 和 Rust 表示担忧,担心这会增加 Xfce 传统保守用户群的复杂性。 值得注意的是,目前可以使用像 Hyprland 这样的基于 wlroots 的合成器来运行 Xfce。然而,原生合成器有望实现更紧密的集成和更流畅的体验。该项目的成功取决于在保持 Xfce 轻量级性能和简洁性的核心原则的同时,实现创新。
相关文章

原文

Jan 27,2026

We, the Xfce team are excited to share some great news!

After careful consideration, we’ve decided on a meaningful way to use the generous donations from our community: funding longtime Xfce core developer Brian Tarricone to create xfwl4, a brand-new Wayland compositor for Xfce.

This initiative will utilize a significant portion of the project’s donated funds, but we believe it’s an important investment in Xfce’s future.

The goal is, that xfwl4 will offer the same functionality and behavior as xfwm4 does, or as much as possible considering the differences between X11 and Wayland. Using xfwl4 should feel just like using xfwm4 on X11. We even plan to reuse the existing xfwm4 configuration dialogs and xfconf settings to ensure a seamless transition.

Xfwl4 will not be based on the existing xfwm4 code. Instead, it will be written from scratch in rust, using smithay building blocks.

Why doing a rewrite?

The first attempt at creating an Xfce Wayland compositor involved modifying the existing xfwm4 code to support both X11 and Wayland in parallel. However, this approach turned out to be the wrong path forward for several reasons:

  • Xfwm4 is architected in a way that makes it very difficult to put the window management behavior behind generic interfaces that don't include X11 specifics.
  • Refactoring Xfwm4 is risky, since it might introduce new bugs to X11. Having two parallel code bases will allow for rapid development and experimentation with the Wayland compositor, with zero risk to break xfwm4.
  • Some X11 window management concepts just aren't available or supported by Wayland protocols at this time, and dealing with those differences can be difficult in an X11-first code base.
  • Using the existing codebase would require us to use C and wlroots, even if a better alternative is available.

Why to base xfwl4 on smithay?

Once the decision to write a compositor from scratch was done, the next major question was: Which Wayland support library to use as a base? In order to find an answer on that question Brian evaluated wlroots and smithay. The decision to use smithay as a base was done for the following reasons:

  • smithay supports most/all official Wayland protocol extensions, as well as the wlroots protocols and some KDE protocols.
  • smithay has no high level abstraction, as wlroots has. However, it allows for very deep customization of the graphics and input pipeline, as well as all aspects of Wayland protocol and desktop/shell handling.
  • smithay has great documentation.
  • Using rust makes it easier to avoid memory related bugs and decreases the chances of crashes, something that should never happen for a Wayland compositor.
  • Rather subjective: Brian has a strong preference to write code in rust over writing code in C.
  • wlroots is written in C, in a way which makes it very difficult to write wlroots rust bindings.

Scope of the project

Besides getting feature parity with xfwm4, the xfwl4 project scope includes as well some other related tasks:

  • Major changes to session-startup will be required, since on Wayland the compositor has to be the root of the session instead of xfce4-session.
  • Support for the xdg-session-management protocol is another goal.
  • As well support for XWayland is part of the roadmap.
  • The build system of the Xfce CI container will need to be upgraded in order to support building rust code via meson.

Brian has already started work on the project, so stay tuned for the first development release of xfwl4, which we hope to share around mid-year.

If you’re interested in the detailed reasoning behind the project or want to explore all the technical details, check out the issues and the work in progress source code.

For any questions related to xfwl4, please visit our Matrix channel #xfce-dev.

We’d like to extend our heartfelt thanks to our generous supporters on Open Collective US and Open Collective EU for making this project possible!

 

Best regards,

The Xfce development team

联系我们 contact @ memedata.com