Skip to content

Allow setting good UIA windows in core or per appModule#7980

Merged
michaelDCurran merged 2 commits into
nvaccess:masterfrom
BabbageCom:goodUIAWindow
Mar 6, 2018
Merged

Allow setting good UIA windows in core or per appModule#7980
michaelDCurran merged 2 commits into
nvaccess:masterfrom
BabbageCom:goodUIAWindow

Conversation

@LeonarddeR

@LeonarddeR LeonarddeR commented Feb 9, 2018

Copy link
Copy Markdown
Collaborator

Link to issue number:

Closes #7961

Summary of the issue:

It is currently possible to implement isBadUIAWindow on the appModule level to use IAccessible for windows that are reported as native UIA. The opposite is not yet offered.

Description of how this pull request fixes the issue:

This allows appModule writers to implement isGoodUIAWindow. If this returns True, UIA is always used, regardless whether UIA is implemented natively or the MSAA proxy is active.

There is now also a goodUIAWindowClassNames list on _UIAHandler, which is used for WDAG.

Testing performed:

Tested this in Notepad, all MSAA objects instantly changed into UIA objects.

Known issues with pull request:

  • I've not yet tested this with WDAG.
  • When the core decides that a window is good, an appModule can't override this behaviour. Note that strictly spoken, this is not a limitation of this pr, as this was already the case before.

Change log entry:

Comment thread source/appModuleHandler.py Outdated

def isGoodUIAWindow(self,hwnd):
"""
returns true if the UIA implementation of the given window must be used, regardless whether native or not.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perhaps add a comment here and on isBadUIAWindow: "if isGoodUIAWindow and isBadUIAWindow return False, then the decision of whether to use UIA is left to the core."

What if they both return True?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What if they both return True?

isGoodUIAWindow will take precedence as UIAHandler.handler._isUIAWindowHelper will return early in that case. This is intentional, as whether good or bad, I think that the core should always have precedence over app Modules. On the other hand, appModules might want to override core behaviour for SysListView32 cases with native UIA implementations. The only case that is not covered is when the core decides good and an appModule decides bad.

feerrenrut added a commit that referenced this pull request Feb 15, 2018
Merge remote-tracking branch 'origin/pr/7980' into next
@michaelDCurran michaelDCurran merged commit 55a7da5 into nvaccess:master Mar 6, 2018
@nvaccessAuto nvaccessAuto added this to the 2018.1 milestone Mar 6, 2018
@michaelDCurran michaelDCurran modified the milestones: 2018.1, 2018.2 Mar 13, 2018
@LeonarddeR LeonarddeR added the BabbageWork Pull requests filed on behalf of Babbage B.V. label Oct 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

BabbageWork Pull requests filed on behalf of Babbage B.V.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Allow appModules to prefer UIA for certain windows

4 participants