return\r
\r
if childID<0:\r
- while window and not winUser.getWindowStyle(window)&winUser.WS_POPUP and winUser.getClassName(window)=="MozillaWindowClass":\r
- window=winUser.getAncestor(window,winUser.GA_PARENT)\r
+ tempWindow=window\r
+ while tempWindow and not winUser.getWindowStyle(tempWindow)&winUser.WS_POPUP and winUser.getClassName(tempWindow)=="MozillaWindowClass":\r
+ tempWindow=winUser.getAncestor(tempWindow,winUser.GA_PARENT)\r
+ if tempWindow and winUser.getClassName(tempWindow).startswith('Mozilla'):\r
+ window=tempWindow\r
+\r
windowClassName=winUser.getClassName(window)\r
#At the moment we can't handle show, hide or reorder events on Mozilla Firefox Location bar,as there are just too many of them\r
#Ignore show, hide and reorder on MozillaDropShadowWindowClass windows.\r
@rtype: boolean\r
"""\r
windowClassName=winUser.getClassName(window)\r
- # Generally, we must ignore focus on child windows of SDM windows as we only want the SDM MSAA events.
- # However, we don't want to ignore focus if the child ID isn't 0,
+ # Generally, we must ignore focus on child windows of SDM windows as we only want the SDM MSAA events.\r
+ # However, we don't want to ignore focus if the child ID isn't 0,\r
# as this is a child control and the SDM MSAA events don't handle child controls.\r
if childID==0 and not windowClassName.startswith('bosa_sdm') and winUser.getClassName(winUser.getAncestor(window,winUser.GA_PARENT)).startswith('bosa_sdm'):\r
return False\r
}\r
wchar_t className[256];\r
bool foundWindow=false;\r
+ HWND tempWindow=hwnd;\r
do {\r
- if(GetClassName(hwnd,className,256)==0) {\r
+ if(GetClassName(tempWindow,className,256)==0) {\r
DEBUG_MSG(L"Could not get class name for window "<<hwnd);\r
return hwnd;\r
}\r
- DEBUG_MSG(L"class name for window "<<hwnd<<L" is "<<className);\r
+ DEBUG_MSG(L"class name for window "<<tempWindow<<L" is "<<className);\r
if(wcscmp(L"MozillaWindowClass",className)!=0) {\r
foundWindow=true;\r
} else {\r
- hwnd=GetAncestor(hwnd,GA_PARENT);\r
+ tempWindow=GetAncestor(tempWindow,GA_PARENT);\r
}\r
- } while(hwnd&&!foundWindow);\r
+ } while(tempWindow&&!foundWindow);\r
+ if(GetClassName(tempWindow,className,256)!=0&&wcsstr(className,L"Mozilla")==className) { \r
+ hwnd=tempWindow;\r
+ }\r
DEBUG_MSG(L"Found window "<<hwnd);\r
return hwnd;\r
}\r
windowHandle=IAccessibleObject.windowHandle\r
except COMError, e:\r
log.debugWarning("IAccessible2::windowHandle failed: %s" % e)\r
- #Mozilla Gecko: we can never use a MozillaWindowClass window\r
- while windowHandle and winUser.getClassName(windowHandle)=="MozillaWindowClass":\r
- windowHandle=winUser.getAncestor(windowHandle,winUser.GA_PARENT)\r
+ #Mozilla Gecko: we can never use a MozillaWindowClass window for Gecko 1.9\r
+ tempWindow=windowHandle\r
+ while tempWindow and winUser.getClassName(tempWindow)=="MozillaWindowClass":\r
+ tempWindow=winUser.getAncestor(tempWindow,winUser.GA_PARENT)\r
+ if tempWindow and winUser.getClassName(tempWindow).startswith('Mozilla'):\r
+ windowHandle=tempWindow\r
try:\r
Identity=IAccessibleHandler.getIAccIdentity(IAccessibleObject,IAccessibleChildID)\r
except:\r