Commit a7324c7
committed
fix: resolve DBUS deadlock in application tray
1. Changed from Qt's DBus interface generation to DTK's asynchronous
DBus interface generation for StatusNotifierItem
2. Added DTK Tools dependency to CMakeLists.txt for
dtk_add_dbus_interfaces
3. Modified DBus interface generation to use dtk_add_dbus_interfaces for
org.kde.StatusNotifierItem.xml
4. Updated include directories to include the local api directory
5. Removed forward declaration of StatusNotifierItem class since it's
now generated by DTK
6. Added namespace usage for org::kde in sniprotocolhandler.h
The issue was that Qt's synchronous DBus property calls could cause
deadlocks in the application tray. By switching to DTK's asynchronous
DBus interface generation, property access becomes non-blocking,
preventing the deadlock situation. This change specifically targets the
StatusNotifierItem interface which was causing the deadlock.
Log: Fixed application tray DBus deadlock issue
Influence:
1. Test application tray functionality with various system tray
applications
2. Verify tray icons load correctly without hanging
3. Test DBus communication with StatusNotifierItem services
4. Monitor system responsiveness when multiple tray applications are
running
5. Test tray menu interactions and property updates
6. Verify no regression in tray icon display or functionality
fix: 解决应用托盘DBus死锁问题
1. 将StatusNotifierItem的DBus接口生成从Qt改为DTK的异步DBus接口生成
2. 在CMakeLists.txt中添加DTK Tools依赖以使用dtk_add_dbus_interfaces
3. 修改DBus接口生成,对org.kde.StatusNotifierItem.xml使用
dtk_add_dbus_interfaces
4. 更新包含目录以包含本地api目录
5. 移除StatusNotifierItem类的前向声明,因为现在由DTK生成
6. 在sniprotocolhandler.h中添加org::kde命名空间使用
问题在于Qt的同步DBus属性调用可能导致应用托盘死锁。通过切换到DTK的异步
DBus接口生成,属性访问变为非阻塞操作,防止了死锁情况。此更改专门针对导致
死锁的StatusNotifierItem接口。
Log: 修复应用托盘DBus死锁问题
Influence:
1. 测试应用托盘功能与各种系统托盘应用程序
2. 验证托盘图标正确加载且无卡顿
3. 测试与StatusNotifierItem服务的DBus通信
4. 监控运行多个托盘应用程序时的系统响应性
5. 测试托盘菜单交互和属性更新
6. 验证托盘图标显示和功能无回归问题1 parent 1cd2097 commit a7324c7
4 files changed
Lines changed: 12 additions & 6 deletions
File tree
- plugins/application-tray
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
11 | | - | |
| 11 | + | |
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
| |||
51 | 51 | | |
52 | 52 | | |
53 | 53 | | |
54 | | - | |
55 | 54 | | |
56 | 55 | | |
57 | 56 | | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
58 | 62 | | |
59 | 63 | | |
60 | 64 | | |
| |||
81 | 85 | | |
82 | 86 | | |
83 | 87 | | |
| 88 | + | |
84 | 89 | | |
85 | 90 | | |
86 | 91 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
18 | | - | |
19 | 18 | | |
20 | 19 | | |
21 | 20 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
109 | 109 | | |
110 | 110 | | |
111 | 111 | | |
| 112 | + | |
112 | 113 | | |
113 | 114 | | |
114 | 115 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| |||
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
| 21 | + | |
21 | 22 | | |
22 | 23 | | |
23 | 24 | | |
| |||
0 commit comments