From a0717c60b30be5f7aa4c9dcde06a42f9ee532f0f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Mill=C3=A1n=20Soto?= Date: Fri, 15 Sep 2017 20:15:00 +0200 Subject: Handle coordinates related to component window AtSpiAdaptor::componentInterface was not checking the coordinate type in GetAccessibleAtPoint. Now, if the coordinate type is ATSPI_COORD_TYPE_WINDOW the coordinates of the window will be added to the specified coordinates. Change-Id: Iba571109a8da300f4141d616a94ef4ac87918f98 Reviewed-by: Jesus Fernandez Reviewed-by: Frederik Gladhorn --- src/platformsupport/linuxaccessibility/atspiadaptor.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/platformsupport/linuxaccessibility/atspiadaptor.cpp b/src/platformsupport/linuxaccessibility/atspiadaptor.cpp index a936ec7aad..580cf0e31d 100644 --- a/src/platformsupport/linuxaccessibility/atspiadaptor.cpp +++ b/src/platformsupport/linuxaccessibility/atspiadaptor.cpp @@ -1601,7 +1601,13 @@ bool AtSpiAdaptor::componentInterface(QAccessibleInterface *interface, const QSt int x = message.arguments().at(0).toInt(); int y = message.arguments().at(1).toInt(); uint coordType = message.arguments().at(2).toUInt(); - Q_UNUSED (coordType) // FIXME + if (coordType == ATSPI_COORD_TYPE_WINDOW) { + QWindow * window = interface->window(); + if (window) { + x += window->position().x(); + y += window->position().y(); + } + } QAccessibleInterface * childInterface(interface->childAt(x, y)); QAccessibleInterface * iface = 0; -- cgit v1.2.3