[Nvda-dev] commit r1999 - trunk/source
NVDA Subversion
svn at nvda-project.org
Thu May 1 05:32:45 UTC 2008
Author: mdcurran
Date: Thu May 1 05:32:45 2008
New Revision: 1999
Log:
Fix a bug where caret events, which are used to detect selections in edit fields, seemed to stop working after a while in apps such as Wordpad. The problem was that they would break after leaving the menubar, and api.findObjectWithFocus would be used to correct the focus back to the edit field. But, findObjectWithFocus can not correctly set the event parameters such as event_windowHandle, so the caret event was never able to reach the focusObject. Now when seeing if the caret is for the focusObject, if its not for event_windowHandle, then it should also check windowHandle. It should also right there and then queue eventHandler.manageEvent for the focusObject, as if we let the later code handle it, it again will never match.
Modified:
trunk/source/IAccessibleHandler.py
Modified: trunk/source/IAccessibleHandler.py
==============================================================================
--- trunk/source/IAccessibleHandler.py (original)
+++ trunk/source/IAccessibleHandler.py Thu May 1 05:32:45 2008
@@ -679,10 +679,8 @@
if eventID==winUser.EVENT_OBJECT_FOCUS and controlID==30002 and winUser.getClassName(winUser.getAncestor(window,winUser.GA_ROOTOWNER))=="Notepad++":
return
if objectID==OBJID_CARET and eventName=="locationChange":
- if isinstance(focusObject,NVDAObjects.IAccessible.IAccessible) and window==focusObject.event_windowHandle:
- eventName="caret"
- objectID=focusObject.event_objectID
- childID=focusObject.IAccessibleChildID
+ if isinstance(focusObject,NVDAObjects.IAccessible.IAccessible) and (window==focusObject.event_windowHandle or window==focusObject.windowHandle):
+ return queueHandler.queueFunction(queueHandler.eventQueue,eventHandler.manageEvent,"caret",focusObject)
else:
return
#Report mouse shape changes
More information about the Nvda-dev
mailing list