Skip to content

Commit d9be2cf

Browse files
committed
fix: fix missing wake option for PS/2 keyboard in device manager
1. 修复 wakeupPath() 中 PS/2 设备判断条件不一致问题; 2. 增加对 m_Interface 字段的 PS/2 判断, 使其与 isWakeupMachine() 逻辑一致; 3. PS/2 键盘设备名称不含 "PS/2" 字符串时也能正确返回 /proc/acpi/wakeup 路径; ===================================== 1. fixed inconsistent PS/2 device detection in wakeupPath(); 2. added m_Interface check to align with isWakeupMachine() logic; 3. PS/2 keyboard devices without "PS/2" in name now correctly return /proc/acpi/wakeup path; Log: 修复设备管理器中 PS/2 键盘右键菜单缺少 "允许唤起电脑" 选项的问题, 原因是 wakeupPath() 判断条件与 isWakeupMachine() 不一致 Bug: https://pms.uniontech.com/bug-view-294489.html
1 parent af0f4ea commit d9be2cf

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

deepin-devicemanager/src/DeviceManager/DeviceInput.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -505,7 +505,7 @@ QString DeviceInput::wakeupPath()
505505
return "";
506506
}
507507

508-
if (m_Name.contains("PS/2")) {
508+
if (m_Name.contains("PS/2") || m_Interface.contains("PS/2")) {
509509
return "/proc/acpi/wakeup";
510510
} else {
511511
return QString("/sys") + m_SysPath.left(index) + QString("/power/wakeup");

0 commit comments

Comments
 (0)