Event handler: introduce virtual desktop announcement switch handling#14932
Merged
seanbudd merged 15 commits intoJun 5, 2023
Conversation
Contributor
Author
See test results for failed build of commit 4fdf563c3a |
seanbudd
reviewed
May 31, 2023
Contributor
Author
|
Hi, at least the function name (handle virtual desktop switch) is needed by Windows App Essentials add-on to determine NVDA Core patching determination. Others might become private, and I will take care of it in an upcoming commit. Thanks.
|
Member
|
Hi @josephsl - there are some strange artifacts in the diff here from other commits, including CLDR changes |
Contributor
Author
|
Hi, when I did git pull origin master, it somehow did a rebase, and the CLDR commit artifacts came from git submodule update –init. Thanks.
|
Contributor
I do not know how to explain this. Maybe you have something strange in your git config when doing Anyway, no only the CLDR submodule but also the symbol files appear in the modified files of this PR. This should be fixed please. Thanks. |
Contributor
Author
|
Hi, I see. I’ll do something about this. Thanks
|
… to handle possible virtual desktop switches. Re nvaccess#5641. Original work by Jamie Teh (Mozilla): define a dedicated function to handle posible (and real) Windows 10/11 virtual desktop switche announcements. This function checks to make sure this is Widows 10 or later, and if yes, announces desktop name as defined in the event handler module, and clears this string once announcements are done. The actual event responsible for placing virtual desktop name in event handler is name change event from CSRSS (client/server runtime subsystem/Windows subsystem) process, specificlaly desktop object. Handling name change event will be done as part of handling gain focus event, specifically when doing pre-gain focus routine.
…e event coming from CSRSS/desktop object and treat as a possible virtual desktop switch. Re nvaccess#5641. Original idea from Jamie Teh (Mozilla): in 'execute event' function, detect namechange coming from CSRSS/desktop object and treat it as a possible virtual desktop name change before handling focus events. If it turns out this is indeed a virtual desktop switch, set virtual desktop name, then queue handle possible virtual desktop switch routine (250 milliseconds) so desktop switches can be announced when opening/closing/switching virtual desktops while focused on the desktop.
…irtual desktop switches after handling new foreground event. Re nvaccess#5641. Credit: Jamie Teh (Mozilla): handle possible virtual desktop switch announcements after handling new foreground announcement in 'do pre gain focus' routine. This allows virtual desktop names to be announced between actual desktop switch and handling gain focus event, more noticeable when creating new virtual desktops.
… to Windows 10 Version 1903 and later. Re nvaccess#5641. A note from Jamie Teh (Mozila): virtual desktop switch announcement works more effectively in Windows 10 Version 1903 (May 2019 Update) and later, therefore restrict virtual desktop announcement to that feature update and later.
…ng literals when logging exceptions with execute event routine.
…r virtual desktop name field and handle possible desktop switch function. Re nvaccess#5641
…riable to detect Windows 10 1903 and later. Re nvaccess#5641. In addition to placing winVersion module import at the top of the file, use a dedicated flag to indicate support for virtual desktop switch announcements in Windows 10 Version 1903 (May 2019 Update) and later.
Reported by several testers: in some cases, NVDA fails to start due to type hint scope issue if a constant is placed between functions. Therefore, move virtual desktops handling to top fo the file next to other constants and data structures.
…e and announcement check variables private. Re nvaccess#5641. Reviewed by Sean Budd (NV Access): make virtual desktop name and can nanouncement virtual desktop name variables private - at the moment no add-on appears to need this functionality but this can change if requested by add-on authors.
Collaborator
|
I noticed the same thing happening on @josephsl commits a week or two back, but
I think that PR was closed.
See the first answer here for what probably happened:
https://stackoverflow.com/questions/9264314/git-commits-are-duplicated-in-the-same-branch-after-doing-a-rebase
TL;DR: you may have pulled because git told you to, but you should have force
pushed.
|
cd28d72 to
c739942
Compare
Contributor
Author
|
Should be resolved - did a force push as noted by a source from Luke's post above. |
seanbudd
approved these changes
Jun 5, 2023
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Note: this is take 3.1 of #5641 to see if a PR build can be built:
Link to issue number:
Fixes #5641
Summary of the issue:
In Windows 10 and later, NVDA does not announce virtual desktop names wen they are opened, switched, and closed.
Description of user facing changes
NVDA will announce names of virtual desktops when opening, switching, and closing them.
Description of development approach
Event handler is extended to include a virtual desktop switch handler and an extension to execute event to catch a name change event coming from CSRSS.
Testing strategy:
Manual testing (prerequisites: Windows 10 or later):
Known issues with pull request:
In some cases, closing a virtual desktop wil announce the focused control first and then announce virtual desktop name, but this is due to focus event firing before name change event.
Change log entries:
New features:
In Windows 10 May 2019 Update and later, NVDA can announe virtual desktop names when opening, changing, and closing them. (#5641)
Code Review Checklist: