From f54d5c9cb3ffb27d1d557331044ddaf3061b3242 Mon Sep 17 00:00:00 2001 From: xueyuanzhao Date: Thu, 31 Jul 2025 19:16:26 +0800 Subject: [PATCH] Signed-off-by:xueyuanzhao Signed-off-by: xueyuanzhao Change-Id: Ic5c15295dcc38206263c2415aaf43b2801242bbd --- frameworks/native/input/oh_input_manager.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/frameworks/native/input/oh_input_manager.cpp b/frameworks/native/input/oh_input_manager.cpp index 16dafb5592..8ee0e356cb 100644 --- a/frameworks/native/input/oh_input_manager.cpp +++ b/frameworks/native/input/oh_input_manager.cpp @@ -597,7 +597,7 @@ int32_t OH_Input_InjectMouseEventGlobal(const struct Input_MouseEvent* mouseEven true, PointerEvent::GLOBAL_COORDINATE); if ((result == INPUT_PERMISSION_DENIED) || (result == INPUT_OCCUPIED_BY_OTHER)) { MMI_HILOGE("Permission denied or occupied by other"); - return result; + return INPUT_PERMISSION_DENIED; } return INPUT_SUCCESS; } @@ -928,6 +928,10 @@ int32_t OH_Input_InjectTouchEventGlobal(const struct Input_TouchEvent* touchEven g_touchEvent->Reset(); } } + if ((result == INPUT_PERMISSION_DENIED) || (result == INPUT_OCCUPIED_BY_OTHER)) { + MMI_HILOGE("Permission denied or occupied by other"); + return INPUT_PERMISSION_DENIED; + } return INPUT_SUCCESS; } -- Gitee