From b52b5873d63a61f29031f333920057cd12437146 Mon Sep 17 00:00:00 2001 From: qianchuang Date: Thu, 17 Oct 2024 20:00:45 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9sendEvent=E6=97=B6=EF=BC=8Cac?= =?UTF-8?q?cessibility=5Ffocus=5Fevent=E4=B8=8D=E6=9B=B4=E6=96=B0activeWin?= =?UTF-8?q?dowId?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: qianchuang --- services/aams/src/accessibility_window_manager.cpp | 2 +- services/aams/src/accessible_ability_manager_service.cpp | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/services/aams/src/accessibility_window_manager.cpp b/services/aams/src/accessibility_window_manager.cpp index bb0ccd66..3789fcf3 100644 --- a/services/aams/src/accessibility_window_manager.cpp +++ b/services/aams/src/accessibility_window_manager.cpp @@ -830,7 +830,7 @@ void AccessibilityWindowManager::WindowUpdateAll(const std::vectoruiNodeId_); } - if (a11yWindows_[realWid].IsFocused()) { + if (window->focused_) { SetActiveWindow(realWid); } diff --git a/services/aams/src/accessible_ability_manager_service.cpp b/services/aams/src/accessible_ability_manager_service.cpp index c732d748..5f4d065a 100644 --- a/services/aams/src/accessible_ability_manager_service.cpp +++ b/services/aams/src/accessible_ability_manager_service.cpp @@ -1977,10 +1977,12 @@ void AccessibleAbilityManagerService::UpdateAccessibilityWindowStateByEvent(cons switch (evtType) { case TYPE_VIEW_HOVER_ENTER_EVENT: - case TYPE_VIEW_ACCESSIBILITY_FOCUSED_EVENT: Singleton::GetInstance().SetActiveWindow(windowId, false); Singleton::GetInstance().SetAccessibilityFocusedWindow(windowId); break; + case TYPE_VIEW_ACCESSIBILITY_FOCUSED_EVENT: + Singleton::GetInstance().SetAccessibilityFocusedWindow(windowId); + break; default: break; }