summaryrefslogtreecommitdiffstats
path: root/lotuswordpro/source/filter/lwpfootnote.cxx
diff options
context:
space:
mode:
authorMichael Weghorn <m.weghorn@posteo.de>2024-05-23 15:39:34 +0200
committerMichael Weghorn <m.weghorn@posteo.de>2024-05-24 06:25:54 +0200
commitee168614ddea2f349e80372599296e835080f264 (patch)
treec12bc982aa7a2df474f5bf007a918e999af870ec /lotuswordpro/source/filter/lwpfootnote.cxx
parentandroid-viewer translated using Weblate (diff)
downloadcore-ee168614ddea2f349e80372599296e835080f264.tar.gz
core-ee168614ddea2f349e80372599296e835080f264.zip
tdf#160971 gtk3 a11y: Manually unset focus for combobox popup
The gtk3 VCL plugin uses a custom implementation that has a listbox in a popup (s. vcl/uiconfig/ui/combobox.ui). The popup window gets shown when expanding the combobox, e.g. using Alt+Up/Alt+Down while the edit has focus. Once the popup is closed again, focus is given to the edit again. That one correctly reports focus when checked via `gtk_widget_has_focus`, but for some unknown reason, the listbox in the popup assumes/claims it still has global keyboard focus as well, despite it no longer being visible and the `gtk_widget_has_focus` doc [1] explicitly mentioning: > Determines if the widget has the global input focus. > See gtk_widget_is_focus() for the difference between having the global input focus, and only having the focus > within a toplevel. The tree view listbox still assuming focus leads to it emitting invalid active-descendant-changed a11y events when the selected entry changes, which e.g. breaks focus tracking by the Orca screen reader. As a consequence, current Orca git main (as of commit d70919051ef01384c473e08321a88cec52549cd2) doesn't doesn't announce the new value of e.g. the "Font Name" combobox in the Writer toolbar when changing it via the Up/Down arrow keys any more once the popup has been shown. (It works fine before showing the popup for the first time.) To avoid that problem, manually unset the focus using `gtk_widget_send_focus_change`. Its doc [2] mentions > This function is not meant to be used by applications. , but since the focus is apparently not unset automatically, still use it as a workaround for now. [1] https://docs.gtk.org/gtk3/method.Widget.has_focus.html [2] https://docs.gtk.org/gtk3/method.Widget.send_focus_change.html Change-Id: Ifd32c2a66b4a7b9e827f5c8dc2927c7e359a42aa Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167994 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Diffstat (limited to 'lotuswordpro/source/filter/lwpfootnote.cxx')
0 files changed, 0 insertions, 0 deletions