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
handle braille updates in pump all and include updates for terminal changes #15156
Conversation
See test results for failed build of commit 7b61a75265 |
finally: | ||
region.pendingCaretUpdate=False | ||
if version_year < 2024 and NVDAState._allowDeprecatedAPI(): | ||
def handlePendingCaretUpdate(self): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is this change going to materially break any add-ons?
I know we have created no-op aliases in the past, but this seems riskier than other instances.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd be surprised if there is an add-on that uses this, though we cannot rule that out. However, I don't think it can do any harm. The only way I could think of for an add-on to use this is by explicitly updating the caret (i.e. calling handleCaretMove and handlePendingCaretUpdate in one wave). That would still behave the same as before.
I fetched this branch but unfortunately I have not yet found changes in behavior. Content of braille line may change at least:
These changes should be updated automatically to braille line. I would prefer that these all cases would be solved. There is also situation where user disables braille cursor but change is not updated to braille line automatically. I suppose this is different case from those above. |
We can not improve all cases in one pr, that would have too much impact I think. Every change should be carefully tested on its own. That said, the check boxes case should work theoretically, but I must test this. |
@LeonarddeR I think the kind of checkbox @burmancomp is talking about, is this (which you can run by placing it in a file and executing it, in WSL or whatever). I do not have a braille display, but I have used this kind of dialog before:
Move up/down through the options, space to check/uncheck, tab then enter to choose "OK". |
Yes. The other "check box" may be such one which is activated with enter but that moves cursor I suppose. |
Closing this for now as I currently have no time to work on this and it doesn't work as advertised anyway. |
Fixes #15115 Summary of the issue: This extends pull request #15134 and includes pull request #15156. Collaborated with @LeonarddeR. Description of user facing changes Braille line is updated in terminal window when there is text change. In addition braille line is updated in any application when: braille cursor is turned on or off with gesture if there is selected text in edit control or document, changing "show selection" state with gesture updates braille line when otherwise supported Description of development approach Terminal window updates are handled with: NVDAObjects.behaviors.Terminal.event_textChange and event_UIA_notification in winConsoleUIA._NotificationsBasedWinTerminalUIA. Objects are passed to BrailleHandler.handleUpdate function. When braille show selection state is changed with gesture, BrailleHandler.initialDisplay function is executed. When braille cursor is toggled with gesture, BrailleHandler._updateDisplay function is executed.
Link to issue number:
Related to #15134. Partial fix for #15115
Summary of the issue:
When braille is tethered to review, braille isn't properly update when the text changes. The reason behind this is quite simple, as the braille handler doesn't update in these cases.
Description of user facing changes
When the text in a terminal changes and braille is tethered to review, the text on a braille display will now properly update if the review cursor is positioned on a changed line.
Description of development approach
Testing strategy:
T.b.d.
Known issues with pull request:
None known
Change log entries:
Changes:
Deprecations:
Code Review Checklist: