Commit e76d076
fix: prevent mouse movement from stopping preview mode
1. Added m_previewing flag to track whether screensaver is in preview
mode
2. Modified Preview() method to set m_previewing flag based on preview
parameter
3. Changed window flag setting logic to always apply
WindowStaysOnTopHint when staysOn is true
4. Unified input event connection to use onInputEventReceived slot
instead of conditional connections
5. Added onInputEventReceived slot to filter mouse move events during
preview mode
6. Reset m_previewing flag to false when screensaver stops
7. Removed debug log from ScreenSaverView::event() method as logging is
now handled in DBusScreenSaver
Log: Fixed issue where mouse movement would incorrectly exit screensaver
preview mode
Influence:
1. Test screensaver preview functionality - mouse movement should not
exit preview
2. Verify other input events (keyboard, touch) still properly exit
preview mode
3. Test normal screensaver operation - all input events should stop
screensaver
4. Verify WindowStaysOnTopHint behavior in preview mode
5. Test WindowStaysOnBottomHint behavior when staysOn is false
6. Ensure screensaver properly starts and stops in both preview and
normal modes
fix: 防止鼠标移动退出预览模式
1. 添加 m_previewing 标志来跟踪屏保是否处于预览模式
2. 修改 Preview() 方法根据 preview 参数设置 m_previewing 标志
3. 更改窗口标志设置逻辑,当 staysOn 为 true 时始终应用
WindowStaysOnTopHint
4. 统一输入事件连接,使用 onInputEventReceived 槽代替条件连接
5. 添加 onInputEventReceived 槽以在预览模式下过滤鼠标移动事件
6. 屏保停止时将 m_previewing 标志重置为 false
7. 从 ScreenSaverView::event() 方法中移除调试日志,现在日志在
DBusScreenSaver 中处理
Log: 修复了鼠标移动会错误退出屏保预览模式的问题
Influence:
1. 测试屏保预览功能 - 鼠标移动不应退出预览
2. 验证其他输入事件(键盘、触摸)仍能正常退出预览模式
3. 测试正常屏保运行 - 所有输入事件都应停止屏保
4. 验证预览模式下的 WindowStaysOnTopHint 行为
5. 测试 staysOn 为 false 时的 WindowStaysOnBottomHint 行为
6. 确保屏保在预览和正常模式下都能正确启动和停止
pms: BUG-3427091 parent 6aac1b7 commit e76d076
File tree
3 files changed
+19
-7
lines changed- src
3 files changed
+19
-7
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
207 | 207 | | |
208 | 208 | | |
209 | 209 | | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
210 | 213 | | |
211 | 214 | | |
212 | 215 | | |
| |||
228 | 231 | | |
229 | 232 | | |
230 | 233 | | |
231 | | - | |
| 234 | + | |
232 | 235 | | |
233 | 236 | | |
234 | 237 | | |
| |||
242 | 245 | | |
243 | 246 | | |
244 | 247 | | |
245 | | - | |
246 | | - | |
247 | | - | |
248 | | - | |
249 | | - | |
| 248 | + | |
250 | 249 | | |
251 | 250 | | |
252 | 251 | | |
| |||
457 | 456 | | |
458 | 457 | | |
459 | 458 | | |
| 459 | + | |
460 | 460 | | |
461 | 461 | | |
462 | 462 | | |
| |||
651 | 651 | | |
652 | 652 | | |
653 | 653 | | |
| 654 | + | |
| 655 | + | |
| 656 | + | |
| 657 | + | |
| 658 | + | |
| 659 | + | |
| 660 | + | |
| 661 | + | |
| 662 | + | |
| 663 | + | |
| 664 | + | |
654 | 665 | | |
655 | 666 | | |
656 | 667 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
76 | 76 | | |
77 | 77 | | |
78 | 78 | | |
| 79 | + | |
79 | 80 | | |
80 | 81 | | |
81 | 82 | | |
| |||
111 | 112 | | |
112 | 113 | | |
113 | 114 | | |
| 115 | + | |
114 | 116 | | |
115 | 117 | | |
116 | 118 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
92 | 92 | | |
93 | 93 | | |
94 | 94 | | |
95 | | - | |
96 | 95 | | |
97 | 96 | | |
98 | 97 | | |
| |||
0 commit comments