Control: reopen -1
Control: found -1 5.15.8+dfsg-5

Hello,

So the patch that was submitted upstream is indeed posing
problems: #1034160, #1034169, #1034191. AIUI, I guess that connecting
the enabledChanged signal too early is problematic because the code is
not actually ready to handle it because initialization is not finished.

I however came up with another way to fix the issue, that is way simpler
and should really not pose any problem since that's the way it's
happening in the normal case. I have submitted it upstream, and here is
the change.

Samuel
Description: fix accessibility on XCB when running as root
 Accessibility actually works when running applications as root, but we
 would never properly connect, since the enabledChanged signal would be
 emitted from the constructor in this case. So after connecting the
 signal, check the value by hand to make sure not to miss the
 notification.
 Only applications running as root would be affected, because all other
 applications would go through the asynchronous pattern of getting the
 bus address from dbus instead.
Origin: https://codereview.qt-project.org/c/qt/qtbase/+/205196
Bug: https://bugs.debian.org/1033995
Last-Update: 2023-04-09

--- a/src/platformsupport/linuxaccessibility/bridge.cpp
+++ b/src/platformsupport/linuxaccessibility/bridge.cpp
@@ -65,6 +65,10 @@ QSpiAccessibleBridge::QSpiAccessibleBrid
 {
     dbusConnection = new DBusConnection();
     connect(dbusConnection, SIGNAL(enabledChanged(bool)), this, 
SLOT(enabledChanged(bool)));
+    // Now that we have connected the signal, make sure we didn't miss a 
change,
+    // e.g. when running as root or when AT_SPI_BUS_ADDRESS is set by hand.
+    if (dbusConnection->isEnabled())
+        enabledChanged(true);
 }
 
 void QSpiAccessibleBridge::enabledChanged(bool enabled)

Reply via email to