From c80f4212011df798c070256c6b8760541f924ef1 Mon Sep 17 00:00:00 2001 From: Bill Dengler Date: Mon, 24 May 2021 03:50:11 -0400 Subject: [PATCH] Implement the runtime check for UIA console by default. --- source/UIAHandler/utils.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/source/UIAHandler/utils.py b/source/UIAHandler/utils.py index e2676debb94..6798a3c57db 100644 --- a/source/UIAHandler/utils.py +++ b/source/UIAHandler/utils.py @@ -305,9 +305,7 @@ def _shouldUseUIAConsole(hwnd: int) -> bool: else: # #7497: the UIA implementation in old conhost is incomplete, therefore we # should ignore it. - # When the UIA implementation is improved, the below line will be replaced - # with a check that _getConhostAPILevel >= FORMATTED. - return False + return _getConhostAPILevel(hwnd) >= WinConsoleAPILevel.FORMATTED @lru_cache(maxsize=10)