wlroots/tinywl
YaoBing Xiao 04501f8d8b types/scene: split wlr_scene into modular components
Refactor the scene graph implementation by splitting wlr_scene.c
into multiple focused units: buffer, node, rect and tree. Introduce
corresponding public headers for each component.

This reduces the size and complexity of the core scene file, improves
code organization and makes individual parts of the scene graph easier
to maintain and extend.

As part of this refactor, drop unnecessary pointer indirection when
passing scene trees (e.g. &scene->tree → scene->tree) and update all
call sites accordingly.

No functional changes intended.
2026-04-30 14:19:18 +08:00
..
.gitignore tinywl: Update .gitignore 2024-07-29 11:39:34 -04:00
LICENSE CC0 2018-08-15 19:17:20 -04:00
Makefile include: install internal render headers for external consumers 2026-04-27 19:45:44 +08:00
meson.build tinywl: stop generating xdg-shell header 2025-08-27 14:21:23 -04:00
README.md tinywl: remove outdated non-feature from README.md 2022-04-01 14:22:28 +00:00
tinywl.c types/scene: split wlr_scene into modular components 2026-04-30 14:19:18 +08:00

TinyWL

This is the "minimum viable product" Wayland compositor based on wlroots. It aims to implement a Wayland compositor in the fewest lines of code possible, while still supporting a reasonable set of features. Reading this code is the best starting point for anyone looking to build their own Wayland compositor based on wlroots.

Building TinyWL

TinyWL is disconnected from the main wlroots build system, in order to make it easier to understand the build requirements for your own Wayland compositors. Simply install the dependencies:

  • wlroots
  • wayland-protocols

And run make.

Running TinyWL

You can run TinyWL with ./tinywl. In an existing Wayland or X11 session, tinywl will open a Wayland or X11 window respectively to act as a virtual display. You can then open Wayland windows by setting WAYLAND_DISPLAY to the value shown in the logs. You can also run ./tinywl from a TTY.

In either case, you will likely want to specify -s [cmd] to run a command at startup, such as a terminal emulator. This will be necessary to start any new programs from within the compositor, as TinyWL does not support any custom keybindings. TinyWL supports the following keybindings:

  • Alt+Escape: Terminate the compositor
  • Alt+F1: Cycle between windows

Limitations

Notable omissions from TinyWL:

  • HiDPI support
  • Any kind of configuration, e.g. output layout
  • Any protocol other than xdg-shell (e.g. layer-shell, for panels/taskbars/etc; or Xwayland, for proxied X11 windows)
  • Optional protocols, e.g. screen capture, primary selection, virtual keyboard, etc. Most of these are plug-and-play with wlroots, but they're omitted for brevity.