wlroots-hyprland/tinywl
Kirill Primak c85838892d xdg-{shell,decoration}: improve events
This commit changes the behavior of `new_*` signals to better match
their names (see https://gitlab.freedesktop.org/wlroots/wlroots/-/issues/3608).
wlr_xdg_shell.events.new_surface is now emitted when an xdg_surface is
created, and wlr_xdg_shell.events.new_{toplevel,popup} events are
introduced to get notified when an xdg_{toplevel,popup} is created.
Same applies to
`wlr_xdg_decoration_manager_v1.events.new_toplevel_decoration`. As a
result, wlr_xdg_surface.added and wlr_xdg_toplevel_decoration_v1.added
are removed, as we no longer need to track whether the corresponding
event was emitted.

Additionally, this commit changes the behavior of
wlr_xdg_surface.events.destroy: it is now emitted when the xdg_surface
is destroyed, as the name suggests.
wlr_xdg_{toplevel,popup}.events.destroy events are added to get
notified when an xdg_{toplevel,popup} is destroyed.
2023-11-23 12:52:20 +00:00
..
.gitignore Tiny Wayland compositor 2018-08-15 18:27:48 -04:00
LICENSE CC0 2018-08-15 19:17:20 -04:00
Makefile build: bump version to 0.18.0-dev 2023-11-21 17:28:06 +01:00
README.md tinywl: remove outdated non-feature from README.md 2022-04-01 14:22:28 +00:00
meson.build tinywl: build with meson if examples option is enabled 2021-11-19 16:42:14 +00:00
tinywl.c xdg-{shell,decoration}: improve events 2023-11-23 12:52:20 +00:00

README.md

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.