fix: Optimize display management and watchdog - #5
Open
cs0tony wants to merge 4 commits into
Open
Conversation
…ernal screen does not trigger the built-in screen to restore.
…k and turn off automatic mode
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.
概述
主要围绕ClamOpen应用的内置屏幕管理和自动模式功能进行了全面改进,重点解决了手动恢复内置屏幕时的自动模式冲突问题,添加了可配置的看门狗功能,并修复了内置屏幕恢复无效的核心bug。这些改进显著增强了应用的稳定性和用户体验,特别是在显示器插拔场景下的响应能力。
改动内容
手动恢复与自动模式冲突解决
问题背景:用户在自动模式下点击"恢复内置屏"菜单项时,由于自动模式的持续监控,内置屏幕可能会被再次关闭,导致恢复操作无效。
解决方案:
看门狗功能完善
功能描述:改造成可配置的看门狗定时器,作为显示器状态检查的兜底保护机制;减少判断参数获取次数。
实现细节:
内置屏幕恢复核心问题修复
问题背景:拔掉外接显示器时无法触发内置屏幕恢复,第一个原因是hasExternalDisplay获取到的判断参数错误,第二个原因是builtinDisplay无法获取内置屏ID。
解决方案:
涉及文件