Skip to content

Commit c0aaa80

Browse files
Tanghongyaodeepin-bot[bot]
authored andcommitted
fix: 鼠标禁用前后,调整唤醒能力状态
鼠标禁用前后,调整唤醒能力状态 Log: 鼠标禁用前后,调整唤醒能力状态 Bug: https://pms.uniontech.com/bug-view-254187.html
1 parent e86e50e commit c0aaa80

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

deepin-devicemanager/src/DeviceManager/DeviceInput.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -365,13 +365,13 @@ EnableDeviceStatus DeviceInput::setEnable(bool e)
365365
return EDS_Faild;
366366
}
367367
if(e){
368-
if(isWakeupMachine()){
369-
DBusWakeupInterface::getInstance()->setWakeupMachine(wakeupID(), sysPath(), false, name());
370-
m_wakeupChanged = true;
371-
}
372-
} else if (m_wakeupChanged) {
373-
m_wakeupChanged = false;
368+
//鼠标启用时,唤醒能力打开
374369
DBusWakeupInterface::getInstance()->setWakeupMachine(wakeupID(), sysPath(), true, name());
370+
m_wakeupChanged = true;
371+
372+
} else if (m_wakeupChanged) { //鼠标禁用时,唤醒能力关闭
373+
m_wakeupChanged = false;
374+
DBusWakeupInterface::getInstance()->setWakeupMachine(wakeupID(), sysPath(), false, name());
375375
}
376376
bool res = DBusEnableInterface::getInstance()->enable(m_HardwareClass, m_Name, m_SysPath, m_UniqueID, e, m_Driver);
377377
if (res) {

0 commit comments

Comments
 (0)