Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No longer use SecureDesktopNVDAObject in 2024.1+ #12

Merged
merged 1 commit into from
Sep 7, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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