From f91b2e2076512eb14effcfa3b9cd7243f55b8d77 Mon Sep 17 00:00:00 2001 From: rewine Date: Tue, 2 Dec 2025 15:21:28 +0800 Subject: [PATCH] fix: remove WAYLAND_DEBUG environment variable in release builds MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Removed the conditional WAYLAND_DEBUG environment variable setting that was only enabled in debug builds. This change eliminates unnecessary debug output in production environments and ensures cleaner system logs. The debug flag was previously set for both TreeLand compositor and single Wayland helper processes when compiled in debug mode. Influence: 1. Verify Wayland compositor starts normally without debug output 2. Check system logs for reduced debug message clutter 3. Test TreeLand compositor functionality remains unchanged 4. Validate single Wayland helper process operation 5. Confirm no regression in display server initialization fix: 在发布版本中移除 WAYLAND_DEBUG 环境变量设置 移除了仅在调试版本中启用的 WAYLAND_DEBUG 环境变量条件设置。此更改消除了 生产环境中不必要的调试输出,确保系统日志更清晰。之前该调试标志在调试模式 下同时为 TreeLand 合成器和单 Wayland 助手进程设置。 Influence: 1. 验证 Wayland 合成器正常启动且无调试输出 2. 检查系统日志中调试消息杂乱度是否降低 3. 测试 TreeLand 合成器功能保持不变 4. 验证单 Wayland 助手进程运行正常 5. 确认显示服务器初始化无回归问题 --- src/daemon/Display.cpp | 4 ---- src/helper/singlewaylandhelper.cpp | 3 --- 2 files changed, 7 deletions(-) diff --git a/src/daemon/Display.cpp b/src/daemon/Display.cpp index de6cc2a..4d7b611 100644 --- a/src/daemon/Display.cpp +++ b/src/daemon/Display.cpp @@ -567,10 +567,6 @@ namespace DDM { auth->setDisplayServerCommand(XorgUserDisplayServer::command(this)); } else { if (m_displayServerType == DisplayServerType::SingleCompositerServerType) { - #ifdef QT_DEBUG - env.insert("WAYLAND_DEBUG", "1"); - #endif - env.insert("DDE_CURRENT_COMPOSITOR", "TreeLand"); } diff --git a/src/helper/singlewaylandhelper.cpp b/src/helper/singlewaylandhelper.cpp index 8469e3d..3320e2c 100644 --- a/src/helper/singlewaylandhelper.cpp +++ b/src/helper/singlewaylandhelper.cpp @@ -26,9 +26,6 @@ bool SingleWaylandHelper::start(const QString &compositor, const QString &cmd) auto env = QProcessEnvironment::systemEnvironment(); env.insert("LIBSEAT_BACKEND", "seatd"); env.insert("DSG_APP_ID", "org.deepin.dde.treeland"); -#if DEBUG - env.insert("WAYLAND_DEBUG", "1"); -#endif return env; }());