winaccessibility/source/service/AccObjectWinManager.cxx | 4 +--- winaccessibility/source/service/AccTopWindowListener.cxx | 3 +-- 2 files changed, 2 insertions(+), 5 deletions(-)
New commits: commit d5df7f87b4b422502606ce8420097622ddbb7aa4 Author: Michael Weghorn <m.wegh...@posteo.de> AuthorDate: Thu Dec 19 16:19:36 2024 +0000 Commit: Michael Weghorn <m.wegh...@posteo.de> CommitDate: Thu Dec 19 19:30:47 2024 +0100 wina11y: Deduplicate 2 cases doing the same Change-Id: I1135434fa99d3accb230e379850bcb6651663260 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/178829 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.wegh...@posteo.de> diff --git a/winaccessibility/source/service/AccObjectWinManager.cxx b/winaccessibility/source/service/AccObjectWinManager.cxx index c6edbb0b0392..7b9b8821134a 100644 --- a/winaccessibility/source/service/AccObjectWinManager.cxx +++ b/winaccessibility/source/service/AccObjectWinManager.cxx @@ -717,14 +717,12 @@ AccObjectWinManager::CreateAccEventListener(XAccessible* pXAcc) pRet = new AccDialogEventListener(pXAcc, *this); break; case AccessibleRole::FRAME: + case AccessibleRole::ROOT_PANE: pRet = new AccFrameEventListener(pXAcc, *this); break; case AccessibleRole::WINDOW: pRet = new AccWindowEventListener(pXAcc, *this); break; - case AccessibleRole::ROOT_PANE: - pRet = new AccFrameEventListener(pXAcc, *this); - break; //Container case AccessibleRole::CANVAS: case AccessibleRole::COMBO_BOX: commit 3077098976996fdd9573eed2ebffdd4356423567 Author: Michael Weghorn <m.wegh...@posteo.de> AuthorDate: Thu Dec 19 15:55:05 2024 +0000 Commit: Michael Weghorn <m.wegh...@posteo.de> CommitDate: Thu Dec 19 19:30:39 2024 +0100 tdf#157001 wina11y: Remove popup menu with its children In AccTopWindowListener::windowClosed, drop the special handling that was causing a popup menu (floating window)'s accessible to not be removed from the objects that the AccObjectWinManager manages. It's unclear to me why that special handling was there for accessibles with role css::accessibility::AccessibleRole::POPUP_MENU, but might have been some workaround for another issue fixed in the meanwhile. Removing the menu's children, but not the menu itself would result in the menu's children not to be reinserted (and thus no a11y listeners be registered) when the menu is shown again after being closed, so that no focus events for the children would be sent by the Windows a11y bridge. Remove the menu's accessible as well and rely on the default logic. This makes NVDA announce menu entries in Calc's Organize Template menu also once the menu has been closed and is then opened again. Change-Id: Ie9cf96cad95215b9aeb0ebd7e4970da3c35b92c4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/178825 Reviewed-by: Michael Weghorn <m.wegh...@posteo.de> Tested-by: Jenkins diff --git a/winaccessibility/source/service/AccTopWindowListener.cxx b/winaccessibility/source/service/AccTopWindowListener.cxx index 3938ec61843d..cf27e30cb10a 100644 --- a/winaccessibility/source/service/AccTopWindowListener.cxx +++ b/winaccessibility/source/service/AccTopWindowListener.cxx @@ -193,8 +193,7 @@ void AccTopWindowListener::windowClosed( const css::lang::EventObject& e ) } m_aAccObjectManager.DeleteChildrenAccObj(xAccessible.get()); - if( role != css::accessibility::AccessibleRole::POPUP_MENU ) - m_aAccObjectManager.DeleteAccObj(xAccessible.get()); + m_aAccObjectManager.DeleteAccObj(xAccessible.get()); } void AccTopWindowListener::windowMinimized( const css::lang::EventObject& )