From c67b817ecf662b964439c197f353351ff0a31aa9 Mon Sep 17 00:00:00 2001 From: duanaoqi Date: Fri, 27 Sep 2024 09:26:25 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A7=A3=E5=86=B3scrollBar=E5=9C=A8pc=E4=B8=8A?= =?UTF-8?q?=E6=97=A0=E6=B3=95=E6=A8=AA=E5=90=91=E6=8B=96=E6=8B=BD=E7=9A=84?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: duanaoqi --- shell/platform/ohos/ohos_touch_processor.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/shell/platform/ohos/ohos_touch_processor.cpp b/shell/platform/ohos/ohos_touch_processor.cpp index 1c04f38f03..037e3a527d 100644 --- a/shell/platform/ohos/ohos_touch_processor.cpp +++ b/shell/platform/ohos/ohos_touch_processor.cpp @@ -239,11 +239,12 @@ void OhosTouchProcessor::HandleMouseEvent( pointerData.pressure = 0.0; pointerData.pressure_max = 1.0; pointerData.pressure_min = 0.0; - pointerData.kind = PointerData::DeviceKind::kMouse; + pointerData.kind = PointerData::DeviceKind::kTouch; pointerData.buttons = getPointerButtonFromMouse(mouseEvent.button); // hover support if (mouseEvent.button == OH_NATIVEXCOMPONENT_NONE_BUTTON && pointerData.change == PointerData::Change::kMove) { pointerData.change = PointerData::Change::kHover; + pointerData.kind = PointerData::DeviceKind::kMouse; pointerData.buttons = 0; } pointerData.pan_x = 0.0; -- Gitee