Skip to content

Commit

Permalink
For particular window classes, do not bother checking if they have a …
Browse files Browse the repository at this point in the history
…native UIA implementation, just assume they don't, as the implementation they have is rather broken. Currently this includes SysTreeview32 (because of the Windows Features treeview), WuDuiListView (because of the Windows Update available updates lists), ComboBox (because of the notification aria combo boxes, control panel). If these bugs are Fixed in Windows 7 before the real release, then perhaps we can take this code out.
  • Loading branch information
mick committed May 5, 2009
1 parent 2a0b044 commit 0591187
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion source/UIAHandler.py
Expand Up @@ -7,10 +7,13 @@
import api
import queueHandler
import controlTypes
import winUser
import NVDAObjects.UIA
import eventHandler
from logHandler import log

badUIAWindowClassNames=["SysTreeView32","WuDuiListView","ComboBox"]

UIAControlTypesToNVDARoles={
UIA_ButtonControlTypeId:controlTypes.ROLE_BUTTON,
UIA_CalendarControlTypeId:controlTypes.ROLE_CALENDAR,
Expand Down Expand Up @@ -149,7 +152,11 @@ def isUIAWindow(self,hwnd):
now=time.time()
v=self.UIAWindowHandleCache.get(hwnd,None)
if not v or (now-v[1])>0.5:
isUIA=windll.UIAutomationCore.UiaHasServerSideProvider(hwnd)
windowClassName=winUser.getClassName(hwnd)
if windowClassName in badUIAWindowClassNames:
isUIA=False
else:
isUIA=windll.UIAutomationCore.UiaHasServerSideProvider(hwnd)
self.UIAWindowHandleCache[hwnd]=(isUIA,now)
return isUIA
return v[0]
Expand Down

0 comments on commit 0591187

Please sign in to comment.