How wayland-mirror/wayland works
Wayland is both a compositor–client protocol and the C libraries that implement its transport and runtime. The main workflow is a client sending protocol requests and buffer-management messages to a compositor, which handles them and forwards relevant input events back to clients; clients render their own content. The repository also includes protocol-description tooling and optional cursor and EGL support. Internal relationships below are limited to README statements and source-index references or excerpts; some feature internals were not sampled.
Main entry points: wayland-client.c Client library · wayland-server.c Server library · connection.c Wire connection · wayland-util.c Protocol utilities
Components 14
Protocol
- Protocol definition
protocol/wayland.xml - Protocol scanner
src/scanner.c
Core runtime
- Client library
src/wayland-client.c - Server library
src/wayland-server.c - Wire connection
src/connection.c - Event loop
src/event-loop.c - Shared memory
src/wayland-shm.c
Client features
- Cursor themes
cursor/wayland-cursor.c - Xcursor loading
cursor/xcursor.c - EGL window support
egl/wayland-egl.c
Shared support
- Protocol utilities
src/wayland-util.c - OS compatibility
src/wayland-os.c
Other components
- Client app
- Compositor
Connections 16
- Client app → Client library: sends requests
README.md - Client library → Compositor: exchanges protocol
README.md - Compositor → Client library: forwards input
README.md - Compositor → Server library: uses library
README.md - Client library → Wire connection: uses transport
src/wayland-client.c - Server library → Wire connection: uses transport
src/wayland-server.c - Server library → Event loop: uses event loop
src/event-loop.c - Client library → Protocol utilities: uses utilities
src/wayland-client.c - Server library → Protocol utilities: uses utilities
src/wayland-server.c - Wire connection → Protocol utilities: uses utilities
src/connection.c - Wire connection → OS compatibility: uses OS helpers
src/connection.c - Event loop → OS compatibility: uses OS helpers
src/event-loop.c - Shared memory → OS compatibility: uses OS helpers
src/wayland-shm.c - Cursor themes → Xcursor loading: loads images
cursor/wayland-cursor.c - Cursor themes → Client library: creates buffers
cursor/wayland-cursor.c - EGL window support → Protocol utilities: uses utilities
egl/wayland-egl.c