summaryrefslogtreecommitdiffstats
path: root/src/gui/accessible
diff options
context:
space:
mode:
authorMichael Weghorn <m.weghorn@posteo.de>2022-07-18 14:48:51 +0200
committerMichael Weghorn <m.weghorn@posteo.de>2022-08-17 02:46:59 +0000
commit49c966bc8561d1ca71a97b83ae40852233630eb9 (patch)
treedf145a3dd80e593eb1f1cad247dae81c57893036 /src/gui/accessible
parentd40dacf5f4697a57314ec77709e4551977d97c29 (diff)
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 Pick-to: 6.4 6.3 6.2 Change-Id: I74fae096fd886bab04187c122f268c26c91b86ab Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Diffstat (limited to 'src/gui/accessible')
-rw-r--r--src/gui/accessible/linux/atspiadaptor.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/gui/accessible/linux/atspiadaptor.cpp b/src/gui/accessible/linux/atspiadaptor.cpp
index ccd75c2eea..6f6583f814 100644
--- a/src/gui/accessible/linux/atspiadaptor.cpp
+++ b/src/gui/accessible/linux/atspiadaptor.cpp
@@ -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;