summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authorMichael Weghorn <m.weghorn@posteo.de>2023-11-06 12:02:22 +0100
committerMichael Weghorn <m.weghorn@posteo.de>2023-11-07 07:51:30 +0100
commit0769e5e698a9cff77a815118dad82bc763520679 (patch)
tree652eb5e6e27a7e3e63fb729a555ef131b1d901cb /vcl
parent698935c220131bc761eb9cf25e01fa91087a788e (diff)
tdf#135236 gtk3 a11y: Restore AtkObject's focus_event
After commit 14e6a810e14e28ab82fe65d66e604ce562016845 Date: Mon Aug 15 13:14:08 2022 +0100 fix "invalid class cast from 'OOoAtkObj' to 'GtkWidgetAccessible'" , Orca with the gtk3 VCL plugin was no longer announcing focus (and content) for the "Not in dictionary" text edit in Writer's spelling dialog ("Tools" -> "Spelling") when moving the focus there e.g. using the Tab key. Make it work again by restoring the `focus_event` function from `AtkObject`, similar to how commit f0827c392641b45647241b3a22e24a95e2b595e3 Date: Fri Aug 19 16:13:04 2022 +0100 Resolves: tdf#150496 we want the AtkObject get_parent function GtkAccessible overrode it, but we expect the AtkObject implementation did for the `get_parent` function to fix the announcement of Writer paragraphs after the above-mentioned commit. The other functions that `gtk_widget_accessible_class_init` overrides [1] are already explicitly set to the wrapper ones (s. the lines above the ones added in this commit), so don't need additional changes. [1] https://gitlab.gnome.org/GNOME/gtk/-/blob/c47425c62efb99be8cd2f0eea651dda76a99ba04/gtk/a11y/gtkwidgetaccessible.c#L542-557 Change-Id: Iae3b47f7fa7fe5ca90acb045a077cf0af52dd7fa Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158990 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Diffstat (limited to 'vcl')
-rw-r--r--vcl/unx/gtk3/a11y/atkwrapper.cxx2
1 files changed, 2 insertions, 0 deletions
diff --git a/vcl/unx/gtk3/a11y/atkwrapper.cxx b/vcl/unx/gtk3/a11y/atkwrapper.cxx
index 729da012e067..8caf40020d13 100644
--- a/vcl/unx/gtk3/a11y/atkwrapper.cxx
+++ b/vcl/unx/gtk3/a11y/atkwrapper.cxx
@@ -704,6 +704,8 @@ atk_object_wrapper_class_init (AtkObjectWrapperClass *klass)
// but we want the original behaviour we got from atk_object_real_get_parent when we inherited
// from AtkObject
atk_class->get_parent = orig_atk_klass->get_parent;
+ // and likewise for focus_event
+ atk_class->focus_event = orig_atk_klass->focus_event;
g_type_class_unref(orig_atk_klass);
}