Commit fc87106
committed
fix: fix async access causing invalid properties in SNI tray
1. Changed StatusNotifierItem from async to sync mode to ensure
properties are available when accessed
2. Implemented lazy initialization for DBusMenuImporter to avoid
accessing uninitialized menu
3. Added lazy generation of tray ID to prevent empty ID when accessed
before initialization
4. Stored service path separately for later use in menu importer
creation
5. Fixed menu access to use lazy-loaded menu importer instead of
potentially null pointer
Log: Fixed system tray icons sometimes showing no menu or incorrect
behavior
Influence:
1. Test system tray icons from various applications (especially those
using SNI protocol)
2. Verify right-click menus appear correctly for all tray icons
3. Check that tray icon IDs remain consistent and unique
4. Test theme switching while tray menus are open
5. Verify left-click activation works properly
6. Test with applications that send attention signals
fix: 修复异步访问导致SNI托盘属性无效的问题
1. 将StatusNotifierItem从异步模式改为同步模式,确保访问时属性已就绪
2. 实现DBusMenuImporter的延迟初始化,避免访问未初始化的菜单
3. 添加托盘ID的延迟生成,防止在初始化前访问时返回空ID
4. 单独存储服务路径供后续创建菜单导入器使用
5. 修复菜单访问,使用延迟加载的菜单导入器代替可能为空的指针
Log: 修复系统托盘图标有时不显示菜单或行为异常的问题
Influence:
1. 测试来自不同应用程序的系统托盘图标(特别是使用SNI协议的)
2. 验证所有托盘图标的右键菜单是否正确显示
3. 检查托盘图标ID是否保持唯一且一致
4. 测试在托盘菜单打开时切换主题
5. 验证左键激活功能是否正常工作
6. 测试发送attention信号的应用程序
PMS: BUG-3516431 parent e82424b commit fc87106
2 files changed
Lines changed: 19 additions & 5 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 | | |
112 | | - | |
113 | | - | |
| 114 | + | |
114 | 115 | | |
115 | | - | |
116 | 116 | | |
117 | 117 | | |
118 | 118 | | |
| |||
130 | 130 | | |
131 | 131 | | |
132 | 132 | | |
133 | | - | |
| 133 | + | |
134 | 134 | | |
135 | 135 | | |
136 | 136 | | |
| |||
145 | 145 | | |
146 | 146 | | |
147 | 147 | | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
148 | 157 | | |
149 | 158 | | |
150 | 159 | | |
151 | 160 | | |
152 | 161 | | |
153 | 162 | | |
154 | 163 | | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
155 | 167 | | |
156 | 168 | | |
157 | 169 | | |
| |||
238 | 250 | | |
239 | 251 | | |
240 | 252 | | |
241 | | - | |
| 253 | + | |
242 | 254 | | |
243 | 255 | | |
244 | 256 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
74 | 74 | | |
75 | 75 | | |
76 | 76 | | |
| 77 | + | |
77 | 78 | | |
78 | 79 | | |
79 | 80 | | |
80 | 81 | | |
81 | 82 | | |
82 | 83 | | |
83 | 84 | | |
| 85 | + | |
84 | 86 | | |
85 | 87 | | |
86 | 88 | | |
0 commit comments