|
1 | 1 | # A part of NonVisual Desktop Access (NVDA) |
2 | | -# Copyright (C) 2015-2020 NV Access Limited, David Parduhn, Bill Dengler, Leonard de Ruijter, Łukasz Golonka |
| 2 | +# Copyright (C) 2015-2023 NV Access Limited, David Parduhn, Bill Dengler, Leonard de Ruijter, Łukasz Golonka |
3 | 3 | # This file is covered by the GNU General Public License. |
4 | 4 | # See the file COPYING for more details. |
5 | 5 |
|
|
9 | 9 | import eventHandler |
10 | 10 | from NVDAObjects.IAccessible import IAccessible |
11 | 11 | from NVDAObjects.behaviors import ToolTip |
| 12 | +import NVDAObjects.window |
| 13 | +import winUser |
| 14 | + |
12 | 15 |
|
13 | 16 | class MMCTable(IAccessible): |
14 | 17 | def _get_focusRedirect(self): |
@@ -56,8 +59,21 @@ def chooseNVDAObjectOverlayClasses(self, obj, clsList): |
56 | 59 | if obj.windowClassName == "AfxWnd42u": |
57 | 60 | if obj.role == controlTypes.Role.TABLE: |
58 | 61 | clsList.insert(0, MMCTable) |
59 | | - elif obj.role in (controlTypes.Role.TABLECELL, |
60 | | - controlTypes.Role.TABLEROWHEADER): |
| 62 | + elif obj.role in ( |
| 63 | + controlTypes.Role.TABLECELL, |
| 64 | + controlTypes.Role.TABLEROWHEADER |
| 65 | + ): |
61 | 66 | clsList.insert(0, MMCTableCell) |
62 | 67 | if obj.windowClassName == "tooltips_class32" and obj.name is None: |
63 | 68 | clsList.insert(0, toolTipWithEmptyName) |
| 69 | + |
| 70 | + def isBadUIAWindow(self, hwnd): |
| 71 | + windowClassName = winUser.getClassName(hwnd) |
| 72 | + normalizedClassName = NVDAObjects.window.Window.normalizeWindowClassName(windowClassName) |
| 73 | + if normalizedClassName in ( |
| 74 | + # #15333: SysListView32 controls in mmc are known to have an incomplete UIA implementation. |
| 75 | + # Revert back to the MSAA implementation instead. |
| 76 | + 'SysListView32' |
| 77 | + ): |
| 78 | + return True |
| 79 | + return False |
0 commit comments