summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2023-03-21 13:08:17 +0000
committerCaolán McNamara <caolanm@redhat.com>2023-03-21 14:57:46 +0000
commit5f5e1a3204b98b9e74bded50ba0eddd4fb371301 (patch)
tree811c3bb6eb738f7f646c7e9486f783207c8313a7 /vcl
parentf7e5c9bee73c9834312a78adb8d040ed78c6c0ef (diff)
gtk4: use PANEL a11y role for VclBox under gtk4
Change-Id: I0cd6bb9578c177947741bb6d8d21237faf41679d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149214 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'vcl')
-rw-r--r--vcl/source/window/layout.cxx11
1 files changed, 8 insertions, 3 deletions
diff --git a/vcl/source/window/layout.cxx b/vcl/source/window/layout.cxx
index 8c102bd6004c..6befd3399520 100644
--- a/vcl/source/window/layout.cxx
+++ b/vcl/source/window/layout.cxx
@@ -401,12 +401,17 @@ void VclBox::DumpAsPropertyTree(tools::JsonWriter& rJsonWriter)
sal_uInt16 VclBox::getDefaultAccessibleRole() const
{
+ // fdo#74284 call Boxes Panels, keep them as "Filler" under
+ // at least Linux seeing as that's what Gtk3 did for GtkBoxes.
+ // Though now with Gtk4 that uses GTK_ACCESSIBLE_ROLE_GROUP
+ // which maps to ATSPI_ROLE_PANEL
#if defined(_WIN32)
- //fdo#74284 call Boxes Panels, keep them as "Filler" under
- //at least Linux seeing as that's what Gtk does for GtkBoxes
return css::accessibility::AccessibleRole::PANEL;
#else
- return css::accessibility::AccessibleRole::FILLER;
+ static sal_uInt16 eRole = Application::GetToolkitName() == "gtk4" ?
+ css::accessibility::AccessibleRole::PANEL :
+ css::accessibility::AccessibleRole::FILLER;
+ return eRole;
#endif
}