diff --git a/common/include/input_hub.cpp b/common/include/input_hub.cpp index 1900da64d68e7cb3eb5febd7bd03a3daa7509d57..ec27c5a1a27e6b35cbf8a5f454198cec58aa88cd 100644 --- a/common/include/input_hub.cpp +++ b/common/include/input_hub.cpp @@ -1071,8 +1071,9 @@ void InputHub::GetShareMousePathByDhId(std::vector dhIds, std::stri } DHLOGI("descriptor:%s, isShare[%d], type[%d]", GetAnonyString(device->identifier.descriptor).c_str(), device->isShare, device->classes); - if ((device->identifier.descriptor == dhId_) && - ((device->classes & INPUT_DEVICE_CLASS_CURSOR) != 0)) { + if ((device->identifier.descriptor == dhId_) && ((device->classes & INPUT_DEVICE_CLASS_CURSOR) != 0 || + (device->classes & INPUT_DEVICE_CLASS_TOUCH) != 0 || + ((device->classes & INPUT_DEVICE_CLASS_TOUCH_MT) != 0 && IsTouchPad(device->identifier)))) { dhId = dhId_; path = device->path; return; // return First shared mouse