Hello, yesterday I officially released Louvre v1.0.0, a C++ library designed for building Wayland compositors with a primary focus on ease of development. It provides a default method for handling protocols, input events, and rendering, which you can selectively and progressively override as required, allowing you to see a functional compositor from day 1.

It supports multi-GPU setups, multi-session (TTY switching), and offers various rendering options, including a scene and view system that automatically repaints only the damaged (changing) regions during a frame. Because it uses multiple threads, it can maintain a high FPS rate with v-sync enabled when rendering complex scenarios. In contrast, single-threaded compositors often experience a rapid drop in FPS, for example, from 60 to 30 fps, due to “dead times” while waiting for a screen vblank, leading to the skipping of frames.

The library is freely available, open source, thoroughly documented, includes examples, and features a detailed tutorial.

You can find it here: https://github.com/CuarzoSoftware/Louvre

I hope it proves useful for you. If you decide to use it and encounter any doubts or wish to contribute to its development, please don’t hesitate to reach out.

Greetings!

  • LeFantome@programming.dev
    link
    fedilink
    arrow-up
    0
    ·
    1 year ago

    Many people have predicted the death of the small, independent window manager with the coming of Wayland. I have heard multiple times that only large projects like GNOME and KDE would be able to take on the burden of making a compositor.

    Now, I do think that lots of no longer actively developed window managers could get left behind. But the idea that it will be too complicated to create a window manager now is turning out to be wrong.

    First, fewer desktop environments are getting left behind than feared. XFCE, Cinnamon, and MATE all seem to have Wayland plans now.

    The big change is the appearance of not one but multiple compositor libraries designed to make it easier to create a window manager for Wayland. Some of them look like they might make it easier than it was under X. The approach taken by this one makes the idea of hacking around with it very inviting.

    Although having to create a compositor has made things difficultly until now, I think the idea of decoupling the compositor for Wayland is going to look smart in the long run.

    Being separate from Wayland, compositor devs are free to experiment and window manager authors can select the one that best maps to their goals.

    I was reading up on Oasis Linux yesterday. It comes with a Wayland compositor ( SWC ) and tiling window manager ( Velox ) that are less than 20,000 lines of code combined!

    It would not be practical for a light-weight distro to trim down Xorg like that. But I the compositor is separate, it can be either smaller or feature rich. SWC is XWayland compatible but obviously that is going to add more size if you need it.

    Looking forward to the window manager innovation that projects like Louvre enable.