From 0084b63ce0f6da207a2e566600f5ca1d636bc077 Mon Sep 17 00:00:00 2001 From: liqiao49 Date: Fri, 25 Aug 2023 17:49:11 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A7=A3=E5=86=B3PC=E7=AB=AF=E6=97=A0=E6=B3=95?= =?UTF-8?q?=E7=94=A8=E8=A7=A6=E6=91=B8=E6=9D=BF=E6=8B=96=E6=8B=BD=E7=A9=BF?= =?UTF-8?q?=E8=B6=8A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: liqiao49 --- common/include/input_hub.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/common/include/input_hub.cpp b/common/include/input_hub.cpp index 1900da6..ec27c5a 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 -- Gitee