Merged
Conversation
Contributor
There was a problem hiding this comment.
Hey - 我在这里给出了一些总体反馈:
scroll(int dx, int dy) const方法没有像pointer()和input_key()那样检查connected_,所以你可能需要在 Wayland 连接建立之前,防止使用虚拟指针。- 在
scroll中,步长计算dx / 120和dy / 120会导致绝对值小于 120 的增量被完全忽略;如果希望部分滚动也能产生效果,可以考虑处理余数,或者采用不同的缩放策略。
给 AI 代理的提示
Please address the comments from this code review:
## Overall Comments
- The `scroll(int dx, int dy) const` method does not check `connected_` like `pointer()` and `input_key()` do, so you may want to guard against using the virtual pointer before the Wayland connection is established.
- In `scroll`, the step calculation `dx / 120` and `dy / 120` means deltas with absolute value < 120 are ignored entirely; if partial scrolls should still have an effect, consider handling the remainder or using a different scaling strategy.帮我变得更有用!请对每条评论点 👍 或 👎,我会根据你的反馈改进后续的评审。
Original comment in English
Hey - I've left some high level feedback:
- The
scroll(int dx, int dy) constmethod does not checkconnected_likepointer()andinput_key()do, so you may want to guard against using the virtual pointer before the Wayland connection is established. - In
scroll, the step calculationdx / 120anddy / 120means deltas with absolute value < 120 are ignored entirely; if partial scrolls should still have an effect, consider handling the remainder or using a different scaling strategy.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- The `scroll(int dx, int dy) const` method does not check `connected_` like `pointer()` and `input_key()` do, so you may want to guard against using the virtual pointer before the Wayland connection is established.
- In `scroll`, the step calculation `dx / 120` and `dy / 120` means deltas with absolute value < 120 are ignored entirely; if partial scrolls should still have an effect, consider handling the remainder or using a different scaling strategy.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.
为 WlRoots 控制器实现 ScrollableUnit,并补全意外删除的 scroll 实现
由 Sourcery 提供的摘要
为 wlroots 控制单元实现滚动处理,并通过 Wayland 客户端和管理器进行串联。
新功能:
ScrollableUnit接口,在 wlroots 控制单元管理器中暴露滚动功能。增强内容:
WaylandClient的成员布局。Original summary in English
Summary by Sourcery
Implement scroll handling for the wlroots control unit and wire it through the Wayland client and manager.
New Features:
Enhancements: