feat: replace internal XdgActivation implementation with Dde::Shell#779
feat: replace internal XdgActivation implementation with Dde::Shell#77918202781743 wants to merge 1 commit into
Conversation
There was a problem hiding this comment.
Sorry @18202781743, you have reached your weekly rate limit of 500000 diff characters.
Please try again later or upgrade to continue using Sourcery
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: 18202781743, BLumia The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
1. Remove custom XdgActivationV1 implementation in src/ddeintegration 2. Use ds::XdgActivation from Dde::Shell library instead 3. Refactor launchByDesktopId to use asynchronous token request 4. Update CMakeLists to link against Dde::Shell and raise libdde-shell- dev dependency to >= 2.0.45 5. Remove wayland-protocols build dependency from debian/control 6. Remove obsolete HAVE_WAYLAND_XDG_ACTIVATION compile flag and related conditionals 7. Fix launch order: move LauncherController.visible = false after launch call to ensure proper window lifecycle Log: Replaced customWayland XDG activation implementation with Dde::Shell's standard XdgActivation API for improved maintainability and compatibility with newer DDE versions. Influence: 1. Verify application launch works correctly via desktop ID 2. Test XDG activation token flow on Wayland compositors 3. Ensure backward compatibility with older DDE versions that do not provide Dde::Shell 4. Check build system changes do not break existing builds 5. Verify LauncherController visibility toggle works as expected after launching apps 6. Test on both Wayland and X11 sessions (fallback behavior) 7. Verify token timeout and error handling (compositor not advertising xdg_activation_v1) feat: 使用 Dde::Shell 集成替换自定义 XDG 激活实现 1. 移除 src/ddeintegration 中的自定义 XdgActivationV1 实现 2. 改用 Dde::Shell 库中的 ds::XdgActivation 3. 重构 launchByDesktopId 使用异步令牌请求 4. 更新 CMakeLists 链接 Dde::Shell,并将 libdde-shell-dev 依赖提升至 >= 2.0.45 5. 从 debian/control 中移除 wayland-protocols 构建依赖 6. 移除已废弃的 HAVE_WAYLAND_XDG_ACTIVATION 编译标志及相关条件编译 7. 修复启动顺序:将 LauncherController.visible = false 移到启动调用之后 以确保窗口生命周期正确 Log: 用 Dde::Shell 提供的标准 XdgActivation API 替换了自定义的 Wayland XDG 激活实现,提升了可维护性和与新版 DDE 的兼容性。 Influence: 1. 验证通过桌面 ID 启动应用程序功能是否正常 2. 在 Wayland 合成器上测试 XDG 激活令牌流程 3. 确保与不提供 Dde::Shell 的旧版 DDE 的向后兼容性 4. 检查构建系统变更不会破坏现有构建 5. 验证启动应用后 LauncherController 的可见性切换功能 6. 在 Wayland 和 X11 会话上测试(回退行为) 7. 测试令牌超时和错误处理(合成器未通告 xdg_activation_v1) PMS: BUG-365883
deepin pr auto review★ 总体评分:90分■ 【总体评价】
■ 【详细分析】
■ 【改进建议代码示例】 void DesktopIntegration::launchByDesktopId(const QString &desktopId)
{
qCInfo(logDesktopIntegration) << "Launching app by desktop ID:" << desktopId;
auto *activation = new ds::XdgActivation(&instance());
auto *timeoutTimer = new QTimer(activation);
timeoutTimer->setSingleShot(true);
timeoutTimer->setInterval(2000);
// 使用 QObject::connect 处理超时和正常获取两种情况
QObject::connect(timeoutTimer, &QTimer::timeout, &instance(), [desktopId, activation]() {
qCWarning(logDesktopIntegration) << "XDG activation token request timed out, launching without token";
AppInfo::launchByDesktopId(desktopId);
activation->deleteLater();
});
QObject::connect(activation, &ds::XdgActivation::tokenReady, &instance(),
[desktopId, activation, timeoutTimer](const QString &token) {
timeoutTimer->stop();
if (!AppMgr::launchApp(desktopId, token)) {
qCDebug(logDesktopIntegration) << "AppMgr launch failed, trying AppInfo launch";
AppInfo::launchByDesktopId(desktopId);
}
activation->deleteLater();
});
timeoutTimer->start();
activation->requestToken();
} |
from ddeintegration
libdde-shell-dev >= 2.0.45
HAVE_WAYLAND_XDG_ACTIVATIONused to check Wayland platform availability
Depends and bump libdde-shell-dev minimum version to 2.0.45, requiring
DDEShell via find_package.
DesktopIntegration::launchByDesktopId()to use async tokenrequest via
ds::XdgActivationsignal instead of blocking event loopwith timeout
LauncherController.visible = falseafterlaunchByDesktopId()in launcheritem.qml to ensure the launcher hidesafter launch completes
Log: Replaced internal XDG activation implementation with Dde::Shell
library
Influence:
(focus-stealing prevention)
xdg_activation_v1
feat: 使用 Dde::Shell 替换内部 XdgActivation 实现
HAVE_WAYLAND_XDG_ACTIVATIONshell-dev 最低版本提升至 2.0.45,并通过 find_package 引入 DDEShell
DesktopIntegration::launchByDesktopId()方法,使用ds::XdgActivation信号的异步令牌请求替代阻塞事件循环和超时机制LauncherController.visible = false移到launchByDesktopId()之后,确保启动完成后才隐藏启动器Log: 使用 Dde::Shell 库替换内部 XDG 激活实现
Influence: