diff options
author | Michael Weghorn <m.weghorn@posteo.de> | 2023-07-13 14:32:32 +0200 |
---|---|---|
committer | Michael Weghorn <m.weghorn@posteo.de> | 2023-07-14 07:40:40 +0200 |
commit | 4ded0e7c874e8b8052a2afa55c4cdaa0b5d095b8 (patch) | |
tree | 9d34ff7c5dbb0f184b0663959ef5792cf0e296fa /vcl | |
parent | d54a48c008dc9c9cf206d7c7dd37b8d2fdd4e86d (diff) |
gtk3 a11y: Map push button menu role to ATK equivalent
at-spi2-core commit [1]
commit ed16f50e4930e32c29f80552eb698baa35b4677e
Date: Thu Jul 21 21:49:32 2022 +0800
Add `ATK_ROLE_PUSH_BUTTON_MENU`
has added a `ATK_ROLE_PUSH_BUTTON_MENU` role
(and `ATSPI_ROLE_PUSH_BUTTON_MENU` on the AT-SPI
layer, note also pending related MR [2] to also
increase `ATSPI_ROLE_COUNT` accordingly),
so map LO's `BUTTON_MENU` role to that
when using a new enough ATK version
(available from ATK 2.46 on).
[1] https://gitlab.gnome.org/GNOME/at-spi2-core/-/commit/ed16f50e4930e32c29f80552eb698baa35b4677e
[2] https://gitlab.gnome.org/GNOME/at-spi2-core/-/merge_requests/146
Change-Id: I9fbbc595245d212b8e79a80a1f82c363b2b402c2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154387
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/unx/gtk3/a11y/atkwrapper.cxx | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/vcl/unx/gtk3/a11y/atkwrapper.cxx b/vcl/unx/gtk3/a11y/atkwrapper.cxx index f322987dbbcd..904358a2d229 100644 --- a/vcl/unx/gtk3/a11y/atkwrapper.cxx +++ b/vcl/unx/gtk3/a11y/atkwrapper.cxx @@ -309,7 +309,11 @@ static AtkRole mapToAtkRole( sal_Int16 nRole ) case accessibility::AccessibleRole::BUTTON_DROPDOWN: return ATK_ROLE_PUSH_BUTTON; case accessibility::AccessibleRole::BUTTON_MENU: +#if ATK_CHECK_VERSION(2, 46, 0) + return ATK_ROLE_PUSH_BUTTON_MENU; +#else return ATK_ROLE_PUSH_BUTTON; +#endif case accessibility::AccessibleRole::CAPTION: return ATK_ROLE_CAPTION; case accessibility::AccessibleRole::CHART: |