Restore backwards compatibility of SecureDesktopNVDAObject #14116
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
After merging to beta, translations should be pushed and translators should be notified of the lines removed.
Link to issue number:
Follow up to #14105
Fixes issue described in #14111 (comment)
Summary of the issue:
SecureDesktopNVDAObject
is an API end point used to indicate to the user and to API consumers (including NVDA remote), that the user has switched to a secure desktop.This is triggered when Windows notification
EVENT_SYSTEM_DESKTOPSWITCH
notifies that the desktop has changed.The switch is handled via a
gainFocus
event.The
gainFocus
event causes the user instance of NVDA to enter sleep mode as the secure mode NVDA instance starts on the secure screen.Information from
SecureDesktopNVDAObject
should not be accessible to the user, as it is backed by a valid MSAA desktop running on a secure profile, that NVDA can report information from.This should generally be handled by NVDA entering sleep mode.
In #14105,
SecureDesktopNVDAObject
became based onNVDAObject
to improve security for the object, by breaking it's connection to a valid window.This was to decrease the theoretical risk of information leakage.
However, it was discovered that NVDA core event tracking and API consumers rely on
SecureDesktopNVDAObject
inheriting fromWindow
(a parent class ofDesktop
).As such,
SecureDesktopNVDAObject
must remain aDesktop
subclass to retain backwards compatibility.However we can prevent neighbouring objects from being accessed.
Description of user facing changes
Fixes bug in NVDA alpha with handling
SecureDesktopNVDAObject
.Fixes API breakage.
Description of development approach
Reverts the change in #14105, making
SecureDesktopNVDAObject
inherit fromDesktop
.Prevents neighbouring objects to
SecureDesktopNVDAObject
from being accessed by overriding relevant methods.Testing strategy:
Checked diff between
release-2022.2.2
and this branch.Ensured "Secure Desktop" was still announced when switching to a secure desktop, i.e. #14094 was still fixed.
Known issues with pull request:
SecureDesktopNVDAObject
is being used an API end point for handling aEVENT_SYSTEM_DESKTOPSWITCH
to a secure desktop.Using a
gainFocus
event on anNVDAObject
to handle a Windows notification seems to be an obscure method of handling events.NVDA has
extensionPoint
s for that purpose.In 2023.1
SecureDesktopNVDAObject
should be removed, replaced by an extension point to notify add-ons that NVDA has entered a secure desktop.Change log entries:
See PR diff
Code Review Checklist: