#Hack around bad MSAA implementations that deliberately skip the window root IAccessible in the ancestry (Skype, iTunes)\r
if parentObj.windowHandle!=self.windowHandle and self.IAccessibleRole!=oleacc.ROLE_SYSTEM_WINDOW and winUser.getAncestor(self.windowHandle,winUser.GA_PARENT)==parentObj.windowHandle:\r
windowObj=Window(windowHandle=self.windowHandle)\r
- if windowObj and windowObj.parent==parentObj:\r
+ if windowObj and windowObj.IAccessibleRole==oleacc.ROLE_SYSTEM_WINDOW and windowObj.parent==parentObj:\r
return windowObj\r
return self.correctAPIForRelation(parentObj,relation="parent") or super(IAccessible,self).parent\r
return super(IAccessible,self).parent\r