Enable accessibility on Linux when org.a11y.Status IsEnable is true

Otherwise accessibility would only work when Orca is set to be started
in the session preference, and it would not work when running Orca or
compiz' zoom by hand.

The existing comment said that it was always true since gnome 3.6, but at
least in Debian 8's gnome 3.14, Debian 9's gnome 3.22, and Debian 10's
3.30 it is not always true, it is Orca which sets it on startup. Compiz's
focuspoll module also does so for people with low vision using zoom with
focus tracking.

[ChangeLog][Accessibility][Linux] Enable accessibility on Linux when Orca is
started by hand

Change-Id: I36cfe1b45e442c0fcefe813e09a67a74205c3ecf
Reviewed-by: Frederik Gladhorn <gladhorn@kde.org>
This commit is contained in:
Samuel Thibault 2020-01-12 20:55:11 +01:00
parent 64b1af3fa0
commit 54886d7f81

View File

@ -120,8 +120,7 @@ void DBusConnection::serviceRegistered()
//debugging.
static const bool a11yAlwaysOn = qEnvironmentVariableIsSet("QT_LINUX_ACCESSIBILITY_ALWAYS_ON");
// a11yStatus->isEnabled() returns always true (since Gnome 3.6)
bool enabled = a11yAlwaysOn || a11yStatus->screenReaderEnabled();
bool enabled = a11yAlwaysOn || a11yStatus->screenReaderEnabled() || a11yStatus->isEnabled();
if (enabled != m_enabled) {
m_enabled = enabled;