Correct focus in Objects Explorer (vs2017 and up)#9415
Conversation
|
cc @LeonarddeR |
|
Could you maybe use the focus redirection system instead of getting |
|
@francipvb You're importing ui in the appModule hovewer it isn't used anywhere - probably left when debugging. |
|
Hello,
Thanks, done. It is a more clean approach 👍
Fixed too, thanks. 👍 Cheers, |
|
@DanteGagne: Do you think there could be a possibility to fix this in Visual Studio itself? |
LeonarddeR
left a comment
There was a problem hiding this comment.
Just some small things
|
|
||
| class AppModule(appModuleHandler.AppModule): | ||
| def chooseNVDAObjectOverlayClasses(self, obj, clsList): | ||
| vs_major, vs_minor, rest = self.productVersion.split(".", 2) |
There was a problem hiding this comment.
| vs_major, vs_minor, rest = self.productVersion.split(".", 2) | |
| vsMajor, vsMinor = map(int, self.productVersion.split(".", 2)[:2]) |
You can also remove the lina below. Note the change from vs_major to vsMajor, vs_minor to vsMinor, which is more like the general code style of NVDA.
LeonarddeR
left a comment
There was a problem hiding this comment.
I think this is ok from a code perspective. I need to have a look with Visual Studio, probably next week.
In the meanwhile, could you please update the initial description of the pr to reflect the current implementation (i.e. with focusRedirect instead of patching event_gainFocus)?
feerrenrut
left a comment
There was a problem hiding this comment.
@LeonarddeR I'm going to merge this in, would you mind reporting back here if there are any issues with the focus in the object explorer window.
Link to issue number:
Closes #9311
Summary of the issue:
In visual studio 2017 (version 15.3 and up), the object explorer window is not working properly due to an incorrect MSAA implementation.
See #9313 for a previous approach to solve this.
Description of how this pull request fixes the issue:
This adds an overlay class for the tree view items in object explorer. It takes a
focusRedirectevent and checks for its statesIf
STATE_FOCUSEDis not in the states set, it redirects the event to the real focused object.I'm not really sure if it is the right way of doing this.
Testing performed:
Tested against visual studio 15.9 and up to 16.0.rc4.
Known issues with pull request:
State changes are not reported for secondary items, so expand and contract events are not reported by NVDA. I don't have more information.
Change log entry:
Section: Bug fixes