How riverwm/river works
River is a Wayland compositor that deliberately delegates window-management policy to a separate process. Its principal workflow is: start the compositor, accept Wayland clients and a compatible window manager, then mediate window-management protocol events while providing rendering, input, shell surfaces, and optional Xwayland support. The README documents these capabilities; source excerpts were limited to logging and C headers, so detailed internal call wiring is not asserted.
Main entry points: Server.zig Compositor server · WindowManager.zig Window manager interface · Seat.zig Input seat · main.zig River entry point
Components 20
Runtime
- River entry point
river/main.zig - Compositor server
river/Server.zig
Window management
- Window-management protocol
protocol/river-window-management-v1.xml - Window manager interface
river/WindowManager.zig - Window surfaces
river/Window.zig - Management nodes
river/WmNode.zig
Rendering and input
- Output management
river/OutputManager.zig - Display output
river/Output.zig - Scene rendering
river/Scene.zig - Input management
river/InputManager.zig - Input seat
river/Seat.zig - Keyboard input
river/Keyboard.zig - Pointer and cursor
river/Cursor.zig
Protocol extensions
- Layer shell
river/LayerShell.zig - XKB configuration
river/XkbConfig.zig - XKB bindings
river/XkbBindings.zig
Xwayland
- Xwayland windows
river/XwaylandWindow.zig
Other components
- User
- Wayland clients
- Window manager
Connections 20
- User → River entry point: starts
- River entry point → Compositor server: initializes
- Wayland clients → Compositor server: connect to
- Window manager → Window manager interface: connects through
- Window manager interface → Window-management protocol: implements
- Compositor server → Window manager interface: mediates
- Compositor server → Window surfaces: manages surfaces
- Window manager interface → Management nodes: manages nodes
- Compositor server → Output management: provides outputs
- Output management → Display output: manages
- Compositor server → Scene rendering: renders scene
- Compositor server → Input management: handles input
- Input management → Input seat: coordinates devices
- Input seat → Keyboard input: dispatches input
- Input seat → Pointer and cursor: dispatches pointer
- Compositor server → Layer shell: supports shell surfaces
- Compositor server → XKB configuration: supports configuration
- Compositor server → XKB bindings: supports bindings
- Wayland clients → Xwayland windows: use X11 via
- Compositor server → Xwayland windows: supports