diff options
author | Harald Sitter <sitter@kde.org> | 2023-08-01 13:56:24 +0200 |
---|---|---|
committer | Liang Qi <liang.qi@qt.io> | 2023-10-04 12:54:33 +0000 |
commit | 918fed39156c90540a12557c7a6630ae3d7d841e (patch) | |
tree | 95e1d797844dab658a759f9cc8371ef8c008042b /src/gui/accessible | |
parent | 8615884728c186980ddc1e7e8a862423b035ac4d (diff) |
a11y: fix race condition on atspi startup on Wayland
This amends db346e711c9af50566c234cfc21199680e6cb499 .
Previously we could race between dbus connecting and our "manual"
enabled call since we didn't take into account whether dbus is
connected or not.
This lead to scenarios where opening an application (in particular under
Wayland) would result in the application not being able to register on
the a11y bus because registration was attempted too early.
By simply taking connectedness into account we'll make sure to not
run registration too early anymore.
Pick-to: 6.6 6.5
Change-Id: I46a3c0b57f8a0c83d3e5fae9e355c2061954031f
Reviewed-by: Liang Qi <liang.qi@qt.io>
Diffstat (limited to 'src/gui/accessible')
-rw-r--r-- | src/gui/accessible/linux/qspiaccessiblebridge.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gui/accessible/linux/qspiaccessiblebridge.cpp b/src/gui/accessible/linux/qspiaccessiblebridge.cpp index 2daadd9830..de2e7d5fc0 100644 --- a/src/gui/accessible/linux/qspiaccessiblebridge.cpp +++ b/src/gui/accessible/linux/qspiaccessiblebridge.cpp @@ -38,7 +38,7 @@ QSpiAccessibleBridge::QSpiAccessibleBridge() // But do that only on next loop, once dbus is really settled. QTimer::singleShot( 0, this, [this]{ - if (dbusConnection->isEnabled()) + if (dbusConnection->isEnabled() && dbusConnection->connection().isConnected()) enabledChanged(true); }); } |