!1496 修改sendEvent时,accessibility_focus_event不更新activeWindowId

Merge pull request !1496 from qianchuang/master
This commit is contained in:
openharmony_ci 2024-10-17 13:23:57 +00:00 committed by Gitee
commit 812b23b67a
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
2 changed files with 4 additions and 2 deletions

View File

@ -830,7 +830,7 @@ void AccessibilityWindowManager::WindowUpdateAll(const std::vector<sptr<Rosen::A
sceneBoardElementIdMap_.InsertPair(realWid, window->uiNodeId_);
}
if (a11yWindows_[realWid].IsFocused()) {
if (window->focused_) {
SetActiveWindow(realWid);
}

View File

@ -1977,10 +1977,12 @@ void AccessibleAbilityManagerService::UpdateAccessibilityWindowStateByEvent(cons
switch (evtType) {
case TYPE_VIEW_HOVER_ENTER_EVENT:
case TYPE_VIEW_ACCESSIBILITY_FOCUSED_EVENT:
Singleton<AccessibilityWindowManager>::GetInstance().SetActiveWindow(windowId, false);
Singleton<AccessibilityWindowManager>::GetInstance().SetAccessibilityFocusedWindow(windowId);
break;
case TYPE_VIEW_ACCESSIBILITY_FOCUSED_EVENT:
Singleton<AccessibilityWindowManager>::GetInstance().SetAccessibilityFocusedWindow(windowId);
break;
default:
break;
}