From: James Teh Date: Sat, 13 Oct 2012 05:53:30 +0000 (+1000) Subject: UIA: Ignore menuOpened events if focus has been fired, as focus should be more correct. X-Git-Tag: jpdev130418~500 X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=58cf3c7e218c8b3dbebe89d3bb6b58627a257e85;p=nvdajp%2Fnvdajp.git UIA: Ignore menuOpened events if focus has been fired, as focus should be more correct. --- diff --git a/source/_UIAHandler.py b/source/_UIAHandler.py index d692f1480..09f2f6b43 100644 --- a/source/_UIAHandler.py +++ b/source/_UIAHandler.py @@ -163,6 +163,10 @@ class UIAHandler(COMObject): if not self.MTAThreadInitEvent.isSet: # UIAHandler hasn't finished initialising yet, so just ignore this event. return + if eventID==UIA_MenuOpenedEventId and eventHandler.isPendingEvents("gainFocus"): + # We don't need the menuOpened event if focus has been fired, + # as focus should be more correct. + return NVDAEventName=UIAEventIdsToNVDAEventNames.get(eventID,None) if not NVDAEventName: return