From 7b5ffa03f07485a8f7f14226ba8e690050978e80 Mon Sep 17 00:00:00 2001 From: Michael Curran Date: Fri, 8 Jul 2011 15:53:47 +1000 Subject: [PATCH] Fix for #1285 (focus tracking in Outlook 2010 message list): * Add the 'SUPERGRID' window class to the list of BAD UIA implementations. We must resort to MSAA for the Outlook 2010 message list as it 1. does not fire a UIA focus event on each item, and 2. does not set the focused state on the focused item. * Create a new overlay class in the outlook appModule to handle the client of SUPERGRID, and override its isDuplicateIAccessibleEvent method, always returning false. This is because when the focus moves from message to message, the same focus winEvent is fired, on the client (OBJID_CLIENT,0), but that particular MSAA object keeps mutating itself. Therefore we can not filter out duplicate events. --- source/_UIAHandler.py | 1 + source/appModules/outlook.py | 9 ++++++++- user_docs/en/changes.t2t | 1 + 3 files changed, 10 insertions(+), 1 deletion(-) diff --git a/source/_UIAHandler.py b/source/_UIAHandler.py index ea6b56896..693b869c9 100644 --- a/source/_UIAHandler.py +++ b/source/_UIAHandler.py @@ -26,6 +26,7 @@ badUIAWindowClassNames=[ "Edit", "CommonPlacesWrapperWndClass", "SysMonthCal32", + "SUPERGRID", #Outlook 2010 message list ] UIAControlTypesToNVDARoles={ diff --git a/source/appModules/outlook.py b/source/appModules/outlook.py index 97e882b4b..4bf769ae8 100644 --- a/source/appModules/outlook.py +++ b/source/appModules/outlook.py @@ -6,6 +6,7 @@ from comtypes import COMError import comtypes.client +import winUser import appModuleHandler import eventHandler import controlTypes @@ -84,7 +85,13 @@ class AppModule(appModuleHandler.AppModule): outlookVersion=self.outlookVersion if outlookVersion and outlookVersion<=9: clsList.insert(0, MessageList_pre2003) - return + elif outlookVersion and outlookVersion>=14 and isinstance(obj,IAccessible) and obj.event_objectID==winUser.OBJID_CLIENT: + clsList.insert(0,SuperGridClient2010) + +class SuperGridClient2010(IAccessible): + + def isDuplicateIAccessibleEvent(self,obj): + return False class MessageList_pre2003(IAccessible): diff --git a/user_docs/en/changes.t2t b/user_docs/en/changes.t2t index 87ae97998..44a52eeae 100644 --- a/user_docs/en/changes.t2t +++ b/user_docs/en/changes.t2t @@ -108,6 +108,7 @@ Highlights of this release include major improvements concerning punctuation and - In Microsoft Word, say all now works correctly when the document does not end with a sentence ending. - When opening a plain text message in Windows Live Mail 2011, NVDA will correctly focus on the message document allowing it to be read. - NVDA no longer temporarily freezes or refuses to speak when in the Move to / Copy to dialogs in Windows Live Mail. (#574) +- In Outlook 2010, NVDA will now correctly track the focus in the message list. (#1285) == Changes for Developers == -- 2.11.0