summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authorMichael Weghorn <m.weghorn@posteo.de>2024-05-07 08:19:35 +0200
committerMichael Weghorn <m.weghorn@posteo.de>2024-05-07 16:16:41 +0200
commitfedd4886b0b63ea3254ea4ce4b7f9b5b73af95f0 (patch)
treea6cae88c154ca5379ff3dc2683faa55699b7b816 /vcl
parentf44b1cf1fc2925d54512f1f04361ac2c2fc7d276 (diff)
gtk3 a11y: Drop VclEventId::MenuHighlight processing
Drop the manual processing of `VclEventId::MenuHighlight` in the gtk3 a11y bridge. As mentioned in commit c45c64aeb57dce91965d7be54601128946455c90 Author: Michael Weghorn <m.weghorn@posteo.de> Date: Mon May 6 14:44:36 2024 +0200 tdf#160806 tdf#160837 gtk3 a11y: Drop handling of some VclEventIds , the a11y bridge should not have to handle VCL events itself, but all relevant events should be forwarded to the a11y event listener as appropriate `AccessibleEventObject` and be handled by the a11y event listener instead, see `AtkListener::notifyEvent` for the gtk3 implementation. In a quick test, menu items were still announced just fine by the Orca screen reader when using the gtk3 VCL plugin with this commit in place. By now, most menus should be native GTK widgets anyway. For non-native menus, `OAccessibleMenuBaseComponent::ProcessMenuEvent` contains handling for the `VclEventId::MenuHighlight` event that should be taking care of forwarding that as the corresponding a11y event to the a11y bridges. If anything is missing after this commit, that's probably a good starting point for further analysis. Change-Id: Ia8686101dc559ed98b48285eac15c35fc10818af Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167254 Reviewed-by: Michael Weghorn <m.weghorn@posteo.de> Tested-by: Jenkins
Diffstat (limited to 'vcl')
-rw-r--r--vcl/unx/gtk3/a11y/atkutil.cxx35
1 files changed, 0 insertions, 35 deletions
diff --git a/vcl/unx/gtk3/a11y/atkutil.cxx b/vcl/unx/gtk3/a11y/atkutil.cxx
index 6cc52a56ba6c..d10bc3b27967 100644
--- a/vcl/unx/gtk3/a11y/atkutil.cxx
+++ b/vcl/unx/gtk3/a11y/atkutil.cxx
@@ -306,47 +306,12 @@ rtl::Reference<DocumentFocusListener> GtkSalData::GetDocumentFocusListener()
return xDFL;
}
-static void handle_menu_highlighted(::VclMenuEvent const * pEvent)
-{
- try
- {
- Menu* pMenu = pEvent->GetMenu();
- sal_uInt16 nPos = pEvent->GetItemPos();
-
- if( pMenu && nPos != 0xFFFF)
- {
- uno::Reference< accessibility::XAccessible > xAccessible ( pMenu->GetAccessible() );
-
- if( xAccessible.is() )
- {
- uno::Reference< accessibility::XAccessibleContext > xContext ( xAccessible->getAccessibleContext() );
-
- if( xContext.is() )
- atk_wrapper_notify_focus_change(xContext->getAccessibleChild(nPos));
- }
- }
- }
- catch (const uno::Exception&)
- {
- g_warning( "Exception caught processing menu highlight events" );
- }
-}
-
-/*****************************************************************************/
-
static void WindowEventHandler(void *, VclSimpleEvent& rEvent)
{
try
{
switch (rEvent.GetId())
{
- case VclEventId::MenuHighlight:
- if (const VclMenuEvent* pMenuEvent = dynamic_cast<const VclMenuEvent*>(&rEvent))
- {
- handle_menu_highlighted(pMenuEvent);
- }
- break;
-
case VclEventId::TabpageActivate:
handle_tabpage_activated(static_cast< ::VclWindowEvent const * >(&rEvent)->GetWindow());
break;