Fix occasional error when the session is locked/unlocked#16121
Conversation
|
@seanbudd or others: Regarding the error no 2 which is not yet fixed, I need some help since I do not fully understand what is in I have the feeling that However, I do not know if I have also to modify A clarification on all this would help me add explaining comments (if needed) when modifying @seanbudd, also, let me know if you prefer me to target master branch. I have targeted beta since these errors are not present in NVDA 2023.3. |
f70d95e to
a43ecda
Compare
See test results for failed build of commit 8fe411e436 |
a43ecda to
fc01a29
Compare
…re not instances of Window
|
Finally, I have forced Let me know if it's OK and if I should do something else. The questions in #16121 (comment) are still pending though. |
|
I think this was a known concern when this change was made. I don't think we would be processing keyboard events, so I wouldn't change It might be worth asking for a review from @codeofdusk , who introduced handling for |
) Fix nvaccess#16120 Related to nvaccess#15400. Summary of the issue: Sporadic errors still occur when locking/unlocking Windows session. As per nvaccess#15400, this is due to the fact that api.getFocusObject returns an NVDAObjects.NVDAObject but we use it as it was an NVDAObjects.window.Window. But that's not the case when the focus is (or was) winAPI.secureDesktop._handleSecureDesktopChange._SecureDesktopNVDAObject. Description of user facing changes Probably none; these errors did not seem to have any visible impact. Description of development approach Check the class of the object returned by api.getFocusObject before using its properties.
Link to issue number:
Fix #16120
Related to #15400.
Summary of the issue:
Sporadic errors still occur when locking/unlocking Windows session. As per #15400, this is due to the fact that
api.getFocusObjectreturns anNVDAObjects.NVDAObjectbut we use it as it was anNVDAObjects.window.Window. But that's not the case when the focus is (or was)winAPI.secureDesktop._handleSecureDesktopChange._SecureDesktopNVDAObject.Description of user facing changes
Probably none; these errors did not seem to have any visible impact.
Description of development approach
Check the class of the object returned by
api.getFocusObjectbefore using its properties.Testing strategy:
Known issues with pull request:
Maybe there are other places where we use an
NVDAObjectas if it was aWindow. We'll fix them the same way if we encounter them in the future.Change log
None. Error appeared during 2024.1 dev cycle.
Code Review Checklist: