Skip to content

Commit

Permalink
No longer use SecureDesktopNVDAObject in 2024.1+ (#12)
Browse files Browse the repository at this point in the history
  • Loading branch information
LeonarddeR authored Sep 7, 2023
1 parent 8f6db19 commit 736128f
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 4 deletions.
7 changes: 5 additions & 2 deletions addon/globalPlugins/rdAccess/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
import api
import atexit
from utils.security import isRunningOnSecureDesktop
from IAccessibleHandler import SecureDesktopNVDAObject
from .secureDesktopHandling import SecureDesktopHandler
import versionInfo

Expand Down Expand Up @@ -349,7 +348,11 @@ def event_gainFocus(self, obj, nextHandler):
except Exception:
log.error("Error calling event_gainFocus on handler", exc_info=True)
continue
if configuredOperatingMode & configuration.OperatingMode.SECURE_DESKTOP:
if (
configuredOperatingMode & configuration.OperatingMode.SECURE_DESKTOP
and not secureDesktop.hasSecureDesktopExtensionPoint
):
from IAccessibleHandler import SecureDesktopNVDAObject
if isinstance(obj, SecureDesktopNVDAObject):
secureDesktop.post_secureDesktopStateChange.notify(isSecureDesktop=True)
elif self._sdHandler:
Expand Down
7 changes: 6 additions & 1 deletion addon/lib/secureDesktop.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@
# License: GNU General Public License version 2.0

from extensionPoints import Action
import versionInfo

hasSecureDesktopExtensionPoint = versionInfo.version_year >= 2024

post_secureDesktopStateChange = Action()
if hasSecureDesktopExtensionPoint:
from winAPI.secureDesktop import post_secureDesktopStateChange
else:
post_secureDesktopStateChange = Action()
4 changes: 3 additions & 1 deletion readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,11 @@ This enables a user experience where managing a remote system feels just as perf
* Ability to use speech and braille from the user session when accessing secure desktops

## Changelog

### Version 1.1

- Added support for NVDA 2023.3 style device registration for automatic detection of braille displays [#11](https://github.com/leonardder/rdAccess/pull/11)
- Added support for NVDA 2023.3 style device registration for automatic detection of braille displays. [#11](https://github.com/leonardder/rdAccess/pull/11)
- Added support for NVDA 2024.1 Alpha `winAPI.secureDesktop.post_secureDesktopStateChange` extension point. [#12](https://github.com/leonardder/rdAccess/pull/12)

### Version 1.0

Expand Down

0 comments on commit 736128f

Please sign in to comment.