Free display on secure desktop switch#18810
Conversation
|
I like this new approach a lot more.
I think that adding this feature is worth the trade off. What do you have in mind to improve this?
I think that makes sense for how NVDA should work. |
When a display is detected, we can store its device match on the braille handler as _lastDetectedDisplay. Then, after closing the secure desktop, we initialise detection giving preference to the last detected display. |
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
|
Regarding the ux, we can also bind the auto disconnect to the auto detect function only. I think that actually makes much sense. It also avoids NVDA main thread freezes when reinitializing a display on the main thread that was manually detected. |
|
@LeonarddeR in general this looks pretty good to me. I am a little concerned about not freeing the display if auto-detection is disabled:
|
|
@SaschaCowley wrote:
Behavior won't change this pr, i.e. the display is held by the user session.
They can't as long as the user copy holds the display. I'm happy to revert that particular change. Do we want to make the new feature configurable instead? I'm a bit worried that especially users of manual display selection will have a more laggy experience when entering and closing secure desktop, especially when Bluetooth is used. That said, I don't think we have Bluetooth displays in core that don't support automatic detection. |
|
I'd remove the configurability for now. If we hear about cases where this negatively impacts users, we can add configuration back in later. |
There was a problem hiding this comment.
Pull Request Overview
This PR enables braille displays to work on secure desktops by automatically disconnecting the display when entering a secure desktop and reconnecting when exiting. This allows the secure desktop copy of NVDA to access the braille display while preventing device conflicts.
- Added secure desktop state change extension point to the braille handler
- Implemented automatic disconnection/reconnection of braille displays on secure desktop transitions
- Added preferred device support to braille detection for faster reconnection
Reviewed Changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| user_docs/en/changes.md | Added changelog entry documenting the new braille secure desktop feature |
| source/gui/settingsDialogs.py | Added bdDetect to advanced settings debug logging options |
| source/config/configSpec.py | Added bdDetect configuration option for debug logging |
| source/braille.py | Core implementation of secure desktop switching with display disconnection/reconnection |
| source/bdDetect.py | Enhanced device detection with preferred device support and improved type annotations |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
|
@SaschaCowley In that case, I just removed the restriction on auto detect. |
SaschaCowley
left a comment
There was a problem hiding this comment.
Thanks, @LeonarddeR, this is a very long awaited change
Link to issue number:
Alternative to #18789
Suggested in #18789 (comment)
Fixes #2315
Summary of the issue:
Currently, braille doesn't work properly on secure screens because the braille display is held by the logged in copy.
Description of user facing changes:
When NVDA is installed, it disconnects braille when entering secure desktop and reconnects when exiting it.
Description of developer facing changes:
None
Description of development approach:
secure desktopwas entered. This is communicated with anui.messagein IAccessibleHandler.Testing strategy:
Known issues with pull request:
Open question
I considered this, but then figured that the UX for this would at least be a bit vague. People never had Braille available on secure screens, and then adding a config option like "disable braille when entering secure desktop" would do exactly the opposite from the user's perspective. Not everyone is aware of the separate copy on secure desktop. Would especially be curious to @Qchristensen's opinion on this matter.
Code Review Checklist: