🐞 fix: 改善主窗口在桌面歌词区域移动/调整大小时的闪烁问题#674
Conversation
Yueby
commented
Dec 27, 2025
- 监听主窗口 move/resize 事件,在操作时临时禁用桌面歌词的 forward 参数
- 操作结束后自动恢复,避免影响悬浮解锁功能
- 已知问题:窗口重叠时首次操作仍可能出现轻微闪烁(事件触发延迟导致)
- 监听主窗口 move/resize 事件,在操作时临时禁用桌面歌词的 forward 参数 - 操作结束后自动恢复,避免影响悬浮解锁功能 - 已知问题:窗口重叠时首次操作仍可能出现轻微闪烁(事件触发延迟导致)
- 监听主窗口 move/resize 事件,在操作时临时禁用桌面歌词的 forward 参数 - 操作结束后自动恢复,避免影响悬浮解锁功能 - 已知问题:窗口重叠时首次操作仍可能出现轻微闪烁(事件触发延迟导致)
…SPlayer into fix/desktop-lyric-flicker
Summary of ChangesHello @Yueby, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! 此拉取请求旨在通过在主窗口移动或调整大小时智能地管理桌面歌词窗口的鼠标事件穿透行为,从而显著改善用户体验。通过临时禁用并随后恢复 "forward" 参数,解决了桌面歌词在这些操作期间出现的视觉闪烁问题,同时保持了悬浮解锁功能的完整性。 Highlights
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Code Review
本次 PR 旨在通过在主窗口移动/调整大小时临时禁用鼠标事件转发,来修复桌面歌词窗口的闪烁问题。您采用的方案非常可靠:在支持的平台(Windows/macOS)上使用 moved/resized 事件立即恢复状态,而在其他平台上则通过 move/resize 事件配合防抖定时器来恢复。代码通过新的辅助函数进行了良好的结构化,提高了可读性。
然而,我在事件监听器的清理逻辑中发现了一个严重问题。removeAllListeners 的使用会无意中移除主窗口上其他重要的监听器,可能导致保存窗口位置和大小等功能失效。我已在具体的审查评论中提供了详细说明和修复建议。
在解决此问题后,这些更改应能有效解决所描述的闪烁问题。