Commit aaf18e4
committed
fix: fix async access causing invalid properties in SNI tray
1. Fixed asynchronous access issue where properties like ID and menu
path were accessed before being fully initialized
2. Delayed DBusMenuImporter creation until first actual use to avoid
accessing uninitialized menu path
3. Added lazy initialization pattern for menu importer to handle async
property updates
4. Moved initialization logic to separate init() method to ensure proper
property setup
5. Stored service name and menu path separately for later use in menu
importer creation
Log: Fixed system tray icon properties becoming invalid due to
asynchronous initialization
Influence:
1. Test system tray icons appear correctly with proper IDs
2. Verify right-click context menus work for all tray icons
3. Test tray icon tooltips display correctly
4. Verify theme changes properly update tray icon menus
5. Test tray icon activation (left-click) and context menu (right-click)
functionality
6. Ensure no crashes occur during tray icon initialization
fix: 修复异步访问导致SNI托盘属性无效的问题
1. 修复异步访问问题,避免在属性完全初始化前访问ID和菜单路径
2. 延迟DBusMenuImporter的创建,直到首次实际使用时才创建,避免访问未初始
化的菜单路径
3. 为菜单导入器添加懒加载模式,以处理异步属性更新
4. 将初始化逻辑移至单独的init()方法,确保属性正确设置
5. 单独存储服务名称和菜单路径,供后续创建菜单导入器时使用
Log: 修复系统托盘图标属性因异步初始化而变为无效的问题
Influence:
1. 测试系统托盘图标是否正确显示并具有正确的ID
2. 验证所有托盘图标的右键上下文菜单是否正常工作
3. 测试托盘图标工具提示是否正确显示
4. 验证主题更改是否正常更新托盘图标菜单
5. 测试托盘图标激活(左键点击)和上下文菜单(右键点击)功能
6. 确保托盘图标初始化过程中不会发生崩溃
PMS: BUG-3516431 parent e82424b commit aaf18e4
2 files changed
Lines changed: 24 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
104 | 104 | | |
105 | 105 | | |
106 | 106 | | |
| 107 | + | |
107 | 108 | | |
108 | 109 | | |
| 110 | + | |
109 | 111 | | |
110 | 112 | | |
111 | 113 | | |
| 114 | + | |
112 | 115 | | |
113 | | - | |
114 | 116 | | |
115 | | - | |
116 | 117 | | |
117 | 118 | | |
118 | 119 | | |
| |||
130 | 131 | | |
131 | 132 | | |
132 | 133 | | |
133 | | - | |
| 134 | + | |
134 | 135 | | |
135 | 136 | | |
136 | 137 | | |
| |||
139 | 140 | | |
140 | 141 | | |
141 | 142 | | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
142 | 149 | | |
143 | 150 | | |
144 | 151 | | |
145 | 152 | | |
146 | 153 | | |
147 | 154 | | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
148 | 164 | | |
149 | 165 | | |
150 | 166 | | |
| |||
238 | 254 | | |
239 | 255 | | |
240 | 256 | | |
241 | | - | |
| 257 | + | |
242 | 258 | | |
243 | 259 | | |
244 | 260 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
74 | 74 | | |
75 | 75 | | |
76 | 76 | | |
| 77 | + | |
| 78 | + | |
77 | 79 | | |
78 | 80 | | |
79 | 81 | | |
80 | 82 | | |
81 | 83 | | |
82 | 84 | | |
83 | 85 | | |
| 86 | + | |
| 87 | + | |
84 | 88 | | |
85 | 89 | | |
86 | 90 | | |
0 commit comments