DRAGONFRUIT PROJECT Wayland compositor · Linux Codeberg repository ↗
dragonfruitWayland compositor

Architecture

Source layout and how the canvas fits into Mango

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.

SECTION 04 · Technical reference
Scope: Internals
Repository and source ↗

Subsystems

PathResponsibility
src/main.cStartup, 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.cGLSL canvas background
src/workspace_overview/Mango workspace overview with canvas hooks
src/ipc/ipc.cSocket 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.

← Previous

Wayland protocols

Next →

Commands