This repo contains the results of my personal experiments with writing a first Wayland client.
The experiments are roughly based on an old Wayland Client Programming Tutorial,
but updated to use xdg_shell
instead of wl_shell
.
The main purpose of these experiments was to get a basic barebones client running that can at least create "a window".
Later I have extended these clients to experiment with the wlr screencopy and export-dmabuf protocols, and especially around how to handle DMA-BUFs.
CMake
pkg-config
wayland-client
wayland-egl
wayland-scanner
wayland-protocols
wlr-protocols
(git submodule)EGL
GLESv2
libdrm
libgbm
connect.c
: connect and disconnect to Waylandregistry.c
: list registered global interfaces, and get handle to compositorsurface.c
: create a surfacexdg_surface.c
: create an XDG surface and toplevelapplication.c
: create a shm pool and buffer, and configure the windowfractional_scale_checkerboard.c
: render a pixel checkerboard in a client that supports fractional scaleegl.c
: create an egl window and configure a window, rendering a yellow screenscreencopy_shm.c
: capture one frame with screencopy and display it using a shm bufferscreencopy_dmabuf.c
: capture one frame with screencopy and display it using a dmabuf bufferscreencopy_shm_egl.c
: capture one frame with screencopy using a shm buffer, upload it to egl, and display itscreencopy_dmabuf_egl.c
: capture one frame with screencopy using a dmabuf buffer, import it to egl, and display itexport_dmabuf.c
: capture one frame with export-dmabuf and display itexport_dmabuf_egl.c
: capture one frame with export-dmabuf, import it into egl, and display