chore: do not off screen on Wayland#133
Merged
MistEO merged 2 commits intoMistEO:mainfrom Mar 28, 2026
Merged
Conversation
Contributor
There was a problem hiding this comment.
Hey - 我给出了一些总体反馈:
- 新增的 Wayland 保护条件目前会计算为
false,但并没有从execute_power_screenoff返回,所以在 Wayland 下代码仍然会尝试运行xset;请将内部的false替换为显式的return false;(或者重构为一个提前返回的分支),以确保符合预期行为。
面向 AI 代理的提示
Please address the comments from this code review:
## Overall Comments
- The new Wayland guard currently evaluates to `false` without returning from `execute_power_screenoff`, so on Wayland the code will still attempt to run `xset`; replace the inner `false` with an explicit `return false;` (or refactor to an early-return branch) to enforce the intended behavior.帮我变得更有用!请在每条评论上点 👍 或 👎,我会根据你的反馈改进后续的评审。
Original comment in English
Hey - I've left some high level feedback:
- The new Wayland guard currently evaluates to
falsewithout returning fromexecute_power_screenoff, so on Wayland the code will still attempt to runxset; replace the innerfalsewith an explicitreturn false;(or refactor to an early-return branch) to enforce the intended behavior.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- The new Wayland guard currently evaluates to `false` without returning from `execute_power_screenoff`, so on Wayland the code will still attempt to run `xset`; replace the inner `false` with an explicit `return false;` (or refactor to an early-return branch) to enforce the intended behavior.Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
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.
由于 Wayland 下还没有统一的合成器协议或 API 接口用于通过 DPMS 关闭屏幕,因此暂时使 screenoff 在 Wayland 平台上直接失败。
Summary by Sourcery
错误修复:
Original summary in English
Summary by Sourcery
Bug Fixes: