fix: 关闭 “启用鼠标点击特效” 时无法显示常驻拖尾#122
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
该 PR 旨在修复“关闭「启用鼠标点击特效」后,仍应能显示「常驻拖尾」但实际无法显示”的问题,并同步优化控制面板在关闭点击特效开关时的选项显示逻辑,使点击特效与拖尾效果的开关语义更清晰。
Changes:
- 将点击特效与拖尾渲染的开关判断拆分:点击仅受点击特效开关影响,拖尾受“点击特效或常驻拖尾”任一开关影响。
- 调整
CanRenderEffects():仅保留渲染环境条件检查,将业务开关判断下放到调用点。 - 控制面板在主开关关闭时隐藏点击特效相关选项面板,并在加载设置时同步刷新可见性。
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| src/OverlayManager.cs | 拆分点击/拖尾的开关判断,并调整渲染前置条件检查逻辑以支持常驻拖尾独立生效。 |
| src/ConfigManager.cs | 新增语义化的派生开关属性,区分点击特效激活与拖尾激活状态。 |
| src/ControlPanelWindow.xaml.cs | 加载设置时及主开关切换时,动态更新点击特效选项面板可见性。 |
| src/ControlPanelWindow.xaml | 为主开关添加 Checked/Unchecked 事件,并为点击特效选项面板命名以便代码控制可见性。 |
Comments suppressed due to low confidence (1)
src/OverlayManager.cs:537
OnMouseMoveExtstill blocks rendering when the cursor is hidden and_isPrimaryPointerDownis false. With the newIsTrailEffectActivegate, this means “常驻拖尾” can still fail to render in cursor-hidden environments (e.g., touchscreen mode / apps that hide the cursor), because_isPrimaryPointerDownmay never become true when click effects are disabled. Consider allowing move rendering when the always-trail switch is enabled, regardless of_isPrimaryPointerDown.
if (!ConfigManager.IsTrailEffectActive) return;
if (!CanRenderEffects()) return;
bool cursorVisible = CursorIsVisible();
if (!cursorVisible && !_isPrimaryPointerDown) return;
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
DoomVoss
approved these changes
Jun 30, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.