Skip to content

Commit f6f20dd

Browse files
18202781743yixinshark
authored andcommitted
feat: add attention state support for treeland task manager
1. Bump treeland-protocols dependency to version > 0.5.7 to ensure protocol compatibility 2. Use local protocol XML file instead of system-installed one for easier development and stability 3. Add Attention state handling to TreeLandWindow, enabling taskbar to reflect window attention state 4. Update wayland extension versions to v2 for both ForeignToplevelHandle and ForeignToplevelManager to utilize new protocol features 5. Implement isAttention() method to check attention state from foreign toplevel handle Log: Taskbar now supports treeland window attention state display Influence: 1. Test taskbar window entries show attention state (e.g., flashing/ urgent) when window requests attention 2. Verify normal window behavior without attention state remains unchanged 3. Test with treeland compositor version >= 0.5.7 to ensure protocol compatibility 4. Verify backward compatibility with older treeland versions (if applicable) 5. Test attention state reset when window gains focus or user interacts with taskbar entry feat: 为treeland任务管理器添加注意力状态支持 1. 将treeland-protocols依赖提升至>=0.5.7版本以确保协议兼容性 2. 使用本地协议XML文件替代系统安装的协议文件,便于开发和保持稳定性 3. 为TreeLandWindow添加注意力状态处理,使任务栏能够反映窗口的注意力请求 4. 将ForeignToplevelHandle和ForeignToplevelManager的wayland扩展版本更新 至v2,以利用新协议特性 5. 实现isAttention()方法,从foreign toplevel handle中检查注意力状态 Log: 任务栏现在支持treeland窗口注意力状态显示 Influence: 1. 测试任务栏窗口条目在窗口请求注意力时显示注意力状态(如闪烁/紧急状态) 2. 验证无注意力状态的窗口行为保持不变 3. 使用treeland合成器版本>=0.5.7测试,确保协议兼容性 4. 验证与旧版本treeland的向后兼容性(如适用) 5. 测试窗口获得焦点或用户与任务栏条目交互时注意力状态重置
1 parent 2ea0136 commit f6f20dd

4 files changed

Lines changed: 7 additions & 6 deletions

File tree

debian/control

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ Build-Depends:
4040
qt6-wayland-dev-tools,
4141
qt6-wayland-private-dev,
4242
systemd,
43-
treeland-protocols,
43+
treeland-protocols (>= 0.5.7),
4444
wayland-protocols,
4545
Standards-Version: 4.6.2
4646
Homepage: https://github.com/linuxdeepin/dde-shell

panels/dock/taskmanager/treelandwindow.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ Q_LOGGING_CATEGORY(waylandwindowLog, "org.deepin.dde.shell.dock.taskmanager.tree
1717

1818
namespace dock {
1919
ForeignToplevelHandle::ForeignToplevelHandle(struct ::treeland_foreign_toplevel_handle_v1 *object)
20-
: QWaylandClientExtensionTemplate<ForeignToplevelHandle>(1)
20+
: QWaylandClientExtensionTemplate<ForeignToplevelHandle>(2)
2121
, QtWayland::treeland_foreign_toplevel_handle_v1(object)
2222
, m_pid(0)
2323
, m_isReady(false)
@@ -174,7 +174,7 @@ bool TreeLandWindow::allowClose()
174174

175175
bool TreeLandWindow::isAttention()
176176
{
177-
return false;
177+
return m_foreignToplevelHandle->state().contains(Attention);
178178
}
179179

180180
void TreeLandWindow::close()

panels/dock/taskmanager/treelandwindow.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// SPDX-FileCopyrightText: 2023 UnionTech Software Technology Co., Ltd.
1+
// SPDX-FileCopyrightText: 2023 - 2026 UnionTech Software Technology Co., Ltd.
22
//
33
// SPDX-License-Identifier: GPL-3.0-or-later
44

@@ -67,7 +67,8 @@ class TreeLandWindow : public AbstractWindow
6767
Active = QtWayland::treeland_foreign_toplevel_handle_v1::state_activated,
6868
Maximized = QtWayland::treeland_foreign_toplevel_handle_v1::state_maximized,
6969
Minimized = QtWayland::treeland_foreign_toplevel_handle_v1::state_minimized,
70-
Fullscreen = QtWayland::treeland_foreign_toplevel_handle_v1::state_fullscreen
70+
Fullscreen = QtWayland::treeland_foreign_toplevel_handle_v1::state_fullscreen,
71+
Attention = QtWayland::treeland_foreign_toplevel_handle_v1::state_attention
7172
};
7273

7374
public:

panels/dock/taskmanager/treelandwindowmonitor.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919

2020
namespace dock {
2121
ForeignToplevelManager::ForeignToplevelManager(TreeLandWindowMonitor* monitor)
22-
: QWaylandClientExtensionTemplate<ForeignToplevelManager>(1)
22+
: QWaylandClientExtensionTemplate<ForeignToplevelManager>(2)
2323
, m_monitor(monitor)
2424
{
2525
}

0 commit comments

Comments
 (0)