Forge
Forge is the Eydos Wayland compositor, written in Rust on top of Smithay. It drives the same interface on a phone, a tablet, a laptop or a desktop, with touch and pointer input treated as equals.
Responsibilities
- Backends. Native KMS/DRM with GBM via udev on the device, and an optional winit window backend for development inside another desktop session.
- Rendering. A GLES2 renderer with damage tracking. KMS commit and vblank handling run on a dedicated per-device thread, separate from rendering.
- Input and gestures. libinput, touch grabs, an edge and corner gesture recogniser, app switcher and overview, hot-corner actions.
- Window management. Tiling and stacking layouts, server-side decorations, and XWayland for legacy X11 clients.
Choosing a layout for the screen
Forge decides, per output, whether the screen calls for the compact layout or the spacious one, and the shell and applications follow. The decision is made from the panel’s native density and logical size, not from the device it happens to be:
- A portrait-native panel at a scale of 2 or more is treated as a phone or tablet panel.
- A landscape panel is treated as compact only when its scale is 2 or more and its shortest side is under 600 logical pixels. A HiDPI laptop has the density but not the small logical size, so it gets the spacious layout.
The result is exported to every client as the FORGE_MOBILE environment variable. Setting it to 0 or 1 before launching Forge overrides the detection, and the IPC action set_mobile changes it at runtime.
Protocols
Placeholder. List the wlroots and ext protocols Forge implements and which ones Crustace relies on.