treelandis a Wayland compositor built onwlroots+ Qt6/QtQuick (Scene Graph rendering).wlrootsis vendored in-tree: upstream sources under3rdparty/wlroots, built as a CMake module bywlroots/CMakeLists.txt(CMake targetWlroots::wlroots). waylib talks to wlroots through its raw C API directly — include<wlr_all.h>, not individual<wlr/...>headers — and supplies the Qt/C++ object/lifetime layer (WObject/WServerInterface,WPointer, scopedwl_signallisteners).waylib/builds onwlrootsto provide a QtQuick-friendly compositor framework (outputs <->QQuickWindow, surfaces <->QQuickItem).- Treeland-specific policies live in
src/(workspace/seat/input/output, effects/plugins, XWayland integration).
src/core/: lifecycle + QML engine glue (for examplesrc/core/qmlengine.*,src/core/treeland.*).src/surface/: surface/window wrappers, state/visibility/geometry (for examplesrc/surface/surfacewrapper.cpp).src/seat/: compositor seat management,Helperinitialization hub, protocol wiring entry point (for examplesrc/seat/helper.*).src/workspace/: workspace model and switching.src/plugins/+src/modules/: integration points and feature composition.src/common/treelandlogging.*: centralized treeland logging categories.
cmake --preset ci
cmake --build --preset ci
ctest --preset ci- For daily development prefer the
cipreset: it mirrors CI's-Wall -Wextra -Werrorflags, so warnings that would fail CI are caught locally before push. Other presets inCMakePresets.json:default,clang,ci-clang. WITH_SUBMODULE_WAYLIB=ON|OFFselects submodule vs system waylib. Default preference isON.
- Use C++20 and Qt6 only.
- Prefer member function pointers over lambdas for
connect()and signal listeners when the lambda only forwards to a single member function. - Avoid complex lambdas; if a lambda body grows beyond a few lines, extract it into a named member function.
- Keep diffs minimal: touch only task-related files and symbols.
- Avoid broad refactors, unrelated renames, and unrelated reformatting.
- New source files must include an SPDX line consistent with this repo, typically
SPDX-License-Identifier: Apache-2.0 OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only. - Logging changes must use
.agents/skills/logging-guidelines/SKILL.md. - If real task work shows that a repo-local skill is wrong, outdated, or incomplete, update the skill proactively instead of preserving known-bad guidance.
When a task is about adding, modifying, or debugging a Wayland protocol integration, route it to exactly one of these skills:
- Treeland private protocol:
.agents/skills/treeland-private-wayland-protocol/SKILL.md - Upstream wlroots/waylib protocol:
.agents/skills/upstream-wayland-protocol-wrapper/SKILL.md
Do not mix the two paths in one implementation unless the task is explicitly about refactoring boundaries.