Commit Graph

1278 Commits

Author SHA1 Message Date
rewine 27d5c8cc73 chore(debian): update version to 0.7.6
Log: new version
2025-10-30 20:26:03 +08:00
April & May & June 3bf30e97e5 fix: Put Treeland at the first place for session selection
Treeland should be the first candidate of session selection, this commit ensures that.
2025-10-30 20:25:26 +08:00
rewine 29ac51b15e refactor: replace PopupSurfaceContainer with SurfaceContainer for popup
handling

Changed m_popupContainer from PopupSurfaceContainer to SurfaceContainer
to fix tooltip damage issue caused by PR #428. This is a temporary
fix while a better solution for handling popup click events is being
developed.

Log: Fixed tooltip display issues by changing popup container
implementation

Influence:
1. Test tooltip display functionality across different applications
2. Verify popup windows and menus still work correctly
3. Check for any regression in popup interaction behavior
4. Test various popup types including context menus and tooltips
5. Verify z-ordering of popup elements remains correct

refactor: 将弹出窗口容器从 PopupSurfaceContainer 替换为 SurfaceContainer

将 m_popupContainer 从 PopupSurfaceContainer 改为 SurfaceContainer,以修
复 PR #428 导致的工具提示损坏问题。这是一个临时修复方案,同时正在开发更
好的弹出窗口点击事件处理方案。

Log: 通过更改弹出窗口容器实现修复了工具提示显示问题

Influence:
1. 测试不同应用程序中的工具提示显示功能
2. 验证弹出窗口和菜单是否仍能正常工作
3. 检查弹出窗口交互行为是否有回归问题
4. 测试各种弹出类型,包括上下文菜单和工具提示
5. 验证弹出元素的 Z 轴排序是否保持正确
2025-10-30 18:50:54 +08:00
Lu YaNing f50669edc6 refactor: implement atomic multi-output configuration
- Use WOutputRenderWindow interface for output configuration
- Complete output state management with all properties
- Ensure settings only saved when configuration succeeds
2025-10-30 10:51:03 +08:00
YaoBing Xiao 04791bc889 fix: occasional crash during recording toplevel
WSurfaceEntent::surface may be nullptr, use
WSGTextureProvider::qwBuffer.

Fixes: linuxdeepin/treeland#603

Log
2025-10-24 16:46:17 +08:00
JiDe Zhang 1866331471 fix: use safeConnect for aboutToBeInvalidated
The WSurface's `aboutToBeInvalidated` signal connection was incorrectly
using `QObject::connect` instead of `safeConnect`. This could lead
to issues when the WSurface object is modified using `setSurface`,
as the previous object's `aboutToBeInvalidated` signal would not be
disconnected, potentially causing a crash or unexpected behavior. This
change replaces the regular `QObject::connect` with `safeConnect` to
ensure proper disconnection and avoid potential issues when the surface
is replaced.

Influence:
1. Test replacing a WSurface multiple times with different WSurface
objects using `setSurface`.
2. Verify that the `releaseResources` function is only called when the
current WSurface is truly invalidated and not prematurely.
3. Observe application behavior under heavy WSurface replacement
scenarios to ensure stability and prevent crashes.

fix: 使用 safeConnect 连接 aboutToBeInvalidated 信号

WSurface 的 `aboutToBeInvalidated` 信号连接错误地使用了
`QObject::connect` 而不是 `safeConnect`。当使用 `setSurface` 修改
WSurface 对象时,这可能导致问题,因为前一个对象的 `aboutToBeInvalidated`
信号不会断开,可能导致崩溃或意外行为。此更改将常规的 `QObject::connect`
替换为 `safeConnect`,以确保正确断开连接并避免在表面替换时出现潜在问题。

