Closed drmfinlay closed 2 years ago
Thanks Dane for digging into this. I didn't put much research into these lines: basically I was supporting what I had tested which was only Windows and Linux. So what you describe makes sense and sounds better!
Hi James,
Checking for Windows or Linux is fine in most cases, of course. I'll make the change and adjust the documentation page appropriately.
I hope to open a separate pull request with a few minor changes to the accessibility sub-package.
As mentioned in #362, the variable mentioned above is unreliable. I'll check for DISPLAY instead.
I could also add a check for WAYLAND_DISPLAY, although I'm not sure if there's much point. If there is someone really interested in that, they can get in touch.
CC @wolfmanstout
The following platform check for using the AT-SPI accessibility controller on Linux seems somewhat incorrect to me: https://github.com/dictation-toolbox/dragonfly/blob/118defba2d90dfc1b21b388850e998e1735241f2/dragonfly/accessibility/__init__.py#L11-L13
My understanding is that AT-SPI is supposed to work on "Free Desktop" environments, e.g. GNOME. This means that while the software runs on Linux distributions, it will also run on a BSD system or in an environment like Cygwin on Windows.
To be in line with the rest of the library, this should be changed to check whether the
XDG_SESSION_TYPE
environment variable is set. (I think Wayland may support AT-SPI.) I'll also move this above the Windows platform check as I am doing elsewhere.