swc: A small compositor framework

Michael Forney mforney at mforney.org
Thu Jan 23 15:57:08 PST 2014


I've been working on a Wayland compositor off and on for around a year
now, and I think I'm now at the point where others might find it useful.

swc[0] is implemented as a library, with an API[1] suitable for creating
a window manager. It was designed primarily with tiling window managers
in mind. Currently, it cannot move or resize windows with the mouse, so
as of now, perhaps it is only usable by tiling window managers. This
also means that unless you want to write the window manager piece, it
might be tricky to try out.

swc is by no means as feature-complete as weston. Most of this is
intentional, but there are a few things that remain to be completed:

    - No clipboard integration with xwayland
    - Window state transitions still need work
    - No DPMS support
    - No monitor arrangement/positioning

libswc itself is currently under 6k SLOC, and is also fairly lightweight
in terms of dependencies: wayland, libdrm, libevdev, libxkbcommon,
pixman, wld.

Optionally, libudev can be used to support hotplugging of input devices,
and xcb/xcb-util-wm can be used for xwayland support.

One big difference between swc and many other compositors is that swc
does not use OpenGL or EGL to do the actual compositing. In fact, it has
no dependency on mesa at all. Instead, it does copies and fills using my
basic drawing library, wld[2]. However, this means that currently, if
you don't have an Intel GPU, compositing will fall back to using dumb
buffers and pixman (though, if you are interested in the project and
have knowledge about nouveau or radeon, I welcome patches!). I also may
implement an OpenGL backend in the future.

There is a bit more general information in the README.md file in the git

Last but not least, everyone likes demo videos, right?


All clients featured in the video are native Wayland clients except for
chromium and xclock.

Any comments or questions are welcome. You can also find me on freenode
under the nick tridactyla.

[0]: https://github.com/michaelforney/swc
[1]: https://github.com/michaelforney/swc/blob/master/libswc/swc.h
[2]: https://github.com/michaelforney/wld

Michael Forney <mforney at mforney.org>

More information about the wayland-devel mailing list