Influence:
1. 使用 `setSurface` 多次用不同的 WSurface 对象替换 WSurface。
2. 验证 `releaseResources` 函数仅在当前 WSurface 真正失效时才被调用,而
不是过早调用。
3. 观察在大量 WSurface 替换场景下的应用程序行为,以确保稳定并防止崩溃。
2025-10-24 13:57:27 +08:00
transifex-integration[bot] f7e4a195c6
i18n: Updates for project TreeLand (#601)
* [skip CI] Translate wallpaper.en_US.ts in sq

91% of minimum 10% translated source file: 'wallpaper.en_US.ts'
on 'sq'.

Sync of partially translated files: 
untranslated content is included with an empty translation 
or source language content depending on file format

* [skip CI] Translate lockscreen.en_US.ts in sq

95% of minimum 10% translated source file: 'lockscreen.en_US.ts'
on 'sq'.

Sync of partially translated files: 
untranslated content is included with an empty translation 
or source language content depending on file format

* [skip CI] Translate lockscreen.en_US.ts in sq

100% translated source file: 'lockscreen.en_US.ts'
on 'sq'.

* [skip CI] Translate multitaskview.en_US.ts in sq

100% translated source file: 'multitaskview.en_US.ts'
on 'sq'.

* [skip CI] Translate treeland.en_US.ts in sq

100% translated source file: 'treeland.en_US.ts'
on 'sq'.

---------

Log:
2025-10-21 10:42:49 +08:00
April & May & June 8aa33384f2 refactor: Convert Session to shared_ptr and simplify session lifecycle
使用 shared_ptr 管理 Session 生命周期并简化会话管理

This commit refactors the session management system to use shared_ptr
for automatic memory management and improves session visibility handling:

本次提交重构了会话管理系统,使用 shared_ptr 进行自动内存管理,
并改进了会话可见性处理:

Changes:
- Convert Session* to std::shared_ptr<Session> throughout codebase
- Change m_activeSession to std::weak_ptr to prevent circular references
- Remove manual delete calls for Session objects (automatic cleanup)
- Simplify session switching logic in updateActiveUserSession()
- Add lastActivatedSurface tracking per session
- Remove applySurfaceVisibility() - now handled in updateVisible()
- Update surface visibility check to use surfaceBelongsToCurrentSession()
- Add proper socket enable/disable on session switch
- Restore last activated surface when switching sessions

变更内容:
- 将 Session* 转换为 std::shared_ptr<Session>
- 将 m_activeSession 改为 std::weak_ptr 以防止循环引用
- 移除手动 delete Session 对象的调用(自动清理)
- 简化 updateActiveUserSession() 中的会话切换逻辑
- 为每个会话添加 lastActivatedSurface 跟踪
- 移除 applySurfaceVisibility() - 现在在 updateVisible() 中处理
- 更新表面可见性检查以使用 surfaceBelongsToCurrentSession()
- 在会话切换时正确启用/禁用 socket
- 切换会话时恢复上次激活的表面

Benefits:
- Eliminates memory leaks from manual Session management
- Safer pointer handling with shared_ptr/weak_ptr
- Per-session surface activation state preservation
- More efficient visibility updates (per-surface vs recursive walk)

优点:
- 消除手动 Session 管理导致的内存泄漏
- 使用 shared_ptr/weak_ptr 更安全的指针处理
- 保留每个会话的表面激活状态
- 更高效的可见性更新(按表面更新而非递归遍历)
2025-10-21 10:09:17 +08:00
April & May & June bbdbc40a94 chore: Remove unused code & Add document
This commit removed unused code and add document / comment to newly
added functions
2025-10-21 10:09:17 +08:00
April & May b2661a3d86 feat: Manage per-user Wayland/XWayland sessions via Helper::Session
- add `Session` struct and store `QList<Session*> m_sessions`
- create / reuse a `WSocket` + `WXWayland` pair per uid in
`ensureSession`

通过 Helper::Session 管理每个用户的 Wayland / XWayland 会话

- 添加 `Session` 结构体,并用 `QList<Session*> m_sessions` 保存所有会话
- 在 `ensureSession` 中为每个 uid 创建或复用一对 `WSocket` + `WXWayland`
2025-10-21 10:09:17 +08:00
April & May 6547558cc7 feat: Add per-user XWayland session management
- Track each WXWayland instance by uid so every session gets its own
XWayland socket
- Hide/show XWayland surfaces when switching users to prevent previous
windows leaking

为不同用户管理独立的 XWayland 会话

- 为每个 uid 记录 WXWayland 实例,实现按用户隔离的 XWayland socket
- 切换用户时自动隐藏/显示对应的 XWayland 窗口,避免旧会话窗口外泄
2025-10-21 10:09:17 +08:00
JiDe Zhang 66193ba1bc chore: add ASAN environment variables
Add AddressSanitizer (ASAN) environment variables to the treeland
systemd service file. This aids in debugging memory-related issues
within treeland, particularly when running with ASAN enabled. The
`ASAN_SYMBOLIZER_PATH` variable points to the llvm-symbolizer, enabling
symbolization of ASAN reports. The `ASAN_OPTIONS` variable configures
ASAN to log its output to a specific file (`/tmp/treeland-asan`),
disables leak detection (due to false positives in some environments),
enables immediate abortion on error, and enables symbolization within
the log file. This change facilitates easier debugging of memory
corruption and other ASAN-detectable errors.

Influence:
1. Verify that ASAN logs are generated in the specified log file when
ASAN is enabled.
2. Ensure that the ASAN logs contain symbolized stack traces.
3. Confirm that treeland aborts when memory errors are detected with
ASAN enabled.

chore: 添加 ASAN 环境变量

将 AddressSanitizer (ASAN) 环境变量添加到 treeland systemd 服务文件中。
这有助于调试 treeland 中与内存相关的问题,尤其是在启用 ASAN 的情况下。
`ASAN_SYMBOLIZER_PATH` 变量指向 llvm-symbolizer,从而可以对 ASAN 报告
进行符号化。`ASAN_OPTIONS` 变量配置 ASAN 将其输出记录到特定文件 (`/tmp/
treeland-asan`),禁用泄漏检测(由于某些环境中的误报),在发生错误时立即
中止,并启用日志文件中的符号化。此更改有助于更轻松地调试内存损坏和其他
ASAN 可检测到的错误。

Influence:
1. 验证启用 ASAN 后,是否在指定的日志文件中生成 ASAN 日志。
2. 确保 ASAN 日志包含符号化的堆栈跟踪。
3. 确认在启用 ASAN 的情况下检测到内存错误时,treeland 会中止。
2025-10-16 21:36:37 +08:00
JiDe Zhang 5bde9683eb feat: Expose XWayland surface process ID
This change addresses the issue where the client process ID associated
with an XWayland surface could not be directly obtained through
`WClient`. Previously, accessing the `WClient` of an XWayland
surface always returned the XWayland process itself. To resolve
this, two virtual functions, `pid()` and `pidFD()`, have been added
to the `WObject` class and overridden in `WXWaylandSurface`. These
functions allow retrieving the actual PID and PID file descriptor
of the XWayland window's client. The `pidFD` is obtained by using
`syscall(SYS_pidfd_open, pid(), 0)`. This approach enables correct
identification of the client process owning the XWayland surface.

Influence:
1. Verify that the `pid()` function on a `WXWaylandSurface` object
returns the correct process ID of the client application, not the
XWayland process.
2. Confirm that `pidFD()` returns a valid file descriptor for the client
application's PID. Check the returned file descriptor is valid.
3. Ensure that these new functions do not negatively impact other parts
of the Waylib codebase.
4. Test multiple XWayland applications to ensure consistent and accurate
PID retrieval.
5. Test on different platforms to ensure `syscall(SYS_pidfd_open, pid(),
0)` is working correctly, and fallback gracefully if not.

feat: 暴露 XWayland surface 进程 ID

此更改解决了无法通过 `WClient` 直接获取与 XWayland surface 关联的客户
端进程 ID 的问题。 以前,访问 XWayland surface 的 `WClient` 始终返回
XWayland 进程本身。 为了解决这个问题,我们在 `WObject` 类中添加了两个虚
函数 `pid()` 和 `pidFD()`,并在 `WXWaylandSurface` 中重写了它们。 这些函
数允许检索 XWayland 窗口客户端的实际 PID 和 PID 文件描述符。 `pidFD` 通
过使用 `syscall(SYS_pidfd_open, pid(), 0)` 获得。 这种方法可以正确识别拥
有 XWayland surface 的客户端进程。

Influence:
1. 验证 `WXWaylandSurface` 对象上的 `pid()` 函数返回客户端应用程序的正确
进程 ID,而不是 XWayland 进程。
2. 确认 `pidFD()` 为客户端应用程序的 PID 返回有效的文件描述符。 检查返回
的文件描述符是否有效。
3. 确保这些新函数不会对 Waylib 代码库的其他部分产生负面影响。
4. 测试多个 XWayland 应用程序,以确保一致且准确的 PID 检索。
5. 在不同平台上进行测试,以确保 `syscall(SYS_pidfd_open, pid(), 0)` 正常
工作,如果不能正常工作,则优雅地回退。
2025-10-16 14:09:51 +08:00
JiDe Zhang ca8de83d47 chore: change Debian build environment to unstable
The Debian build environment in the CI workflows for both qwlroots and
waylib has been changed from `experimental` to `unstable`. This change
was necessary because the `experimental` environment was proving to
be unstable, frequently causing CI failures. Debian `unstable` is more
reliable and now provides wlroots 0.19 which meets the required version.
The apt sources in the build workflows have been updated to reflect
this change.

Influence:
1. Monitor CI build stability for both qwlroots and waylib on the Debian
unstable environment.
2. Verify that the builds are successful and that the required
dependencies, including wlroots 0.19, are correctly installed.
3. Check for any compatibility issues introduced by the change in the
build environment.

chore: 更改 Debian 构建环境为 unstable

qwlroots 和 waylib 的 CI 工作流程中的 Debian 构建环境已从 `experimental`
更改为 `unstable`。 这一更改是必要的,因为 `experimental` 环境被证明不
稳定,经常导致 CI 失败。 Debian `unstable` 更加可靠,现在提供 wlroots
0.19,满足了所需的版本。 构建工作流程中的 apt 源已更新以反映此更改。

Influence:
1. 监控 Debian unstable 环境上 qwlroots 和 waylib 的 CI 构建稳定性。
2. 验证构建是否成功,以及是否正确安装了所需的依赖项,包括 wlroots 0.19。
3. 检查构建环境更改引入的任何兼容性问题。
2025-10-16 13:28:04 +08:00
JiDe Zhang 5af6a3903d refactor: remove branch filter for workflow triggers
This commit removes the branch filters from the `on` triggers in several
GitHub workflow files. Specifically, the `branches: - master` filter has
been removed from the `push` and `pull_request` triggers in `.github/
workflows/qwlroots-archlinux-build.yml`, `.github/workflows/qwlroots-
debian-build.yml`, `.github/workflows/treeland-archlinux-build.yml`,
`.github/workflows/waylib-archlinux-build.yml`, and `.github/workflows/
waylib-debian-build.yml`.

This change ensures that the workflows are triggered for all branches,
including feature branches and release branches, rather than being
limited to the `master` branch. This provides better coverage for
automated builds and tests whenever changes are pushed or a pull request
is created against *any* branch.  This is important as the project
evolves beyond relying solely on master and introduces feature branches,
ensuring consistent CI across development.

Influence:
1. Verify that all workflows trigger correctly on pushes and pull
requests for all branches, not just master.
2. Create a pull request to a new branch and ensure that all relevant
workflows are triggered.
3. Push a commit to a new branch and verify that all relevant workflows
are triggered.

重构: 移除工作流程触发器的分支筛选器

此提交从多个 GitHub 工作流程文件的 `on` 触发器中删除了分支筛选器。
具体来说,已从 `.github/workflows/qwlroots-archlinux-build.yml`、
`.github/workflows/qwlroots-debian-build.yml`、`.github/workflows/
treeland-archlinux-build.yml`、`.github/workflows/waylib-archlinux-
build.yml` 和 `.github/workflows/waylib-debian-build.yml` 中的 `push` 和
`pull_request` 触发器中删除 `branches: - master` 筛选器。

此更改确保工作流程在所有分支(包括功能分支和发布分支)上触发,而不是仅限
于 `master` 分支。 无论何时推送更改或针对*任何*分支创建拉取请求,这都为
自动构建和测试提供了更好的覆盖范围。 这一点很重要,因为项目的发展不仅仅
依赖于 master,还引入了功能分支,确保了整个开发过程中的持续集成。

Influence:
1. 验证所有工作流程是否在所有分支(不仅仅是 master)的推送和拉取请求上正
确触发。
2. 创建一个到新分支的拉取请求,并确保所有相关的工作流程都被触发。
3. 将提交推送到一个新分支,并验证所有相关的工作流程是否被触发。
2025-10-15 15:49:41 +08:00
JiDe Zhang f6af3a539f fix: fix build when treeland examples are enabled
Fixes a build failure that occurs when Treeland examples are enabled,
specifically in higher versions of Qt6. The issue arises because certain
private Qt modules (like `WaylandClientPrivate`) are not automatically
included and need to be explicitly specified using `find_package`.
Failing to do so results in linker errors during the build process. This
change ensures that the necessary private modules are found, allowing
the examples to compile successfully.

Influence:
1. Build the `test_multitaskview` example with Treeland examples
enabled.
2. Verify that the build completes without any errors related to missing
Qt private modules.
3. Confirm that the compiled example runs correctly.

fix: 修复开启 treeland 示例时构建失败的问题

修复了在 Qt6 的较高版本中,启用 Treeland 示例时发生的构建失败。 出现此问
题的原因是某些私有 Qt 模块(如 `WaylandClientPrivate`)不会自动包含,需
要使用 `find_package` 显式指定。 否则,会导致构建过程中出现链接器错误。
此更改确保找到必要的私有模块,从而使示例能够成功编译。

Influence:
1. 在启用 Treeland 示例的情况下构建 `test_multitaskview` 示例。
2. 验证构建是否完成,并且没有与缺少的 Qt 私有模块相关的任何错误。
3. 确认编译后的示例可以正确运行。
2025-10-14 12:20:06 +08:00
JiDe Zhang 3f03884083 fix: fix build failure on Arch Linux
The build was failing on Arch Linux due to an upgrade to Qt 6.10.
This version of Qt requires explicitly finding the private modules
(QuickPrivate, WaylandClientPrivate). This commit updates the
CMakeLists.txt files in the affected directories (src/, src/treeland-
shortcut/, waylib/examples/tinywl/, and waylib/src/server/) to
explicitly find these private modules. It also updates the minimum
required Qt version in some waylib CMakeLists.txt files to 6.8 to align
with the actual required version.

修复了在 Arch Linux 上的构建失败

由于升级到 Qt 6.10,导致在 Arch Linux 上的构建失败。 此版本的 Qt 需要显
式查找私有模块(QuickPrivate, WaylandClientPrivate)。 此提交更新了受影
响目录(src/、src/treeland-shortcut/、waylib/examples/tinywl/ 和 waylib/
src/server/)中的 CMakeLists.txt 文件,以显式查找这些私有模块。 它还在一
些 waylib CMakeLists.txt 文件中更新了最低要求的 Qt 版本到 6.8,以与实际
要求的版本保持一致。
2025-10-14 09:49:03 +08:00
April & May 777e0f2a7b fix: Disable minimize / maximize animation for window that doesn't belongs to current user
This should work as intended
2025-10-09 09:56:50 +08:00
April & May 7c11939015 fix: fix private module inclusion on lower version of Qt
GuiPrivate and QuickPrivate cannot be found under Qt <= 6.8. This commit should work as intended.
2025-10-09 09:56:13 +08:00
Felix Yan 4827731cfc fix: compile errors on Arch for forward declared class
`TreelandConfig` became a forward declaration on
fa1e1e6a18 which breaks moc compilation on
Arch with the following errors. Let's use `Q_MOC_INCLUDE` like the
others to workaround it. Note that `Q_DECLARE_OPAQUE_POINTER` should be
avoided here because `TreelandConfig` is a `Q_OBJECT`.

```
[585/700] Building CXX object src/CMakeFiles/libtreeland.dir/libtreeland_autogen/mocs_compilation.cpp.o
FAILED: src/CMakeFiles/libtreeland.dir/libtreeland_autogen/mocs_compilation.cpp.o
/usr/bin/c++ -DDDECLARATIVE_TRANSLATIONS_DIR=\"dtk6/DDeclarative/translations\" -DDSG_DATA_DIR=\"/usr/share/dsg\" -DDSYSINFO_PREFIX=\"\" -DDTK_QML_APP_PLUGIN_PATH=\"/usr/lib/dtk6declarative/qml-app\" -DDTK_QML_APP_PLUGIN_SUBPATH=\"dtkdeclarative/plugins\" -DPREFIX=\"/usr\" -DQT_CONCURRENT_LIB -DQT_CORE_LIB -DQT_DBUS_LIB -DQT_FORCE_ASSERTS -DQT_GUI_LIB -DQT_MESSAGELOGCONTEXT -DQT_NETWORK_LIB -DQT_NO_DEBUG -DQT_OPENGL_LIB -DQT_QMLINTEGRATION_LIB -DQT_QMLMETA_LIB -DQT_QMLMODELS_LIB -DQT_QMLWORKERSCRIPT_LIB -DQT_QML_LIB -DQT_QUICKCONTROLS2_LIB -DQT_QUICK_LIB -DQT_XML_LIB -DTREELAND_COMPONENTS_TRANSLATION_DIR=\"/usr/share/treeland/translations\" -DTREELAND_DATA_DIR=\"/usr/share/treeland\" -DTREELAND_PLUGINS_INSTALL_PATH=\"/usr/lib/treeland/plugins\" -DTREELAND_PLUGINS_OUTPUT_PATH=\"/build/treeland/src/treeland/lib/plugins\" -DWLR_USE_UNSTABLE -Dlibtreeland_EXPORTS -I/build/treeland/src/treeland/src -I/build/treeland/src/treeland/src/libtreeland_autogen/include -I/build/treeland/src/treeland/protocols -I/build/treeland/src/treeland/src/config -I/build/treeland/src/treeland/src/core -I/build/treeland/src/treeland/src/effects -I/build/treeland/src/treeland/src/greeter -I/build/treeland/src/treeland/src/input -I/build/treeland/src/treeland/src/interfaces -I/build/treeland/src/treeland/src/output -I/build/treeland/src/treeland/src/seat -I/build/treeland/src/treeland/src/surface -I/build/treeland/src/treeland/src/workspace -I/build/treeland/src/treeland/src/utils -I/build/treeland/src/treeland/src/wallpaper -I/build/treeland/src/treeland/waylib/src/server/kernel -I/build/treeland/src/treeland/waylib/src/server/qtquick -I/build/treeland/src/treeland/waylib/src/server/qtquick/private -I/build/treeland/src/treeland/waylib/src/server/utils -I/build/treeland/src/treeland/waylib/src/server/protocols -I/build/treeland/src/treeland/waylib/src/server/protocols/private -I/build/treeland/src/treeland/waylib/qwlroots/src/generate -I/build/treeland/src/treeland/qwlroots/src -I/build/treeland/src/treeland/qwlroots/src/render -I/build/treeland/src/treeland/qwlroots/src/types -I/build/treeland/src/treeland/qwlroots/src/util -I/build/treeland/src/treeland/qwlroots/src/interfaces -I/build/treeland/src/treeland/src/modules/foreign-toplevel -I/build/treeland/src/treeland/src/modules/primary-output -I/build/treeland/src/treeland/src/modules/personalization -I/build/treeland/src/treeland/src/modules/shortcut -I/build/treeland/src/treeland/src/modules/wallpaper-color -I/build/treeland/src/treeland/src/modules/window-management -I/build/treeland/src/treeland/src/modules/virtual-output -I/build/treeland/src/treeland/src/modules/dde-shell -I/build/treeland/src/treeland/src/modules/capture -I/build/treeland/src/treeland/src/modules/item-selector -I/build/treeland/src/treeland/src/modules/ddm -isystem /usr/include/qt6/QtQml/6.9.2 -isystem /usr/include/qt6/QtQml/6.9.2/QtQml -isystem /usr/include/qt6/QtCore/6.9.2 -isystem /usr/include/qt6/QtCore/6.9.2/QtCore -isystem /usr/include/qt6/QtCore -isystem /usr/include/qt6 -isystem /usr/lib/qt6/mkspecs/linux-g++ -isystem /usr/include/qt6/QtQml -isystem /usr/include/qt6/QtQmlIntegration -isystem /usr/include/qt6/QtNetwork -isystem /usr/include/dtk6/DCore -isystem /usr/include/qt6/QtDBus -isystem /usr/include/qt6/QtXml -isystem /usr/include/dtk6/DLog -isystem /usr/include/dtk6/DDeclarative -isystem /usr/include/qt6/QtQuick -isystem /usr/include/qt6/QtGui -isystem /usr/include/qt6/QtQmlMeta -isystem /usr/include/qt6/QtQmlModels -isystem /usr/include/qt6/QtQmlWorkerScript -isystem /usr/include/qt6/QtOpenGL -isystem /usr/include/dtk6/DGui -isystem /usr/include/dtk6/DSystemSettings -isystem /usr/include/wlroots-0.19 -isystem /usr/include/pixman-1 -isystem /usr/include/libdrm -isystem /usr/include/qt6/QtQuickControls2 -isystem /usr/include/qt6/QtQuick/6.9.2 -isystem /usr/include/qt6/QtQuick/6.9.2/QtQuick -isystem /usr/include/qt6/QtGui/6.9.2 -isystem /usr/include/qt6/QtGui/6.9.2/QtGui -isystem /usr/include/qt6/QtQmlModels/6.9.2 -isystem /usr/include/qt6/QtQmlModels/6.9.2/QtQmlModels -isystem /usr/include/qt6/QtQmlMeta/6.9.2 -isystem /usr/include/qt6/QtQmlMeta/6.9.2/QtQmlMeta -isystem /usr/include/qt6/QtQmlWorkerScript/6.9.2 -isystem /usr/include/qt6/QtQmlWorkerScript/6.9.2/QtQmlWorkerScript -isystem /usr/include/qt6/QtConcurrent -isystem /usr/include/ddm/auth -isystem /usr/include/ddm/common -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fexceptions         -Wp,-D_FORTIFY_SOURCE=3 -Wformat -Werror=format-security         -fstack-clash-protection -fcf-protection         -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -Wp,-D_GLIBCXX_ASSERTIONS -g -ffile-prefix-map=/build/treeland/src=/usr/src/debug/treeland -flto=auto -std=gnu++20 -fPIC -mno-direct-extern-access -MD -MT src/CMakeFiles/libtreeland.dir/libtreeland_autogen/mocs_compilation.cpp.o -MF src/CMakeFiles/libtreeland.dir/libtreeland_autogen/mocs_compilation.cpp.o.d -o src/CMakeFiles/libtreeland.dir/libtreeland_autogen/mocs_compilation.cpp.o -c /build/treeland/src/treeland/src/libtreeland_autogen/mocs_compilation.cpp
In file included from /usr/include/qt6/QtCore/qobject.h:18,
                 from /usr/include/qt6/QtCore/qabstractanimation.h:8,
                 from /usr/include/qt6/QtCore/QtCore:19,
                 from /usr/include/qt6/QtQmlIntegration/QtQmlIntegrationDepends:3,
                 from /usr/include/qt6/QtQmlIntegration/QtQmlIntegration:3,
                 from /build/treeland/src/treeland/waylib/src/server/kernel/wglobal.h:8,
                 from /build/treeland/src/treeland/waylib/src/server/qtquick/wsurfaceitem.h:6,
                 from /build/treeland/src/treeland/src/surface/surfacewrapper.h:5,
                 from /build/treeland/src/treeland/src/surface/surfacecontainer.h:5,
                 from /build/treeland/src/treeland/src/libtreeland_autogen/TAC5DWH4SE/../../core/lockscreen.h:6,
                 from /build/treeland/src/treeland/src/libtreeland_autogen/TAC5DWH4SE/moc_lockscreen.cpp:9,
                 from /build/treeland/src/treeland/src/libtreeland_autogen/mocs_compilation.cpp:2:
/usr/include/qt6/QtCore/qmetatype.h: In instantiation of ‘constexpr bool QtPrivate::checkTypeIsSuitableForMetaType() [with X = TreelandConfig*]’:
/usr/include/qt6/QtCore/qmetatype.h:2661:43:   required from ‘constexpr const QtPrivate::QMetaTypeInterface* QtPrivate::qTryMetaTypeInterfaceForType() [with Unique = void; T = TreelandConfig*]’
 2661 |         checkTypeIsSuitableForMetaType<Ty>();
      |         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~
/usr/include/qt6/QtCore/qtmochelpers.h:170:51:   required from ‘static constexpr void QtMocHelpers::detail::MetaTypeList<TypeMustBeComplete, T>::copyTo(Result&, uint&) [with Unique = void; Result = QtMocHelpers::MetaObjectContents<255, 112, 807, 45>; bool TypeMustBeComplete = true; T = {TreelandConfig*}; uint = unsigned int]’
  170 |                 qTryMetaTypeInterfaceForType<U, T>()...
      |                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~
/usr/include/qt6/QtCore/qtmochelpers.h:262:65:   required from ‘constexpr const QtMocHelpers::MetaObjectContents<255, 112, 807, 45> Helper::qt_staticMetaObjectContent<{anonymous}::qt_meta_tag_ZN6HelperE_t>’
  262 |             decltype(input.metaTypes())::template copyTo<Unique>(result, metatypeoffset);
      |             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~
/build/treeland/src/treeland/src/libtreeland_autogen/LTNFY7LWQW/../../seat/helper.h:106:5:   required from ‘constexpr const auto Helper::qt_staticMetaObjectStaticContent<{anonymous}::qt_meta_tag_ZN6HelperE_t>’
  106 |     Q_OBJECT
      |     ^~~~~~~~
/build/treeland/src/treeland/src/libtreeland_autogen/LTNFY7LWQW/moc_helper.cpp:217:5:   required from here
  217 |     qt_staticMetaObjectStaticContent<qt_meta_tag_ZN6HelperE_t>.stringdata,
      |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/build/treeland/src/treeland/src/libtreeland_autogen/LTNFY7LWQW/../../seat/helper.h:106:5:   in ‘constexpr’ expansion of ‘Helper::qt_create_metaobjectdata<{anonymous}::qt_meta_tag_ZN6HelperE_t>()’
/build/treeland/src/treeland/src/libtreeland_autogen/LTNFY7LWQW/moc_helper.cpp:212:54:   in ‘constexpr’ expansion of ‘QtMocHelpers::metaObjectData<Helper, void, StringRefStorage<char [7], char [12], char [5], char [14], char [5], char [21], char [1], char [21], char [24], char [22], char [18], char [18], char [19], char [28], char [16], char [16], char [8], char [16], char [7], char [21], char [36], char [8], char [28], char [14], char [17], char [18], char [6], char [13], char [10], char [16], char [11], char [10], char [12], char [15], char [14], char [14], char [22], char [15], char [11], char [11], char [21], char [18], char [14], char [17], char [10], char [11], char [7], char [16], char [21], char [5], char [10], char [12], char [7], char [11], char [13], char [14]>, UintData<SignalData<void()>, SignalData<void()>, SignalData<void()>, SignalData<void()>, SignalData<void()>, SignalData<void()>, SignalData<void()>, SignalData<void()>, SlotData<void(SurfaceWrapper*, Qt::FocusReason)>, SlotData<void(SurfaceWrapper*)>, SlotData<void(SurfaceWrapper*, Qt::FocusReason)>, SlotData<void(SurfaceWrapper*)>, SlotData<void(SurfaceWrapper*)>, SlotData<bool(SurfaceWrapper*)>, SlotData<void()>, SlotData<void()>, SlotData<void(bool)>, SlotData<void(const QString&, const QDBusObjectPath&)>, MethodData<void()>, MethodData<bool(Waylib::Server::WLayerSurface*) const> >, UintData<PropertyData<bool>, PropertyData<RootSurfaceContainer*>, PropertyData<float>, PropertyData<Helper::OutputMode>, PropertyData<TogglableGesture*>, PropertyData<TogglableGesture*>, PropertyData<SurfaceWrapper*>, PropertyData<Workspace*>, PropertyData<TreelandConfig*>, PropertyData<bool> >, UintData<EnumData<Helper::OutputMode, 2>, EnumData<Helper::CurrentMode, 4> >, UintData<>, ClassInfos<2> >(0, qt_stringData, qt_methods, qt_properties, qt_enums, qt_constructors, qt_classinfo)’
/usr/include/qt6/QtCore/qtmochelpers.h:550:39:   in ‘constexpr’ expansion of ‘(& properties)->QtMocHelpers::UintData<QtMocHelpers::PropertyData<bool>, QtMocHelpers::PropertyData<RootSurfaceContainer*>, QtMocHelpers::PropertyData<float>, QtMocHelpers::PropertyData<Helper::OutputMode>, QtMocHelpers::PropertyData<TogglableGesture*>, QtMocHelpers::PropertyData<TogglableGesture*>, QtMocHelpers::PropertyData<SurfaceWrapper*>, QtMocHelpers::PropertyData<Workspace*>, QtMocHelpers::PropertyData<TreelandConfig*>, QtMocHelpers::PropertyData<bool> >::copyTo<void, QtMocHelpers::MetaObjectContents<255, 112, 807, 45> >(result, ((size_t)dataoffset), metatypeoffset)’
/usr/include/qt6/QtCore/qtmochelpers.h:255:21:   in ‘constexpr’ expansion of ‘((const QtMocHelpers::UintData<QtMocHelpers::PropertyData<bool>, QtMocHelpers::PropertyData<RootSurfaceContainer*>, QtMocHelpers::PropertyData<float>, QtMocHelpers::PropertyData<Helper::OutputMode>, QtMocHelpers::PropertyData<TogglableGesture*>, QtMocHelpers::PropertyData<TogglableGesture*>, QtMocHelpers::PropertyData<SurfaceWrapper*>, QtMocHelpers::PropertyData<Workspace*>, QtMocHelpers::PropertyData<TreelandConfig*>, QtMocHelpers::PropertyData<bool> >*)this)->QtMocHelpers::UintData<QtMocHelpers::PropertyData<bool>, QtMocHelpers::PropertyData<RootSurfaceContainer*>, QtMocHelpers::PropertyData<float>, QtMocHelpers::PropertyData<Helper::OutputMode>, QtMocHelpers::PropertyData<TogglableGesture*>, QtMocHelpers::PropertyData<TogglableGesture*>, QtMocHelpers::PropertyData<SurfaceWrapper*>, QtMocHelpers::PropertyData<Workspace*>, QtMocHelpers::PropertyData<TreelandConfig*>, QtMocHelpers::PropertyData<bool> >::data.QtMocHelpers::detail::UintDataStorage<std::integer_sequence<int, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9>, QtMocHelpers::PropertyData<bool>, QtMocHelpers::PropertyData<RootSurfaceContainer*>, QtMocHelpers::PropertyData<float>, QtMocHelpers::PropertyData<Helper::OutputMode>, QtMocHelpers::PropertyData<TogglableGesture*>, QtMocHelpers::PropertyData<TogglableGesture*>, QtMocHelpers::PropertyData<SurfaceWrapper*>, QtMocHelpers::PropertyData<Workspace*>, QtMocHelpers::PropertyData<TreelandConfig*>, QtMocHelpers::PropertyData<bool> >::forEach<QtMocHelpers::UintData<QtMocHelpers::PropertyData<bool>, QtMocHelpers::PropertyData<RootSurfaceContainer*>, QtMocHelpers::PropertyData<float>, QtMocHelpers::PropertyData<Helper::OutputMode>, QtMocHelpers::PropertyData<TogglableGesture*>, QtMocHelpers::PropertyData<TogglableGesture*>, QtMocHelpers::PropertyData<SurfaceWrapper*>, QtMocHelpers::PropertyData<Workspace*>, QtMocHelpers::PropertyData<TreelandConfig*>, QtMocHelpers::PropertyData<bool> >::copyTo<void, QtMocHelpers::MetaObjectContents<255, 112, 807, 45> >(QtMocHelpers::MetaObjectContents<255, 112, 807, 45>&, size_t, uint&) const::<lambda(const auto:60&)> >(<lambda closure object>QtMocHelpers::UintData<QtMocHelpers::PropertyData<bool>, QtMocHelpers::PropertyData<RootSurfaceContainer*>, QtMocHelpers::PropertyData<float>, QtMocHelpers::PropertyData<Helper::OutputMode>, QtMocHelpers::PropertyData<TogglableGesture*>, QtMocHelpers::PropertyData<TogglableGesture*>, QtMocHelpers::PropertyData<SurfaceWrapper*>, QtMocHelpers::PropertyData<Workspace*>, QtMocHelpers::PropertyData<TreelandConfig*>, QtMocHelpers::PropertyData<bool> >::copyTo<void, QtMocHelpers::MetaObjectContents<255, 112, 807, 45> >(QtMocHelpers::MetaObjectContents<255, 112, 807, 45>&, size_t, uint&) const::<lambda(const auto:60&)>{ptr, dataoffset, payloadoffset, (* & metatypeoffset), (* & result)})’
/usr/include/qt6/QtCore/qtmochelpers.h:204:19:   in ‘constexpr’ expansion of ‘invoke.QtMocHelpers::detail::UintDataStorage<std::integer_sequence<int, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9>, QtMocHelpers::PropertyData<bool>, QtMocHelpers::PropertyData<RootSurfaceContainer*>, QtMocHelpers::PropertyData<float>, QtMocHelpers::PropertyData<Helper::OutputMode>, QtMocHelpers::PropertyData<TogglableGesture*>, QtMocHelpers::PropertyData<TogglableGesture*>, QtMocHelpers::PropertyData<SurfaceWrapper*>, QtMocHelpers::PropertyData<Workspace*>, QtMocHelpers::PropertyData<TreelandConfig*>, QtMocHelpers::PropertyData<bool> >::forEach<QtMocHelpers::UintData<QtMocHelpers::PropertyData<bool>, QtMocHelpers::PropertyData<RootSurfaceContainer*>, QtMocHelpers::PropertyData<float>, QtMocHelpers::PropertyData<Helper::OutputMode>, QtMocHelpers::PropertyData<TogglableGesture*>, QtMocHelpers::PropertyData<TogglableGesture*>, QtMocHelpers::PropertyData<SurfaceWrapper*>, QtMocHelpers::PropertyData<Workspace*>, QtMocHelpers::PropertyData<TreelandConfig*>, QtMocHelpers::PropertyData<bool> >::copyTo<void, QtMocHelpers::MetaObjectContents<255, 112, 807, 45> >(QtMocHelpers::MetaObjectContents<255, 112, 807, 45>&, size_t, uint&) const::<lambda(const auto:60&)> >(QtMocHelpers::UintData<QtMocHelpers::PropertyData<bool>, QtMocHelpers::PropertyData<RootSurfaceContainer*>, QtMocHelpers::PropertyData<float>, QtMocHelpers::PropertyData<Helper::OutputMode>, QtMocHelpers::PropertyData<TogglableGesture*>, QtMocHelpers::PropertyData<TogglableGesture*>, QtMocHelpers::PropertyData<SurfaceWrapper*>, QtMocHelpers::PropertyData<Workspace*>, QtMocHelpers::PropertyData<TreelandConfig*>, QtMocHelpers::PropertyData<bool> >::copyTo<void, QtMocHelpers::MetaObjectContents<255, 112, 807, 45> >(QtMocHelpers::MetaObjectContents<255, 112, 807, 45>&, size_t, uint&) const::<lambda(const auto:60&)>&&) const::<lambda(const auto:59&)>(((const QtMocHelpers::detail::UintDataStorage<std::integer_sequence<int, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9>, QtMocHelpers::PropertyData<bool>, QtMocHelpers::PropertyData<RootSurfaceContainer*>, QtMocHelpers::PropertyData<float>, QtMocHelpers::PropertyData<Helper::OutputMode>, QtMocHelpers::PropertyData<TogglableGesture*>, QtMocHelpers::PropertyData<TogglableGesture*>, QtMocHelpers::PropertyData<SurfaceWrapper*>, QtMocHelpers::PropertyData<Workspace*>, QtMocHelpers::PropertyData<TreelandConfig*>, QtMocHelpers::PropertyData<bool> >*)this)->QtMocHelpers::detail::UintDataStorage<std::integer_sequence<int, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9>, QtMocHelpers::PropertyData<bool>, QtMocHelpers::PropertyData<RootSurfaceContainer*>, QtMocHelpers::PropertyData<float>, QtMocHelpers::PropertyData<Helper::OutputMode>, QtMocHelpers::PropertyData<TogglableGesture*>, QtMocHelpers::PropertyData<TogglableGesture*>, QtMocHelpers::PropertyData<SurfaceWrapper*>, QtMocHelpers::PropertyData<Workspace*>, QtMocHelpers::PropertyData<TreelandConfig*>, QtMocHelpers::PropertyData<bool> >::QtMocHelpers::detail::UintDataEntry<8, QtMocHelpers::PropertyData<TreelandConfig*> >)’
/usr/include/qt6/QtCore/qtmochelpers.h:201:67:   in ‘constexpr’ expansion of ‘(& f)->QtMocHelpers::UintData<QtMocHelpers::PropertyData<bool>, QtMocHelpers::PropertyData<RootSurfaceContainer*>, QtMocHelpers::PropertyData<float>, QtMocHelpers::PropertyData<Helper::OutputMode>, QtMocHelpers::PropertyData<TogglableGesture*>, QtMocHelpers::PropertyData<TogglableGesture*>, QtMocHelpers::PropertyData<SurfaceWrapper*>, QtMocHelpers::PropertyData<Workspace*>, QtMocHelpers::PropertyData<TreelandConfig*>, QtMocHelpers::PropertyData<bool> >::copyTo<void, QtMocHelpers::MetaObjectContents<255, 112, 807, 45> >(QtMocHelpers::MetaObjectContents<255, 112, 807, 45>&, size_t, uint&) const::<lambda(const auto:60&)>(entry.QtMocHelpers::detail::UintDataEntry<8, QtMocHelpers::PropertyData<TreelandConfig*> >::entry)’
/usr/include/qt6/QtCore/qmetatype.h:1209:55: error: static assertion failed: Pointer Meta Types must either point to fully-defined types or be declared with Q_DECLARE_OPAQUE_POINTER(T *)
 1209 |             static_assert(is_complete<Pointed, void>::value,
      |                                                       ^~~~~
/usr/include/qt6/QtCore/qmetatype.h:1209:55: note: ‘std::integral_constant<bool, false>::value’ evaluates to false
/usr/include/qt6/QtCore/qmetatype.h: In instantiation of ‘constexpr bool QtPrivate::checkTypeIsSuitableForMetaType() [with X = TreelandConfig]’:
/usr/include/qt6/QtCore/qmetatype.h:2678:49:   required from ‘static constexpr QMetaType QMetaType::fromType() [with T = TreelandConfig]’
 2678 |     QtPrivate::checkTypeIsSuitableForMetaType<T>();
      |     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~
/usr/include/qt6/QtCore/qtmochelpers.h:559:88:   required from ‘constexpr auto QtMocHelpers::metaObjectData(uint, const Strings&, const Methods&, const Properties&, const Enums&, const Constructors&, const ClassInfo&) [with ObjectType = TreelandConfig; Unique = {anonymous}::qt_meta_tag_ZN14TreelandConfigE_t; Strings = StringRefStorage<char [15], char [15], char [752], char [16], char [20], char [19], char [4], char [23], char [1], char [20], char [7], char [24], char [13], char [4], char [9], char [6], char [19], char [24], char [19], char [23], char [18], char [23], char [25], char [24], char [27], char [23], char [12], char [16], char [27], char [28], char [21], char [18], char [20], char [37], char [16], char [38], char [40], char [32], char [36], char [37], char [31], char [35], char [37], char [26], char [20], char [18], char [18], char [17], char [28], char [24], char [21], char [20], char [23], char [28], char [34], char [28], char [28], char [20], char [19], char [15], char [8], char [15], char [26], char [31], char [26], char [30], char [25], char [30], char [32], char [31], char [34], char [30], char [19], char [23], char [34], char [35], char [28], char [25], char [27], char [44], char [23], char [45], char [47], char [39], char [43], char [44], char [38], char [42], char [44], char [33], char [27], char [25], char [25], char [24], char [35], char [31], char [28], char [27], char [30], char [35], char [41], char [35], char [35], char [12], char [17], char [12], char [16], char [11], char [16], char [18], char [17], char [20], char [16], char [5], char [9], char [20], char [21], char [14], char [11], char [13], char [30], char [9], char [31], char [33], char [25], char [29], char [30], char [24], char [28], char [30], char [19], char [13], char [11], char [11], char [10], char [21], char [17], char [14], char [13], char [16], char [21], char [27], char [21], char [21]>; Methods = UintData<SignalData<void(Dtk::Core::DConfig*)>, SignalData<void(Dtk::Core::DConfig*)>, SignalData<void(const QString&, const QVariant&)>, SignalData<void()>, SignalData<void()>, SignalData<void()>, SignalData<void()>, SignalData<void()>, SignalData<void()>, SignalData<void()>, SignalData<void()>, SignalData<void()>, SignalData<void()>, SignalData<void()>, SignalData<void()>, SignalData<void()>, SignalData<void()>, SignalData<void()>, SignalData<void()>, SignalData<void()>, SignalData<void()>, SignalData<void()>, SignalData<void()>, SignalData<void()>, SignalData<void()>, SignalData<void()>, SignalData<void()>, SignalData<void()>, SignalData<void()>, SignalData<void()>, SignalData<void()>, SignalData<void()>, SignalData<void()>, SignalData<void()>, SignalData<void()>, SignalData<void()>, SignalData<void()>, SignalData<void()>, SignalData<void()>, SignalData<void()>, SignalData<void()>, SignalData<void()>, SignalData<void()>, SignalData<void()>, MethodData<Dtk::Core::DConfig*() const>, MethodData<bool() const>, MethodData<bool() const>, MethodData<bool() const>, MethodData<QList<QString>() const>, MethodData<bool(const QString&) const>, MethodData<bool() const>, MethodData<bool() const>, MethodData<bool() const>, MethodData<bool() const>, MethodData<bool() const>, MethodData<bool() const>, MethodData<bool() const>, MethodData<bool() const>, MethodData<bool() const>, MethodData<bool() const>, MethodData<bool() const>, MethodData<bool() const>, MethodData<bool() const>, MethodData<bool() const>, MethodData<bool() const>, MethodData<bool() const>, MethodData<bool() const>, MethodData<bool() const>, MethodData<bool() const>, MethodData<bool() const>, MethodData<bool() const>, MethodData<bool() const>, MethodData<bool() const>, MethodData<bool() const>, MethodData<bool() const>, MethodData<bool() const>, MethodData<bool() const>, MethodData<bool() const>, MethodData<bool() const>, MethodData<bool() const>, MethodData<bool() const>, MethodData<bool() const>, MethodData<bool() const>, MethodData<bool() const>, MethodData<bool() const>, MethodData<bool() const>, MethodData<bool() const>, MethodData<bool() const>, MethodData<bool() const>, MethodData<bool() const>, MethodData<bool() const> >; Properties = UintData<PropertyData<QString>, PropertyData<long long int>, PropertyData<bool>, PropertyData<long long int>, PropertyData<long long int>, PropertyData<QString>, PropertyData<QString>, PropertyData<long long int>, PropertyData<long long int>, PropertyData<long long int>, PropertyData<QString>, PropertyData<long long int>, PropertyData<bool>, PropertyData<long long int>, PropertyData<QString>, PropertyData<QString>, PropertyData<long long int>, PropertyData<long long int>, PropertyData<QString>, PropertyData<long long int>, PropertyData<long long int>, PropertyData<long long int>, PropertyData<long long int>, PropertyData<long long int>, PropertyData<double>, PropertyData<double>, PropertyData<long long int>, PropertyData<long long int>, PropertyData<long long int>, PropertyData<bool>, PropertyData<bool>, PropertyData<QString>, PropertyData<long long int>, PropertyData<long long int>, PropertyData<long long int>, PropertyData<long long int>, PropertyData<long long int>, PropertyData<long long int>, PropertyData<long long int>, PropertyData<long long int>, PropertyData<long long int> >; Enums = UintData<>; Constructors = UintData<>; ClassInfo = ClassInfos<3>; uint = unsigned int]’
  559 |     result.relocatingData.metaTypes[metatypeoffset++] = QMetaType::fromType<ObjectType>().iface();
      |                                                         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~
/build/treeland/src/treeland/src/libtreeland_autogen/EWIEGA46WW/moc_treelandconfig.cpp:482:91:   required from here
  482 |     return QtMocHelpers::metaObjectData<TreelandConfig, qt_meta_tag_ZN14TreelandConfigE_t>(QMC::MetaObjectFlag{}, qt_stringData,
      |            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  483 |             qt_methods, qt_properties, qt_enums, qt_constructors, qt_classinfo);
      |             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/qt6/QtCore/qmetatype.h:1203:51: error: static assertion failed: Meta Types must be fully defined
 1203 |         static_assert(is_complete<T, void>::value || std::is_void_v<T>,
      |                                             ~~~~~~^~~~~~~~~~~~~~~~~~~~
/usr/include/qt6/QtCore/qmetatype.h:1203:51: note: ‘(((bool)std::integral_constant<bool, false>::value) || ((bool)std::is_void_v<TreelandConfig>))’ evaluates to false
```
2025-10-09 09:55:27 +08:00
JiDe Zhang 232cf374c2 fix: include Qt private modules for Qt 6.11
This commit explicitly includes `GuiPrivate` and `QuickPrivate` Qt
modules in `CMakeLists.txt` for both the `waylib` and `waylib/src/
server` directories. This is necessary because Qt 6.11 and later
versions no longer implicitly include these private modules. Failing
to include them results in build failures due to missing headers and
symbols.

Log: Fixed build issue with Qt 6.11 and later versions by explicitly
including necessary private Qt modules.

Influence:
1. Verify that the project builds successfully with Qt versions 6.11
and later.
2. Ensure that all functionalities relying on Qt private modules
(e.g., custom QML components, internal Qt API usage) continue to work
as expected.
3. Test on different platforms (Linux, Windows, macOS) where Qt is used.

fix: 为 Qt 6.11 包含 Qt 私有模块

此提交在 `waylib` 和 `waylib/src/server` 目录的 `CMakeLists.txt` 中显式
包含 `GuiPrivate` 和 `QuickPrivate` Qt 模块。 这是必要的,因为 Qt 6.11
及更高版本不再隐式包含这些私有模块。 未能包含它们会导致由于缺少头文件和
符号而导致构建失败。

Log: 通过显式包含必要的私有 Qt 模块,修复了 Qt 6.11 及更高版本的构建
问题。

Influence:
1. 验证项目是否可以使用 Qt 6.11 及更高版本成功构建。
2. 确保所有依赖于 Qt 私有模块的功能(例如,自定义 QML 组件、内部 Qt API
使用)继续按预期工作。
3. 在使用 Qt 的不同平台(Linux、Windows、macOS)上进行测试。
2025-09-29 20:33:10 +08:00
Lu YaNing 16240cba52 feat: add real-time FPS display
Introduces an on-screen FPS overlay with timer-based sampling aligned
to the active screen’s refresh rate. automatic refresh-rate handling
on screen changes.
2025-09-26 11:04:13 +08:00
April & May 8fdd5703a6 feat: support start sessions other than treeland
This commit fixed the SessionModel and SessionList, and enabled session
selection by adding a button to ControlAction.qml. Thus treeland can act
as a greeter of ddm, guide the start of other desktop environment.
2025-09-26 10:33:25 +08:00
miruku d9cd9e855d feat: implement ext-session-lock-v1 support
This commit adds support for the ext-session-lock-v1 protocol to
Treeland compositor.

The implementation allows for a grace delay of 300ms for client to
properly setup locking surfaces before sending locking.
The implementation also disables animation for locking triggered by
ext-session-lock-v1.
When the lock is abandoned, if lockscreen plugin is loaded, treeland
automaticly replace lock surfaces with that provided by the plugin.
If else, the session will remain locked forever.

Implementation Details:
1. lockscreen.cpp: extend the LockScreen class to handle locking
initiated by WSessionLock object.
2. qmlengine: add a fallback LockScreen of solid grey color, in case
if the locking client erronously deleted a lock surface before unlock.
3. treeland.cpp: allow loading the lockscreen plugin without DDM support.
4. output.cpp: allow session lock surfaces to ignore exclusive zones.
5. helper.cpp: attaches WSessionLockManager and handle screen lock logics.
6. surfacewrapper.cpp: added the LockScreen type to SurfaceWrapper
2025-09-26 10:23:25 +08:00
miruku 84379d1ca5 feat(waylib): implement ext-session-lock-v1 protocol support
This commit adds support for the Wayland ext-session-lock-v1 protocol.

1. Added Class
    - WSessionLockManager
    - WSessionLock
    - WSessionLockSurface

2. Implementation Details
Lifecycle of WSessionLock is managed by the WSessionLockManager.

Lifecycle of WSessionLockSurface is managed by its WSessionLock.

WSessionLock handles identification of all possible states a session lock
object can experiance, they are listed as follows:
- Created: default state
- Locked: session locked (after send_locked() is sent)
- Unlocked: client sent unlock_and_destroy()
- Finished: locking denyed by server sending finish()
- Canceled: lock destroyed by client before send_locked() is sent
- Abandoned: lock abnormally destroyed by client after locking

3. tinywl
An example usage is provided in the updated tinywl compositor.
2025-09-26 10:23:25 +08:00
miruku 0544ca405a fix(waylib): Add missing override specifier in wlayersurface
This commit added the override specifier for waylandClient() and
instantRelease() methods in class WLayerSurfacePirvate.

waylandClient() is a virtual function in class WObjectPrivate,
instantRelease() is a virtual function in clas WWrapObjectPrivate.
2025-09-26 10:23:25 +08:00
miruku b10c1f427b fix(qwlroots): allow server side destruction of qw_session_lock_v1
This commit exposes wlr_session_lock_v1_destroy as
qw_session_lock_v1::destroy(), which allows the compositor
to send finished() event on an ext_session_lock_v1 object.

qw_session_lock_v1 objects are not the owner of their handles,
thus cannot be properly destroyed via operator delete. Exposing
the destroy() method as public is necessary.

According to wayland protocol, compositor should have the ability
to deny a session lock request.
2025-09-26 10:23:25 +08:00
Lu YaNing 5b4d7b5de5 fix: Delete useless display text in copy mode
Remove debug display text in copy mode
2025-09-26 10:01:53 +08:00
Lu YaNing e843122e9e fix: enhance output validation in restore copy mode
Add invalid output detection to prevent crashes
2025-09-26 10:01:53 +08:00
April & May f4386256ca fix: use separate TreelandConfig for each user
This should work as intended.
2025-09-24 15:30:16 +08:00
JiDe Zhang b0601f90d1 fix: Ensure proper object destruction before app exit
This commit addresses an issue where the application would fail with
an assertion failure related to `qw_buffer` objects not being properly
released upon exiting the application. The previous implementation
directly called `QCoreApplication::exit` or `QCoreApplication::quit`,
which would trigger the destruction of various `QObject` instances
(such as `Helper` and `QmlEngine`) *after* the Qt event loop had already
exited.

Since many of these objects relied on `deleteLater` for their
destruction, and `deleteLater` calls are ineffective once the event loop
has terminated, these objects were not being fully destructed, leading
to resource leaks and the aforementioned assertion failure.

The solution involves ensuring that all necessary objects are
explicitly destroyed *before* calling `QCoreApplication::exit` or
`QCoreApplication::quit`.  Specifically:

1.  A `quit()` method has been added to the `Treeland` class, which
disconnects the object from all signals and slots, and then resets the
`d_ptr` (unique pointer to the private implementation) to ensure all
Treeland related objects are properly deleted. This cleanup happens
before calling `qApp->quit()`.
2.  The signal connection between `QQmlEngine::quit` and
`QCoreApplication::quit` is changed to a `Qt::QueuedConnection` to avoid
potential issues when the quit call originates from within an event
handler (e.g., a cursor button press/release event).
3.  A new signal `requestQuit()` is introduced in `Helper` and emitted
instead of directly calling `qApp->quit()`.  This signal is then
connected to the `Treeland::quit()` method using `Qt::QueuedConnection`.
4.  In the `tinywl` example, the `QmlEngine` object is now
dynamically allocated and explicitly deleted before `app.exit()`
is called. The `Helper::requestQuit` signal is also connected to
`QmlEngine::deleteLater`.

These changes ensure that all relevant objects have been properly
cleaned up before the application terminates, resolving the assertion
failure and preventing potential resource leaks.

Influence:
1. Verify that the application exits cleanly without any assertion
failures related to `qw_buffer` or other resources.
2. Test exiting the application using various methods (e.g., the window
close button, a menu item, or a keyboard shortcut).
3. Ensure that all application data is saved correctly before exiting.
4. Test that the `LockScreen` object is properly destroyed by manually
creating and destroying a LockScreen object with the setLockScreenImpl
call in Helper.

修复程序退出前对象未正确销毁的问题

此提交修复了应用程序退出时,由于 `qw_buffer` 对象未正确释放而导
致的断言失败问题。 之前的实现直接调用 `QCoreApplication::exit` 或
`QCoreApplication::quit`,导致各种 `QObject` 实例(例如 `Helper` 和
`QmlEngine`)在 Qt 事件循环结束后才被销毁。

由于许多这些对象依赖于 `deleteLater` 进行销毁,并且一旦事件循环终止,
`deleteLater` 调用将无效,因此这些对象没有被完全销毁,从而导致资源泄漏和
前面提到的断言失败。

解决方案包括确保在调用 `QCoreApplication::exit` 或
`QCoreApplication::quit` 之前显式销毁所有必要的对象。 具体来说:

1.  在 `Treeland` 类中添加了一个 `quit()` 方法,该方法断开对象与所有
信号和槽的连接,然后重置 `d_ptr`(指向私有实现的唯一指针),以确保与
Treeland 相关的所有对象都得到正确删除。 此清理发生在调用 `qApp->quit()`
之前。
2.  `QQmlEngine::quit` 和 `QCoreApplication::quit` 之间的信号连接已更改
为 `Qt::QueuedConnection`,以避免在退出调用源自事件处理程序内(例如,光
标按钮按下/释放事件)时出现潜在问题。
3.  在 `Helper` 中引入了一个新的信号 `requestQuit()`,并发出该信号而不是
直接调用 `qApp->quit()`。 然后使用 `Qt::QueuedConnection` 将此信号连接到
`Treeland::quit()` 方法。
4. 在`tinywl`示例中,`QmlEngine` 对象现在是动态分配的,并在调
用 `app.exit()` 之前显式删除。 `Helper::requestQuit` 信号也连接到
`QmlEngine::deleteLater`。

这些更改确保在应用程序终止之前已正确清理所有相关对象,从而解决了断言失败
并防止了潜在的资源泄漏。

Influence:
1. 验证应用程序是否干净地退出,而不会出现与 `qw_buffer` 或其他资源相关的
任何断言失败。
2. 使用各种方法(例如,窗口关闭按钮、菜单项或键盘快捷键)测试退出应用
程序。
3. 确保在退出之前正确保存所有应用程序数据。
4. 通过使用 Helper 中的 setLockScreenImpl 调用手动创建和销毁 LockScreen
对象来测试 LockScreen 对象是否已正确销毁。
2025-09-24 11:38:46 +08:00
JiDe Zhang 801e2fbf24 fix: improve resource management for RenderControl
1.  Changed the destruction timing of RenderControl. Using deleteLater()
on RenderControl caused a crash when OpenGL makeCurrent() was called.
This is because the RenderControl was being deleted in a deferred
manner, potentially after the OpenGL context was already being used
or destroyed.
2.  Switched to immediate deletion of RenderControl in the
WOutputRenderWindow destructor to avoid the crash.
3.  Modified WBufferRenderer to use std::unique_ptr for buffer
management to ensure timely unlocking.

Influence:
1.  Verify that applications using WOutputRenderWindow do not crash
on shutdown.
2.  Check resource usage related to graphics buffers to ensure proper
allocation and deallocation.
3.  Run performance tests to ensure that the change in deletion timing
does not negatively impact rendering performance.
4.  Test the texture provider to verify the buffer is handled correctly.

fix: 改善 RenderControl 的资源管理

1.  更改了 RenderControl 的销毁时机。在 RenderControl 上使用
deleteLater() 会导致调用 OpenGL makeCurrent() 时崩溃。这是因为
RenderControl 以延迟方式被删除,可能在 OpenGL 上下文已经被使用或销毁
之后。
2.  切换到在 WOutputRenderWindow 析构函数中立即删除 RenderControl,以避
免崩溃。
3.  修改 WBufferRenderer 以使用 std::unique_ptr 进行缓冲区管理,以确保及
时解锁。

Influence:
1.  验证使用 WOutputRenderWindow 的应用程序在关闭时不会崩溃。
2.  检查与图形缓冲区相关的资源使用情况,以确保正确分配和释放。
3.  运行性能测试以确保删除时机的变化不会对渲染性能产生负面影响。
4.  测试纹理提供程序以验证缓冲区是否已正确处理。
2025-09-24 11:38:46 +08:00
JiDe Zhang 5d16c8cada fix: fix heap-use-after-free on exit
The WQuickCursor was using a raw pointer to WCursor, which could be
accessed after the WCursor object had been destroyed during application
shutdown, leading to a heap-use-after-free error. This change replaces
the raw pointer with a QPointer, ensuring that the WQuickCursor only
accesses the WCursor object if it is still valid.

Influence:
1. Run the application and exit to ensure no heap-use-after-free error
occurs.
2. Test cursor functionalities to ensure they still work as expected.

fix: 修复程序退出时堆释放后使用问题

WQuickCursor 使用指向 WCursor 的原始指针,该指针可能在应用程序关闭期间
WCursor 对象被销毁后被访问,从而导致堆释放后使用错误。此更改将原始指针替
换为 QPointer,确保 WQuickCursor 仅在 WCursor 对象仍然有效时才访问它。

Influence:
1. 运行应用程序并退出,确保不会发生堆释放后使用错误。
2. 测试光标功能,确保它们仍然按预期工作。
2025-09-24 11:38:46 +08:00
rewine 2bc9ef62fe chore(debian): update version to 0.7.3
bug fix
2025-09-23 17:38:53 +08:00
April & May fc6d684513 fix: fix WorkspaceSelectionList animation's highlight border size
The calculation of the rectangle is incorrect, and the rectangle will be
wider than its content. Fix it using correct calculation.
2025-09-23 17:23:26 +08:00
April & May 5c701f8767 fix: fix MultitaskView display problem
workspaceDelegateHeight property is removed from new TreelandConfig.
This commit adapt the change and fixed the MultitaskView display
problem.
2025-09-23 17:22:24 +08:00
JiDe Zhang 51f403769e refactor: reduce cursor-related log verbosity
The verbosity of cursor input and touch event logs has been reduced
from `QtDebugMsg` to `QtInfoMsg`.  The high volume of debug logs was
overwhelming during development and debugging, making it difficult to
identify important information.  By reducing the default log level,
only essential cursor-related information will be displayed unless debug
logging is specifically enabled. This change improves the clarity and
usability of log output during development.

Influence:
1. Verify cursor functionality remains unaffected by the log level
change.
2. Confirm that important cursor events are still logged at the
`QtInfoMsg` level.
3. Enable debug logging to ensure detailed cursor information is
available when needed.
4. Test with different input devices (mouse, touchpad, touch screen) to
ensure consistent behavior.

refactor: 降低光标相关日志的详细程度

光标输入和触摸事件日志的详细程度已从 `QtDebugMsg` 降低到 `QtInfoMsg`。
大量的调试日志在开发和调试过程中造成了信息过载,难以识别重要信息。 通过
降低默认日志级别,除非专门启用调试日志记录,否则只会显示基本的光标相关信
息。 此更改提高了开发期间日志输出的清晰度和可用性。

Influence:
1. 验证光标功能是否未受日志级别更改的影响。
2. 确认重要的光标事件仍然以 `QtInfoMsg` 级别记录。
3. 启用调试日志记录以确保在需要时可以使用详细的光标信息。
4. 使用不同的输入设备(鼠标、触摸板、触摸屏)进行测试,以确保行为一致。
2025-09-23 16:49:23 +08:00
April & May e03fd2fdb3 fix: fix MultitaskView display problem caused by refactoring TreelandConfig
This commit cleans up changes left from refactoring TreelandConfig,
which caused MultitaskView display incorrectly.
2025-09-23 15:26:17 +08:00
transifex-integration[bot] 4ef86fc3fd
Updates for project TreeLand (#563) 2025-09-21 15:05:11 +08:00
rewine f2ac25fc05 chore(debian): update version to 0.7.2
fix: crash on startup due to uninitialized m_config
2025-09-19 11:34:44 +08:00
Lu YaNing 6ec120d449 fix: crash on startup due to uninitialized m_config pointer
The m_config member variable contained garbage value instead of
nullptr because C++ doesn't auto-initialize pointer members.
This caused invalid memory access and crash during startup.

Initialize m_config to nullptr to ensure proper initial state.
2025-09-19 10:02:58 +08:00
rewine 03094c5d8a chore(debian): update version to 0.7.1
Update Debian packaging
2025-09-18 13:21:42 +08:00
rewine 04bf8b3ddc fix: Fix socket blocking issue in Wayland server connection handling
1. Set server socket to non-blocking mode to prevent accept() calls from
blocking the main thread indefinitely.
2. Improved wl_os_accept_cloexec function to use accept4 with SOCK_CLOEXEC
flag as the preferred method on modern Linux systems, with fallback to
traditional accept() + fcntl approach for compatibility.
3. Added proper error handling for ENOSYS case when accept4 is not supported.

The blocking issue occurred when the Wayland server was waiting for client
connections, causing the entire compositor to freeze. This fix follows the
same pattern used in libwayland for robust socket handling.

Log: Fixed Wayland server socket blocking in accept() calls

Influence:
1. Test server startup and client connection establishment
2. Verify proper handling of multiple concurrent client connections
3. Check compatibility on systems without accept4 support
4. Ensure no regression in socket file descriptor management

修复:修复Wayland服务器连接处理中的socket阻塞问题

1. 将服务器socket设置为非阻塞模式,防止accept()调用无限期阻塞主线程。
2. 改进wl_os_accept_cloexec函数,在现代Linux系统上优先使用带SOCK_CLOEXEC
标志的accept4方法,同时为兼容性保留传统的accept() + fcntl方法作为后备。
3. 为不支持accept4的ENOSYS情况添加了适当的错误处理。

当Wayland服务器等待客户端连接时会发生阻塞问题,导致整个合成器冻结。此修复
遵循libwayland中用于健壮socket处理的相同模式。

Log: 修复Wayland服务器socket在accept()调用中的阻塞问题

Influence:
1. 测试服务器启动和客户端连接建立
2. 验证多个并发客户端连接的正确处理
3. 检查在不支持accept4的系统上的兼容性
4. 确保socket文件描述符管理中没有回归
2025-09-17 14:32:44 +08:00
rewine 794124ba68 fix: correct window title visibility condition
Changed the visibility condition for window titles in the multitask view
from checking 'highlighted' to checking the surfaceItemDelegate state.
This ensures titles are only shown when in taskview mode, not during
other states like window dragging or animation transitions.

The previous implementation could show titles during transitions when
they shouldn't be visible, causing visual artifacts. The new condition
properly aligns with the intended UI behavior where titles should only
appear in the stable taskview state.

Log: Fixed window titles appearing during transitions in multitask view

Influence:
1. Test multitask view to verify titles only appear in taskview state
2. Check window dragging and transitions to ensure titles remain hidden
3. Verify title visibility with empty/non-empty titles
4. Test with different window states and transitions

fix: 修正窗口标题可见性条件

将多任务视图中窗口标题的可见性条件从检查'highlighted'改为检查
surfaceItemDelegate状态。这确保标题仅在taskview模式下显示,而不是在窗口
拖动或动画过渡等其他状态时显示。

之前的实现在不应显示标题的过渡期间可能会显示标题,导致视觉伪影。新条件正
确符合预期的UI行为,即标题应仅在稳定的taskview状态下出现。

Log: 修复多任务视图中窗口标题在过渡期间出现的问题

Influence:
1. 测试多任务视图,验证标题仅在taskview状态下显示
2. 检查窗口拖动和过渡,确保标题保持隐藏
3. 验证空/非空标题的可见性
4. 测试不同窗口状态和过渡
2025-09-16 14:12:54 +08:00
JiDe Zhang 9556ef8950 fix: Fix client crash when created via security context
1. Fixed a crash issue where clients created through the security
context could not obtain the corresponding WClient object.
2. Clients created via security context use a new socket connection,
which is not managed by WSocket by default.
3. The wlroots protocol provides limited information for monitoring
such wl_clients.
4. This commit adapts the wlroots implementation: in
`security_context_handle_commit`, a new WSocket object is created for
the listening socket, and the new wl_client object created from this
socket is added to WClient for management.

Influence:
1. Test the creation of clients using the security context.
2. Verify that the created clients can correctly obtain the WClient
object.
3. Ensure that newly created sockets are correctly managed.

修复:修复通过安全上下文创建的客户端崩溃问题

1. 修复了通过安全上下文创建的客户端无法获取对应的 WClient 对象导致崩溃的
问题。
2. 通过安全上下文创建的客户端使用新的套接字连接,默认情况下不由 WSocket
管理。
3. wlroots 协议为监控此类 wl_clients 提供的相关信息有限。
4. 本次提交采纳了 wlroots 的实现:在 `security_context_handle_commit`
中,为监听的套接字创建一个新的 WSocket 对象,并将由此套接字创建的新
wl_client 对象添加到 WClient 中进行管理。

Influence:
1. 测试使用安全上下文创建客户端的过程。
2. 验证创建的客户端能否正确获取 WClient 对象。
3. 确保新创建的套接字能够得到正确的管理。
2025-09-15 14:48:34 +08:00
YaoBing Xiao 23192a4b14 feat: add security-context support
create security-context gloabl.

Log:
2025-09-11 19:07:10 +08:00
April & May fa1e1e6a18 fix: Separate DConfig object creation to another thread to avoid blocking
DConfig object creation involves D-Bus communication, which may block
when placed in the main thread. This commit adapt dconfig2cpp tool to
generate DConfig wrapper safely running in another thread, to avoid this
problem.
2025-09-11 19:06:22 +08:00
April & May e66c0a1b74 fix: move DBus call to separate thread to avoid blocking
Since obtaining DBus interface & calling DBus functions may block
current thread, it's better to place DBus-related codes out of the main
thread. This commit puts DBus call to separate thread if possible.
2025-09-11 19:04:47 +08:00
miruku 1411fb2ef7 fix: fixing some trivial memory management bugs. 2025-09-10 13:34:11 +08:00
rewine a43e0ed3d4 feat(core): Add support for XDG toplevel surface and XDG shell in RootSurfaceContainer
- Added include for `wxdgtoplevelsurface.h`
- Added include for `qwxdgshell.h`
- Handled initialization check for XDG toplevel surface
- Updated logic to set owns output and ensure surface position validity for XDG toplevel surface
- Added support to set Xwayland position from surface when initialized

Background:
When the window is destroyed while being dragged, `endMoveResize` is triggered. If `config` function is called after the window is destroyed, it will crash. Therefore, the check for `initialized` is added due to its reset in `reset_xdg_surface` where an `xdg_surface` implementation is reset under the following conditions:
1) A surface is unmapped due to a commit with NULL buffer
2) The `xdg_surface` role object is destroyed
3) `wlr_xdg_surface` is destroyed
2025-09-10 13:28:36 +08:00