diff options
author | Caolán McNamara <caolanm@redhat.com> | 2023-03-21 13:08:17 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2023-03-21 14:57:46 +0000 |
commit | 5f5e1a3204b98b9e74bded50ba0eddd4fb371301 (patch) | |
tree | 811c3bb6eb738f7f646c7e9486f783207c8313a7 /vcl | |
parent | f7e5c9bee73c9834312a78adb8d040ed78c6c0ef (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.cxx | 11 |
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 } |