Architecture
Dragonfruit keeps Mango's structure and adds the canvas on top of wlroots 0.20 and scenefx 0.5. Canvas code lives in src/layout/canvas*.c.
Subsystems
| Path | Responsibility |
|---|---|
src/main.c | Startup, backend, renderer, Wayland globals |
src/layout/ | Canvas, placement and packing (canvas.c, canvas_pack.c, canvas_precompute.c) |
src/manage/ | Windows, layers, monitors, drag and drop |
src/input/ | Keyboard, pointer, trackpad, touch, tablet |
src/config/ | Config parsing, TOML, file watching, error reporting |
src/draw/shader_bg.c | GLSL canvas background |
src/workspace_overview/ | Mango workspace overview with canvas hooks |
src/ipc/ipc.c | Socket used by dfmsg |
The canvas model
Windows have a position on the plane, separate from where they appear on screen. Each tag has its own camera (position and zoom). dfmsg get canvas shows the camera, viewport and content bounds, and each client reports canvas_x, canvas_y, canvas_width and canvas_height.
Upstream relationship
The canvas is the only layout in the layout table. Mango's tiling source files remain in the tree, so that upstream merges stay simple.