From 1a8132515babca53b1f1a464236e05f780cbfef3 Mon Sep 17 00:00:00 2001 From: Michael Weghorn Date: Sat, 2 Jul 2022 11:00:01 +0200 Subject: tdf#149816 qt a11y: Report position in screen coordinates `QAccessibleInterface::rect()` is supposed to report the geometry in screen coordinates [1]. `XAccessibleComponent::getLocationOnScreen` returns the position in screen coordinates, so use that instead of `XAccessibleComponent::getLocation`, which returns the position relative to the parent. With this in place, Accerciser correctly highlights the area of the item curently selected in its treeview of the LO a11y hierarchy. [1] https://doc.qt.io/qt-6/qaccessibleinterface.html#rect Change-Id: Iefb1e8792cd3ee720feafc81744e5e6ed6a949c4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136781 Tested-by: Jenkins Reviewed-by: Michael Weghorn --- vcl/qt5/QtAccessibleWidget.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'vcl') diff --git a/vcl/qt5/QtAccessibleWidget.cxx b/vcl/qt5/QtAccessibleWidget.cxx index 3461ec1ae38c..5e66459ce054 100644 --- a/vcl/qt5/QtAccessibleWidget.cxx +++ b/vcl/qt5/QtAccessibleWidget.cxx @@ -264,7 +264,7 @@ QRect QtAccessibleWidget::rect() const return QRect(); Reference xAccessibleComponent(xAc, UNO_QUERY); - awt::Point aPoint = xAccessibleComponent->getLocation(); + awt::Point aPoint = xAccessibleComponent->getLocationOnScreen(); awt::Size aSize = xAccessibleComponent->getSize(); return QRect(aPoint.X, aPoint.Y, aSize.Width, aSize.Height); -- cgit