Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: ps2触控板有事件上报,但是无法使用 #128

Merged
merged 1 commit into from
Jan 8, 2025

Conversation

fly602
Copy link
Contributor

@fly602 fly602 commented Jan 7, 2025

xinput list可以看到触控板变成了floating,被dde-api过滤掉了

Log: 支持状态为floating的触控板
pms: BUG-298693

xinput list可以看到触控板变成了floating,被dde-api过滤掉了

Log: 支持状态为floating的触控板
pms: BUG-298693
@deepin-ci-robot
Copy link

deepin pr auto review

关键摘要:

  • 代码中新增了对 XIFloatingSlave 的检查,确保了 list_device 函数能够正确处理浮动的从设备。

是否建议立即修改:

  • 否,当前提交的修改是合理的,没有发现需要立即修改的问题。但是,建议进行以下额外的检查和改进:

建议改进:

  1. 代码注释: 在新增的 XIFloatingSlave 检查附近添加注释,解释为什么需要添加这个检查,以及它如何与现有的 XISlavePointerXISlaveKeyboard 检查相关。
  2. 代码风格一致性: 确保代码风格与项目中的其他部分保持一致,例如缩进和空格的使用。
  3. 错误处理: 如果 xinfos 数组中的元素可能为空或未初始化,应该添加相应的错误处理逻辑,以防止潜在的空指针解引用。
  4. 代码可读性: 考虑将 for 循环中的条件判断提取到一个单独的函数中,以提高代码的可读性和可维护性。
  5. 边界条件: 确保 all_num 的值在循环中是有效的,以避免数组越界访问。

@fly602 fly602 changed the title fix: 解决PS鼠标类型的触控板引起的崩溃问题 fix: ps2触控板有事件上报,但是无法使用 Jan 8, 2025
@deepin-ci-robot
Copy link

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: ECQZXC, fly602

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@fly602 fly602 merged commit 5fd386a into linuxdeepin:master Jan 8, 2025
16 of 17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants