fix: restore Wayland clipboard image replay#272
Conversation
Fix Wayland clipboard image replay and ownership handling. - Move Wayland MIME pipe reads off the event path and read them with a bounded poll loop. - Track active read task ids so stale async read results cannot overwrite newer clipboard data. - Re-publish saved clipboard data with supported image offers and ignore self-produced Wayland offers. - Emit clipboard change notifications for local Wayland replay so history items are reinserted at the top. - Add diagnostic logs for Wayland offer, read, takeover, and send-request flow. 修复 Wayland 剪贴板图片历史回放和 owner 接管处理。 - 将 Wayland MIME pipe 读取移出事件路径,使用带超时和大小限制的 poll 循环读取。 - 通过当前读任务 ID 丢弃过期异步读取结果,避免旧数据覆盖新的剪贴板内容。 - 使用支持的图片格式重新发布历史剪贴板数据,并忽略 daemon 自己发布的 Wayland offer。 - 本地 Wayland 历史回放后发出剪贴板变更通知,使历史项可以重新插入列表顶部。 - 增加 Wayland offer、读取、接管和数据请求流程的诊断日志。 Log: restore Wayland clipboard image replay Change-Id: Ia7f1058c20d640a9503aee02f2f7a3d523aa21e8
There was a problem hiding this comment.
Sorry @yixinshark, you have reached your weekly rate limit of 500000 diff characters.
Please try again later or upgrade to continue using Sourcery
deepin pr auto review★ 总体评分:100分■ 【总体评价】
■ 【详细分析】
■ 【改进建议代码示例】 class FdGuard {
public:
explicit FdGuard(int fd) : m_fd(fd) {}
~FdGuard()
{
if (m_fd >= 0)
close(m_fd);
}
// 禁用拷贝构造和拷贝赋值,防止双重释放
FdGuard(const FdGuard&) = delete;
FdGuard& operator=(const FdGuard&) = delete;
// 支持移动语义,允许资源所有权转移
FdGuard(FdGuard&& other) noexcept : m_fd(other.m_fd) {
other.m_fd = -1;
}
FdGuard& operator=(FdGuard&& other) noexcept {
if (this != &other) {
if (m_fd >= 0) {
close(m_fd);
}
m_fd = other.m_fd;
other.m_fd = -1;
}
return *this;
}
private:
int m_fd;
}; |
|
TAG Bot New tag: 6.1.31 |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: 18202781743, yixinshark 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 |
Summary
Test plan