a11y atspi: Take dialog into account as top-level window
Since a dialog is also a top-level window, it should be taken into account when trying to find the accessible's top-level window, relative to which the position will be calulated for `ATSPI_COORD_TYPE_WINDOW`. Fixes: QTBUG-105042 Change-Id: I74fae096fd886bab04187c122f268c26c91b86ab Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> (cherry picked from commit 49c966bc8561d1ca71a97b83ae40852233630eb9) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit is contained in:
parent
42d8fe6b10
commit
3e12229c67
@ -1523,11 +1523,12 @@ bool AtSpiAdaptor::inheritsQAction(QObject *object)
|
||||
// Component
|
||||
static QAccessibleInterface * getWindow(QAccessibleInterface * interface)
|
||||
{
|
||||
if (interface->role() == QAccessible::Window)
|
||||
if (interface->role() == QAccessible::Dialog || interface->role() == QAccessible::Window)
|
||||
return interface;
|
||||
|
||||
QAccessibleInterface * parent = interface->parent();
|
||||
while (parent && parent->role() != QAccessible::Window)
|
||||
while (parent && parent->role() != QAccessible::Dialog
|
||||
&& parent->role() != QAccessible::Window)
|
||||
parent = parent->parent();
|
||||
|
||||
return parent;
|
||||
|
Loading…
x
Reference in New Issue
Block a user