feat(shortcut): migrate shortcut handling to dde-services#1182
Conversation
There was a problem hiding this comment.
Sorry @yixinshark, you have reached your weekly rate limit of 500000 diff characters.
Please try again later or upgrade to continue using Sourcery
1. Disable the legacy session keybinding module and remove its D-Bus activation file. 2. Remove the legacy configurable touchpad gesture API while retaining touchscreen handling. 3. Make the system gesture input loop startup, shutdown, timer cleanup, and device cleanup deterministic. 4. Release emulated touchscreen right-button state on lock, configuration, service, and module lifecycle changes. Log: Migrate shortcut ownership to dde-services while preserving touchscreen gesture handling. Influence: 1. Verify shortcuts are handled by dde-services on X11 and Treeland. 2. Verify touchscreen edge gestures and long-press right-click behavior. 3. Verify restarting gesture services leaves no stuck input state. feat(shortcut): 将快捷键处理迁移到 dde-services 1. 禁用旧的会话 keybinding 模块,并删除其 D-Bus 激活文件。 2. 删除旧的可配置触控板手势接口,同时保留触摸屏手势处理。 3. 完善系统手势输入循环的启动、停止、定时器和设备清理流程。 4. 在锁屏、配置变更、服务重启和模块销毁时释放模拟的触摸屏右键状态。 Log: 将快捷键处理迁移到 dde-services,同时保留触摸屏手势处理。 Influence: 1. 验证 X11 和 Treeland 下快捷键由 dde-services 正常处理。 2. 验证触摸屏边缘手势和长按右键行为。 3. 验证手势服务重启后不会残留按键状态。 Pms: TASK-393199 Change-Id: I7d2ce001dfae491c08357e3e10943784e2ad80e3
b481b51 to
9b0da6a
Compare
deepin pr auto review★ 总体评分:85分■ 【总体评价】
■ 【详细分析】
■ 【改进建议代码示例】 // gesture1/manager.go
func (m *Manager) releaseTouchRightButtonLocked() error {
if !m.touchRightButtonDown {
return nil
}
var lastErr error
for attempt := 0; attempt < touchRightButtonReleaseAttempts; attempt++ {
// 释放锁执行可能阻塞的操作
m.touchRightButtonMu.Unlock()
err := m.doXdotoolsMouseUp()
m.touchRightButtonMu.Lock()
if err == nil {
m.touchRightButtonDown = false
return nil
} else {
lastErr = err
}
if attempt+1 < touchRightButtonReleaseAttempts {
// 释放锁后再睡眠
m.touchRightButtonMu.Unlock()
time.Sleep(touchRightButtonReleaseInterval)
m.touchRightButtonMu.Lock()
}
}
return fmt.Errorf("mouseup failed after %d attempts: %w", touchRightButtonReleaseAttempts, lastErr)
} |
|
/retest |
这条应判为“影响评估不成立”,不建议按 AI 的方案修改。锁内确实有 Sleep,但性能问题被明显夸大了。 原因:
真正值得注意的是:exec.Command("xdotool", ...) 没有超时,所以理论阻塞时间并非 150ms,而可能更长。但这是可靠性加固项,不是当前报告所说的锁竞争性能问题,也不必阻塞该 PR。 |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: 18202781743, yixinshark The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
/forcemerge |
Summary
Test plan
go test ./bin/dde-session-daemon ./gesture1 ./system/gesture1Pms: TASK-393199