Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enhanced Mouse Navigation: Handles cases where it is not possible to navigate a control that is covered by a container control. #17108

Closed
hwf1324 opened this issue Sep 3, 2024 · 18 comments
Labels
app/chrome blocked/needs-external-fix p2 https://github.com/nvaccess/nvda/blob/master/projectDocs/issues/triage.md#priority triaged Has been triaged, issue is waiting for implementation.

Comments

@hwf1324
Copy link
Contributor

hwf1324 commented Sep 3, 2024

Is your feature request related to a problem? Please describe.

Some time ago I discovered that mouse tracking doesn't work on most controls in the latest version of VS Code.
This regression was introduced by Electron.
The reason seems to be that an empty panel is covering all the controls, causing the mouse object to focus only on this invalid panel.
Although we can probably wait for Electron to fix this issue.
But, until Electron fixes it, this will affect quite a few applications.
And there are many similar cases in other programmes, such as Windows Terminal.

Describe the solution you'd like

When looking up an object via objectFromPoint, you can ignore the upper level object and find the lower level object.

I'm not sure this is the right direction, the logic of finding objects is complex, especially with all the inheritance and dynamic binding

Describe alternatives you've considered

Additional context

#13506
electron/electron#42945
microsoft/vscode#224704

@hwf1324
Copy link
Contributor Author

hwf1324 commented Sep 3, 2024

CC: @seanbudd, @michaelDCurran, @jcsteh, @josephsl

I'm sorry to bother you guys, maybe you can offer some more insight.

@jcsteh
Copy link
Contributor

jcsteh commented Sep 3, 2024

I don't think this is going to be possible, though it's very much something that would have to be determined on a case by case basis. In this particular case, if the panel covering the object you want is a Chromium object, we can't fix it because NVDA can only directly ask Chromium what object is at a particular point. If Chromium says the panel is at that point, that's as far as we can go. Even if it were feasible to walk every single object in the tree (which it isn't because it would be ridiculously slow), that wouldn't be sufficient because that tells you nothing about the z-index of the object, points in the rectangle that aren't covered if the object isn't actually rectangular, whether the object is transformed (skewed, rotated, etc.), whether the object is partly scrolled off the screen, etc. Hit testing is complicated enough even inside a web engine with all the internal information available to it.

@josephsl
Copy link
Collaborator

josephsl commented Sep 3, 2024

Hi,

Do you know the window class name for the container control i.e. Electron control that is overlaying the controls underneath?

Thanks.

@hwf1324
Copy link
Contributor Author

hwf1324 commented Sep 3, 2024

Hi,

Do you know the window class name for the container control i.e. Electron control that is overlaying the controls underneath?

['name: None',
 'role: PANE',
 'processID: 6880',
 'roleText: None',
 'states: ',
 'isFocusable: False',
 'hasFocus: False',
 'Python object: <NVDAObjects.IAccessible.ia2Web.Ia2Web object at 0x05B3DD30>',
 "Python class mro: (<class 'NVDAObjects.IAccessible.ia2Web.Ia2Web'>, <class "
 "'NVDAObjects.IAccessible.IAccessible'>, <class 'NVDAObjects.window.Window'>, "
 "<class 'NVDAObjects.NVDAObject'>, <class "
 "'documentBase.TextContainerObject'>, <class 'baseObject.ScriptableObject'>, "
 "<class 'baseObject.AutoPropertyObject'>, <class "
 "'garbageHandler.TrackedObject'>, <class 'object'>)",
 'description: None',
 'location: RectLTWH(left=0, top=0, width=1920, height=1032)',
 "value: ''",
 "TextInfo: <class 'NVDAObjects.NVDAObjectTextInfo'>",
 "appModule: AppModule(code, appName='code - insiders', processID=6880)",
 "appModule.productName: 'Visual Studio Code - Insider'",
 "appModule.productVersion: '1.93.0-insider'",
 'appModule.helperLocalBindingHandle: c_long(118321776)',
 "appModule.appArchitecture: 'AMD64'",
 'windowHandle: 527444',
 "windowClassName: 'Chrome_WidgetWin_1'",
 'windowControlID: 0',
 'windowStyle: 365363200',
 'extendedWindowStyle: 256',
 'windowThreadID: 8448',
 "windowText: 'Visual Studio Code - Insiders'",
 "displayText: ''",
 'IAccessibleObject: <POINTER(IAccessible2) ptr=0x7109324 at 12f8cd50>',
 'IAccessibleChildID: 0',
 'IAccessible event parameters: windowHandle=527444, objectID=-4, childID=-280',
 'IAccessible accName: None',
 'IAccessible accRole: ROLE_SYSTEM_PANE',
 'IAccessible accState:  (0)',
 'IAccessible accDescription: None',
 "IAccessible accValue: ''",
 'IAccessible2 windowHandle: 527444',
 'IAccessible2 uniqueID: -280',
 'IAccessible2 role: ROLE_SYSTEM_PANE',
 'IAccessible2 states: IA2_STATE_OPAQUE (1024)',
 "IAccessible2 attributes: 'class:View;'",
 'IAccessible2 relations: ']

The windowNlassName is Chrome_WidgetWin_1' for all but the document control with actual content, while the windowClassName for the document control is Chrome_RenderWidgetHostHWND.

Thanks.

@jcsteh
Copy link
Contributor

jcsteh commented Sep 3, 2024

You might have a chance in this case because the HWND for the document and the pane is different. You'd have to override the HWND for the pane and use objectFromPointRedirect to redirect to the correct object inside the document. To get the correct object, you would use docObj.IAccessibleObject.accHitTest(x, y), where docObj is the document object you retrieved somehow.

@hwf1324
Copy link
Contributor Author

hwf1324 commented Sep 5, 2024

Hi,

I'm sorry I don't know much about the underlying Accessibility API and COM and such, and the underlying NVDAObject. So I may need to explain more.

You'd have to override the HWND for the pane

Why override the pane's windowHandle?

Using docObj.windowHandle or obj.windowHandle redirected from docObj?

To get the correct object, you would use docObj.IAccessibleObject.accHitTest(x, y), where docObj is the document object you retrieved somehow.

This seems to get an IAccessibleObject, what do I need to do to turn it into an NVDAObject?

If the object is created and returned using NVDAObjects.IAccessible.IAccessible, won't this duplicate the object creation?
Also is it correct to use the value of docObj directly for the initial IAccessibleChildID parameter?

I've made a few attempts, but they don't seem to be working.

import IAccessibleHandler
from NVDAObjects import NVDAObject
import controlTypes
import globalPluginHandler
from NVDAObjects.IAccessible import IAccessible
from NVDAObjects.IAccessible.ia2Web import Ia2Web
from NVDAObjects.IAccessible.chromium import Document


class RedirectDocument(Ia2Web):

	def objectFromPointRedirect(self, x: int, y: int):
		docObj: Document = self.previous.lastChild
		accHandle = IAccessibleHandler.accHitTest(docObj.IAccessibleObject, x, y)
		if not accHandle:
			return None
		(pacc, child) = accHandle
		# redirect = docObj.IAccessibleObject.accHitTest(x, y)
		return IAccessible(IAccessibleObject=pacc, IAccessibleChildID=child)


class GlobalPlugin(globalPluginHandler.GlobalPlugin):

	def chooseNVDAObjectOverlayClasses(self, obj: Ia2Web, clsList: list[NVDAObject]):
		if (
			obj.windowClassName == "Chrome_WidgetWin_1"
			and obj.role == controlTypes.Role.PANE
			and obj.childCount == 0
			and obj.previous.lastChild.windowClassName == "Chrome_RenderWidgetHostHWND"
		):
			obj.windowHandle = obj.previous.lastChild.windowHandle
			clsList.insert(0, RedirectDocument)

Thanks.

@jcsteh
Copy link
Contributor

jcsteh commented Sep 6, 2024

You'd have to override the HWND for the pane

Why override the pane's windowHandle?

Err, I'm honestly not sure what I meant there. Sorry about that. Just ignore it. 😳 I think I meant to say you need to override the object for the pane.

To get the correct object, you would use docObj.IAccessibleObject.accHitTest(x, y), where docObj is the document object you retrieved somehow.

This seems to get an IAccessibleObject, what do I need to do to turn it into an NVDAObject?

NVDAObjects.IAccessible.IAccessible(IAccessibleObject=hitTestObj, IAccessibleChildID=winUser.CHILDID_SELF)

If the object is created and returned using NVDAObjects.IAccessible.IAccessible, won't this duplicate the object creation?

No. The object you get back from accHitTest is a raw COM object. Passing it to the NVDAObjects.IAccessible.IAccessible constructor wraps it in an appropriate NVDAObject that NVDA can use.

Also is it correct to use the value of docObj directly for the initial IAccessibleChildID parameter?

No. You should use CHILDID_SELF.

@hwf1324
Copy link
Contributor Author

hwf1324 commented Sep 6, 2024

NVDAObjects.IAccessible.IAccessible(IAccessibleObject=hitTestObj, IAccessibleChildID=winUser.CHILDID_SELF)

Oddly enough I can't seem to create an NVDAObject from an IAccessibleObject!
As you can see from the added logs, IAccessibleObject does change again!

By the way, mouse objects can be weird sometimes. There seems to be a discrepancy with the objects looked up from the object properties

mouse == obj
True
mouse is obj
False
obj.devInfo
['name: None',
 'role: PANE',
 'processID: 5180',
 'roleText: None',
 'states: ',
 'isFocusable: False',
 'hasFocus: False',
 'Python object: <NVDAObjects.IAccessible.ia2Web.Ia2Web object at 0x010995D0>',
 "Python class mro: (<class 'NVDAObjects.IAccessible.ia2Web.Ia2Web'>, <class "
 "'NVDAObjects.IAccessible.IAccessible'>, <class 'NVDAObjects.window.Window'>, "
 "<class 'NVDAObjects.NVDAObject'>, <class "
 "'documentBase.TextContainerObject'>, <class 'baseObject.ScriptableObject'>, "
 "<class 'baseObject.AutoPropertyObject'>, <class "
 "'garbageHandler.TrackedObject'>, <class 'object'>)",
 'description: None',
 'location: RectLTWH(left=0, top=0, width=1920, height=1032)',
 "value: ''",
 "TextInfo: <class 'NVDAObjects.NVDAObjectTextInfo'>",
 "appModule: AppModule(code, appName='code - insiders', processID=5180)",
 "appModule.productName: 'Visual Studio Code - Insider'",
 "appModule.productVersion: '1.93.0-insider'",
 'appModule.helperLocalBindingHandle: c_long(124620464)',
 "appModule.appArchitecture: 'AMD64'",
 'windowHandle: 15206884',
 "windowClassName: 'Chrome_WidgetWin_1'",
 'windowControlID: 0',
 'windowStyle: 365363200',
 'extendedWindowStyle: 256',
 'windowThreadID: 31212',
 "windowText: '欢迎 - Visual Studio Code - Insiders'",
 "displayText: ''",
 'IAccessibleObject: <POINTER(IAccessible2) ptr=0x7bb700c at 6607120>',
 'IAccessibleChildID: 0',
 'IAccessible event parameters: windowHandle=15206884, objectID=-4, '
 'childID=-530',
 'IAccessible accName: None',
 'IAccessible accRole: ROLE_SYSTEM_PANE',
 'IAccessible accState:  (0)',
 'IAccessible accDescription: None',
 "IAccessible accValue: ''",
 'IAccessible2 windowHandle: 15206884',
 'IAccessible2 uniqueID: -530',
 'IAccessible2 role: ROLE_SYSTEM_PANE',
 'IAccessible2 states: IA2_STATE_OPAQUE (1024)',
 "IAccessible2 attributes: 'class:View;'",
 'IAccessible2 relations: ']
mouse.devInfo
['name: None',
 'role: PANE',
 'processID: 5180',
 'roleText: None',
 'states: ',
 'isFocusable: False',
 'hasFocus: False',
 'Python object: <NVDAObjects.IAccessible.ia2Web.Ia2Web object at 0x057E9ED0>',
 "Python class mro: (<class 'NVDAObjects.IAccessible.ia2Web.Ia2Web'>, <class "
 "'NVDAObjects.IAccessible.IAccessible'>, <class 'NVDAObjects.window.Window'>, "
 "<class 'NVDAObjects.NVDAObject'>, <class "
 "'documentBase.TextContainerObject'>, <class 'baseObject.ScriptableObject'>, "
 "<class 'baseObject.AutoPropertyObject'>, <class "
 "'garbageHandler.TrackedObject'>, <class 'object'>)",
 'description: None',
 'location: RectLTWH(left=-32000, top=-32000, width=0, height=0)',
 "value: ''",
 "TextInfo: <class 'NVDAObjects.NVDAObjectTextInfo'>",
 "appModule: AppModule(code, appName='code - insiders', processID=5180)",
 "appModule.productName: 'Visual Studio Code - Insider'",
 "appModule.productVersion: '1.93.0-insider'",
 'appModule.helperLocalBindingHandle: c_long(124620464)',
 "appModule.appArchitecture: 'AMD64'",
 'windowHandle: 19333304',
 "windowClassName: 'Chrome_RenderWidgetHostHWND'",
 'windowControlID: 705200',
 'windowStyle: 1177550848',
 'extendedWindowStyle: 32',
 'windowThreadID: 31212',
 "windowText: 'Chrome Legacy Window'",
 "displayText: ''",
 'IAccessibleObject: <POINTER(IAccessible2) ptr=0x7bb700c at ce247b0>',
 'IAccessibleChildID: 0',
 'IAccessible event parameters: windowHandle=19333304, objectID=-4, '
 'childID=-530',
 'IAccessible accName: None',
 'IAccessible accRole: ROLE_SYSTEM_PANE',
 'IAccessible accState:  (0)',
 'IAccessible accDescription: None',
 "IAccessible accValue: ''",
 'IAccessible2 windowHandle: 15206884',
 'IAccessible2 uniqueID: -530',
 'IAccessible2 role: ROLE_SYSTEM_PANE',
 'IAccessible2 states: IA2_STATE_OPAQUE (1024)',
 "IAccessible2 attributes: 'class:View;'",
 'IAccessible2 relations: ']
import controlTypes
import globalPluginHandler
import winUser
from logHandler import log
from NVDAObjects import NVDAObject
from NVDAObjects.IAccessible import IAccessible
from NVDAObjects.IAccessible.chromium import Document
from NVDAObjects.IAccessible.ia2Web import Ia2Web


class RedirectDocument(Ia2Web):

	def objectFromPointRedirect(self, x: int, y: int):
		docObj: Document = self.previous.lastChild
		log.info(
			"Developer info for the document object:\n%s" % "\n".join(docObj.devInfo),
		)
		redirect = docObj.IAccessibleObject.accHitTest(x, y)
		log.info(f"IAccessibleObject.accHitTest returned {redirect}")
		obj = IAccessible(IAccessibleObject=redirect, IAccessibleChildID=winUser.CHILDID_SELF)
		# log.info(
		# 	"Developer info for the redirected object:\n%s" % "\n".join(obj.devInfo),
		# )
		log.info(f"Redirected object: {obj}")
		return obj


class GlobalPlugin(globalPluginHandler.GlobalPlugin):

	def chooseNVDAObjectOverlayClasses(self, obj: Ia2Web, clsList: list[NVDAObject]):
		if (
			obj.windowClassName.startswith("Chrome_")
			and obj.role == controlTypes.Role.PANE
			and obj.childCount == 0
			and obj.previous
			and obj.previous.childCount != 0
			and obj.previous.lastChild.windowClassName == "Chrome_RenderWidgetHostHWND"
		):
			clsList.insert(0, RedirectDocument)
INFO - external:globalPlugins.electronMouse.RedirectDocument.objectFromPointRedirect (22:26:23.723) - MainThread (10900):
Developer info for the document object:
name: '欢迎 - Visual Studio Code - Insiders'
role: DOCUMENT
processID: 5180
roleText: None
states: READONLY, FOCUSABLE
isFocusable: True
hasFocus: False
Python object: <NVDAObjects.Dynamic_DocumentWithLogVSCodeDocumentDocumentIa2WebIAccessible object at 0x0D23D030>
Python class mro: (<class 'NVDAObjects.Dynamic_DocumentWithLogVSCodeDocumentDocumentIa2WebIAccessible'>, <class 'globalPlugins.ndtt.logReader.DocumentWithLog'>, <class 'appModules.code.VSCodeDocument'>, <class 'NVDAObjects.IAccessible.chromium.Document'>, <class 'NVDAObjects.IAccessible.ia2Web.Document'>, <class 'NVDAObjects.IAccessible.ia2Web.Ia2Web'>, <class 'NVDAObjects.IAccessible.IAccessible'>, <class 'NVDAObjects.window.Window'>, <class 'NVDAObjects.NVDAObject'>, <class 'documentBase.TextContainerObject'>, <class 'baseObject.ScriptableObject'>, <class 'baseObject.AutoPropertyObject'>, <class 'garbageHandler.TrackedObject'>, <class 'object'>)
description: None
location: RectLTWH(left=0, top=0, width=1920, height=1032)
value: None
TextInfo: <class 'NVDAObjects.NVDAObjectTextInfo'>
appModule: AppModule(code, appName='code - insiders', processID=5180)
appModule.productName: 'Visual Studio Code - Insider'
appModule.productVersion: '1.93.0-insider'
appModule.helperLocalBindingHandle: c_long(113346544)
appModule.appArchitecture: 'AMD64'
windowHandle: 19333304
windowClassName: 'Chrome_RenderWidgetHostHWND'
windowControlID: 705200
windowStyle: 1445986304
extendedWindowStyle: 32
windowThreadID: 31212
windowText: 'Chrome Legacy Window'
displayText: ''
IAccessibleObject: <POINTER(IAccessible2) ptr=0x705092c at d9398a0>
IAccessibleChildID: 0
IAccessible event parameters: windowHandle=19333304, objectID=-4, childID=-22
IAccessible accName: '欢迎 - Visual Studio Code - Insiders'
IAccessible accRole: ROLE_SYSTEM_DOCUMENT
IAccessible accState: STATE_SYSTEM_READONLY, STATE_SYSTEM_FOCUSABLE, STATE_SYSTEM_VALID (1048640)
IAccessible accDescription: None
IAccessible accValue: 'vscode-file://vscode-app/c:/Users/hwf1324/AppData/Local/Programs/Microsoft%20VS%20Code%20Insiders/resources/app/out/vs/code/electron-sandbox/workbench/workbench.html'
IAccessible2 windowHandle: 19333304
IAccessible2 uniqueID: -22
IAccessible2 role: ROLE_SYSTEM_DOCUMENT
IAccessible2 states: IA2_STATE_OPAQUE (1024)
IAccessible2 attributes: 'tag:#document;explicit-name:true;text-align:left;'
IAccessible2 relations: 
INFO - external:globalPlugins.electronMouse.RedirectDocument.objectFromPointRedirect (22:26:23.727) - MainThread (10900):
IAccessibleObject.accHitTest returned <comtypes.client.dynamic._Dispatch object at 0x0D24D150>
INFO - external:globalPlugins.electronMouse.RedirectDocument.objectFromPointRedirect (22:26:23.731) - MainThread (10900):
Redirected object: None
INFO - external:globalPlugins.electronMouse.RedirectDocument.objectFromPointRedirect (22:26:23.780) - MainThread (10900):
Developer info for the document object:
name: '欢迎 - Visual Studio Code - Insiders'
role: DOCUMENT
processID: 5180
roleText: None
states: READONLY, FOCUSABLE
isFocusable: True
hasFocus: False
Python object: <NVDAObjects.Dynamic_DocumentWithLogVSCodeDocumentDocumentIa2WebIAccessible object at 0x0AEE2050>
Python class mro: (<class 'NVDAObjects.Dynamic_DocumentWithLogVSCodeDocumentDocumentIa2WebIAccessible'>, <class 'globalPlugins.ndtt.logReader.DocumentWithLog'>, <class 'appModules.code.VSCodeDocument'>, <class 'NVDAObjects.IAccessible.chromium.Document'>, <class 'NVDAObjects.IAccessible.ia2Web.Document'>, <class 'NVDAObjects.IAccessible.ia2Web.Ia2Web'>, <class 'NVDAObjects.IAccessible.IAccessible'>, <class 'NVDAObjects.window.Window'>, <class 'NVDAObjects.NVDAObject'>, <class 'documentBase.TextContainerObject'>, <class 'baseObject.ScriptableObject'>, <class 'baseObject.AutoPropertyObject'>, <class 'garbageHandler.TrackedObject'>, <class 'object'>)
description: None
location: RectLTWH(left=0, top=0, width=1920, height=1032)
value: None
TextInfo: <class 'NVDAObjects.NVDAObjectTextInfo'>
appModule: AppModule(code, appName='code - insiders', processID=5180)
appModule.productName: 'Visual Studio Code - Insider'
appModule.productVersion: '1.93.0-insider'
appModule.helperLocalBindingHandle: c_long(113346544)
appModule.appArchitecture: 'AMD64'
windowHandle: 19333304
windowClassName: 'Chrome_RenderWidgetHostHWND'
windowControlID: 705200
windowStyle: 1445986304
extendedWindowStyle: 32
windowThreadID: 31212
windowText: 'Chrome Legacy Window'
displayText: ''
IAccessibleObject: <POINTER(IAccessible2) ptr=0x705092c at d939a30>
IAccessibleChildID: 0
IAccessible event parameters: windowHandle=19333304, objectID=-4, childID=-22
IAccessible accName: '欢迎 - Visual Studio Code - Insiders'
IAccessible accRole: ROLE_SYSTEM_DOCUMENT
IAccessible accState: STATE_SYSTEM_READONLY, STATE_SYSTEM_FOCUSABLE, STATE_SYSTEM_VALID (1048640)
IAccessible accDescription: None
IAccessible accValue: 'vscode-file://vscode-app/c:/Users/hwf1324/AppData/Local/Programs/Microsoft%20VS%20Code%20Insiders/resources/app/out/vs/code/electron-sandbox/workbench/workbench.html'
IAccessible2 windowHandle: 19333304
IAccessible2 uniqueID: -22
IAccessible2 role: ROLE_SYSTEM_DOCUMENT
IAccessible2 states: IA2_STATE_OPAQUE (1024)
IAccessible2 attributes: 'tag:#document;explicit-name:true;text-align:left;'
IAccessible2 relations: 
INFO - external:globalPlugins.electronMouse.RedirectDocument.objectFromPointRedirect (22:26:23.781) - MainThread (10900):
IAccessibleObject.accHitTest returned <comtypes.client.dynamic._Dispatch object at 0x0D243750>
INFO - external:globalPlugins.electronMouse.RedirectDocument.objectFromPointRedirect (22:26:23.784) - MainThread (10900):
Redirected object: None
INFO - external:globalPlugins.electronMouse.RedirectDocument.objectFromPointRedirect (22:26:23.829) - MainThread (10900):
Developer info for the document object:
name: '欢迎 - Visual Studio Code - Insiders'
role: DOCUMENT
processID: 5180
roleText: None
states: READONLY, FOCUSABLE
isFocusable: True
hasFocus: False
Python object: <NVDAObjects.Dynamic_DocumentWithLogVSCodeDocumentDocumentIa2WebIAccessible object at 0x0D23DC50>
Python class mro: (<class 'NVDAObjects.Dynamic_DocumentWithLogVSCodeDocumentDocumentIa2WebIAccessible'>, <class 'globalPlugins.ndtt.logReader.DocumentWithLog'>, <class 'appModules.code.VSCodeDocument'>, <class 'NVDAObjects.IAccessible.chromium.Document'>, <class 'NVDAObjects.IAccessible.ia2Web.Document'>, <class 'NVDAObjects.IAccessible.ia2Web.Ia2Web'>, <class 'NVDAObjects.IAccessible.IAccessible'>, <class 'NVDAObjects.window.Window'>, <class 'NVDAObjects.NVDAObject'>, <class 'documentBase.TextContainerObject'>, <class 'baseObject.ScriptableObject'>, <class 'baseObject.AutoPropertyObject'>, <class 'garbageHandler.TrackedObject'>, <class 'object'>)
description: None
location: RectLTWH(left=0, top=0, width=1920, height=1032)
value: None
TextInfo: <class 'NVDAObjects.NVDAObjectTextInfo'>
appModule: AppModule(code, appName='code - insiders', processID=5180)
appModule.productName: 'Visual Studio Code - Insider'
appModule.productVersion: '1.93.0-insider'
appModule.helperLocalBindingHandle: c_long(113346544)
appModule.appArchitecture: 'AMD64'
windowHandle: 19333304
windowClassName: 'Chrome_RenderWidgetHostHWND'
windowControlID: 705200
windowStyle: 1445986304
extendedWindowStyle: 32
windowThreadID: 31212
windowText: 'Chrome Legacy Window'
displayText: ''
IAccessibleObject: <POINTER(IAccessible2) ptr=0x705092c at d939d50>
IAccessibleChildID: 0
IAccessible event parameters: windowHandle=19333304, objectID=-4, childID=-22
IAccessible accName: '欢迎 - Visual Studio Code - Insiders'
IAccessible accRole: ROLE_SYSTEM_DOCUMENT
IAccessible accState: STATE_SYSTEM_READONLY, STATE_SYSTEM_FOCUSABLE, STATE_SYSTEM_VALID (1048640)
IAccessible accDescription: None
IAccessible accValue: 'vscode-file://vscode-app/c:/Users/hwf1324/AppData/Local/Programs/Microsoft%20VS%20Code%20Insiders/resources/app/out/vs/code/electron-sandbox/workbench/workbench.html'
IAccessible2 windowHandle: 19333304
IAccessible2 uniqueID: -22
IAccessible2 role: ROLE_SYSTEM_DOCUMENT
IAccessible2 states: IA2_STATE_OPAQUE (1024)
IAccessible2 attributes: 'tag:#document;explicit-name:true;text-align:left;'
IAccessible2 relations: 
INFO - external:globalPlugins.electronMouse.RedirectDocument.objectFromPointRedirect (22:26:23.830) - MainThread (10900):
IAccessibleObject.accHitTest returned <comtypes.client.dynamic._Dispatch object at 0x0D243AD0>
INFO - external:globalPlugins.electronMouse.RedirectDocument.objectFromPointRedirect (22:26:23.832) - MainThread (10900):
Redirected object: None
INFO - external:globalPlugins.electronMouse.RedirectDocument.objectFromPointRedirect (22:26:23.868) - MainThread (10900):
Developer info for the document object:
name: '欢迎 - Visual Studio Code - Insiders'
role: DOCUMENT
processID: 5180
roleText: None
states: READONLY, FOCUSABLE
isFocusable: True
hasFocus: False
Python object: <NVDAObjects.Dynamic_DocumentWithLogVSCodeDocumentDocumentIa2WebIAccessible object at 0x0AEE2D90>
Python class mro: (<class 'NVDAObjects.Dynamic_DocumentWithLogVSCodeDocumentDocumentIa2WebIAccessible'>, <class 'globalPlugins.ndtt.logReader.DocumentWithLog'>, <class 'appModules.code.VSCodeDocument'>, <class 'NVDAObjects.IAccessible.chromium.Document'>, <class 'NVDAObjects.IAccessible.ia2Web.Document'>, <class 'NVDAObjects.IAccessible.ia2Web.Ia2Web'>, <class 'NVDAObjects.IAccessible.IAccessible'>, <class 'NVDAObjects.window.Window'>, <class 'NVDAObjects.NVDAObject'>, <class 'documentBase.TextContainerObject'>, <class 'baseObject.ScriptableObject'>, <class 'baseObject.AutoPropertyObject'>, <class 'garbageHandler.TrackedObject'>, <class 'object'>)
description: None
location: RectLTWH(left=0, top=0, width=1920, height=1032)
value: None
TextInfo: <class 'NVDAObjects.NVDAObjectTextInfo'>
appModule: AppModule(code, appName='code - insiders', processID=5180)
appModule.productName: 'Visual Studio Code - Insider'
appModule.productVersion: '1.93.0-insider'
appModule.helperLocalBindingHandle: c_long(113346544)
appModule.appArchitecture: 'AMD64'
windowHandle: 19333304
windowClassName: 'Chrome_RenderWidgetHostHWND'
windowControlID: 705200
windowStyle: 1445986304
extendedWindowStyle: 32
windowThreadID: 31212
windowText: 'Chrome Legacy Window'
displayText: ''
IAccessibleObject: <POINTER(IAccessible2) ptr=0x705092c at d939ad0>
IAccessibleChildID: 0
IAccessible event parameters: windowHandle=19333304, objectID=-4, childID=-22
IAccessible accName: '欢迎 - Visual Studio Code - Insiders'
IAccessible accRole: ROLE_SYSTEM_DOCUMENT
IAccessible accState: STATE_SYSTEM_READONLY, STATE_SYSTEM_FOCUSABLE, STATE_SYSTEM_VALID (1048640)
IAccessible accDescription: None
IAccessible accValue: 'vscode-file://vscode-app/c:/Users/hwf1324/AppData/Local/Programs/Microsoft%20VS%20Code%20Insiders/resources/app/out/vs/code/electron-sandbox/workbench/workbench.html'
IAccessible2 windowHandle: 19333304
IAccessible2 uniqueID: -22
IAccessible2 role: ROLE_SYSTEM_DOCUMENT
IAccessible2 states: IA2_STATE_OPAQUE (1024)
IAccessible2 attributes: 'tag:#document;explicit-name:true;text-align:left;'
IAccessible2 relations: 
INFO - external:globalPlugins.electronMouse.RedirectDocument.objectFromPointRedirect (22:26:23.868) - MainThread (10900):
IAccessibleObject.accHitTest returned <comtypes.client.dynamic._Dispatch object at 0x0D249B10>
INFO - external:globalPlugins.electronMouse.RedirectDocument.objectFromPointRedirect (22:26:23.871) - MainThread (10900):
Redirected object: None
INFO - external:globalPlugins.electronMouse.RedirectDocument.objectFromPointRedirect (22:26:23.892) - MainThread (10900):
Developer info for the document object:
name: '欢迎 - Visual Studio Code - Insiders'
role: DOCUMENT
processID: 5180
roleText: None
states: READONLY, FOCUSABLE
isFocusable: True
hasFocus: False
Python object: <NVDAObjects.Dynamic_DocumentWithLogVSCodeDocumentDocumentIa2WebIAccessible object at 0x0AEE2D10>
Python class mro: (<class 'NVDAObjects.Dynamic_DocumentWithLogVSCodeDocumentDocumentIa2WebIAccessible'>, <class 'globalPlugins.ndtt.logReader.DocumentWithLog'>, <class 'appModules.code.VSCodeDocument'>, <class 'NVDAObjects.IAccessible.chromium.Document'>, <class 'NVDAObjects.IAccessible.ia2Web.Document'>, <class 'NVDAObjects.IAccessible.ia2Web.Ia2Web'>, <class 'NVDAObjects.IAccessible.IAccessible'>, <class 'NVDAObjects.window.Window'>, <class 'NVDAObjects.NVDAObject'>, <class 'documentBase.TextContainerObject'>, <class 'baseObject.ScriptableObject'>, <class 'baseObject.AutoPropertyObject'>, <class 'garbageHandler.TrackedObject'>, <class 'object'>)
description: None
location: RectLTWH(left=0, top=0, width=1920, height=1032)
value: None
TextInfo: <class 'NVDAObjects.NVDAObjectTextInfo'>
appModule: AppModule(code, appName='code - insiders', processID=5180)
appModule.productName: 'Visual Studio Code - Insider'
appModule.productVersion: '1.93.0-insider'
appModule.helperLocalBindingHandle: c_long(113346544)
appModule.appArchitecture: 'AMD64'
windowHandle: 19333304
windowClassName: 'Chrome_RenderWidgetHostHWND'
windowControlID: 705200
windowStyle: 1445986304
extendedWindowStyle: 32
windowThreadID: 31212
windowText: 'Chrome Legacy Window'
displayText: ''
IAccessibleObject: <POINTER(IAccessible2) ptr=0x705092c at d939b20>
IAccessibleChildID: 0
IAccessible event parameters: windowHandle=19333304, objectID=-4, childID=-22
IAccessible accName: '欢迎 - Visual Studio Code - Insiders'
IAccessible accRole: ROLE_SYSTEM_DOCUMENT
IAccessible accState: STATE_SYSTEM_READONLY, STATE_SYSTEM_FOCUSABLE, STATE_SYSTEM_VALID (1048640)
IAccessible accDescription: None
IAccessible accValue: 'vscode-file://vscode-app/c:/Users/hwf1324/AppData/Local/Programs/Microsoft%20VS%20Code%20Insiders/resources/app/out/vs/code/electron-sandbox/workbench/workbench.html'
IAccessible2 windowHandle: 19333304
IAccessible2 uniqueID: -22
IAccessible2 role: ROLE_SYSTEM_DOCUMENT
IAccessible2 states: IA2_STATE_OPAQUE (1024)
IAccessible2 attributes: 'tag:#document;explicit-name:true;text-align:left;'
IAccessible2 relations: 
INFO - external:globalPlugins.electronMouse.RedirectDocument.objectFromPointRedirect (22:26:23.893) - MainThread (10900):
IAccessibleObject.accHitTest returned <comtypes.client.dynamic._Dispatch object at 0x0D243F10>
INFO - external:globalPlugins.electronMouse.RedirectDocument.objectFromPointRedirect (22:26:23.894) - MainThread (10900):
Redirected object: None
INFO - external:globalPlugins.electronMouse.RedirectDocument.objectFromPointRedirect (22:26:23.989) - MainThread (10900):
Developer info for the document object:
name: '欢迎 - Visual Studio Code - Insiders'
role: DOCUMENT
processID: 5180
roleText: None
states: READONLY, FOCUSABLE
isFocusable: True
hasFocus: False
Python object: <NVDAObjects.Dynamic_DocumentWithLogVSCodeDocumentDocumentIa2WebIAccessible object at 0x0D243AD0>
Python class mro: (<class 'NVDAObjects.Dynamic_DocumentWithLogVSCodeDocumentDocumentIa2WebIAccessible'>, <class 'globalPlugins.ndtt.logReader.DocumentWithLog'>, <class 'appModules.code.VSCodeDocument'>, <class 'NVDAObjects.IAccessible.chromium.Document'>, <class 'NVDAObjects.IAccessible.ia2Web.Document'>, <class 'NVDAObjects.IAccessible.ia2Web.Ia2Web'>, <class 'NVDAObjects.IAccessible.IAccessible'>, <class 'NVDAObjects.window.Window'>, <class 'NVDAObjects.NVDAObject'>, <class 'documentBase.TextContainerObject'>, <class 'baseObject.ScriptableObject'>, <class 'baseObject.AutoPropertyObject'>, <class 'garbageHandler.TrackedObject'>, <class 'object'>)
description: None
location: RectLTWH(left=0, top=0, width=1920, height=1032)
value: None
TextInfo: <class 'NVDAObjects.NVDAObjectTextInfo'>
appModule: AppModule(code, appName='code - insiders', processID=5180)
appModule.productName: 'Visual Studio Code - Insider'
appModule.productVersion: '1.93.0-insider'
appModule.helperLocalBindingHandle: c_long(113346544)
appModule.appArchitecture: 'AMD64'
windowHandle: 19333304
windowClassName: 'Chrome_RenderWidgetHostHWND'
windowControlID: 705200
windowStyle: 1445986304
extendedWindowStyle: 32
windowThreadID: 31212
windowText: 'Chrome Legacy Window'
displayText: ''
IAccessibleObject: <POINTER(IAccessible2) ptr=0x705092c at d2510d0>
IAccessibleChildID: 0
IAccessible event parameters: windowHandle=19333304, objectID=-4, childID=-22
IAccessible accName: '欢迎 - Visual Studio Code - Insiders'
IAccessible accRole: ROLE_SYSTEM_DOCUMENT
IAccessible accState: STATE_SYSTEM_READONLY, STATE_SYSTEM_FOCUSABLE, STATE_SYSTEM_VALID (1048640)
IAccessible accDescription: None
IAccessible accValue: 'vscode-file://vscode-app/c:/Users/hwf1324/AppData/Local/Programs/Microsoft%20VS%20Code%20Insiders/resources/app/out/vs/code/electron-sandbox/workbench/workbench.html'
IAccessible2 windowHandle: 19333304
IAccessible2 uniqueID: -22
IAccessible2 role: ROLE_SYSTEM_DOCUMENT
IAccessible2 states: IA2_STATE_OPAQUE (1024)
IAccessible2 attributes: 'tag:#document;explicit-name:true;text-align:left;'
IAccessible2 relations: 
INFO - external:globalPlugins.electronMouse.RedirectDocument.objectFromPointRedirect (22:26:23.993) - MainThread (10900):
IAccessibleObject.accHitTest returned <comtypes.client.dynamic._Dispatch object at 0x0D2499F0>
INFO - external:globalPlugins.electronMouse.RedirectDocument.objectFromPointRedirect (22:26:23.998) - MainThread (10900):
Redirected object: None
INFO - external:globalPlugins.electronMouse.RedirectDocument.objectFromPointRedirect (22:26:24.064) - MainThread (10900):
Developer info for the document object:
name: '欢迎 - Visual Studio Code - Insiders'
role: DOCUMENT
processID: 5180
roleText: None
states: READONLY, FOCUSABLE
isFocusable: True
hasFocus: False
Python object: <NVDAObjects.Dynamic_DocumentWithLogVSCodeDocumentDocumentIa2WebIAccessible object at 0x032B5D30>
Python class mro: (<class 'NVDAObjects.Dynamic_DocumentWithLogVSCodeDocumentDocumentIa2WebIAccessible'>, <class 'globalPlugins.ndtt.logReader.DocumentWithLog'>, <class 'appModules.code.VSCodeDocument'>, <class 'NVDAObjects.IAccessible.chromium.Document'>, <class 'NVDAObjects.IAccessible.ia2Web.Document'>, <class 'NVDAObjects.IAccessible.ia2Web.Ia2Web'>, <class 'NVDAObjects.IAccessible.IAccessible'>, <class 'NVDAObjects.window.Window'>, <class 'NVDAObjects.NVDAObject'>, <class 'documentBase.TextContainerObject'>, <class 'baseObject.ScriptableObject'>, <class 'baseObject.AutoPropertyObject'>, <class 'garbageHandler.TrackedObject'>, <class 'object'>)
description: None
location: RectLTWH(left=0, top=0, width=1920, height=1032)
value: None
TextInfo: <class 'NVDAObjects.NVDAObjectTextInfo'>
appModule: AppModule(code, appName='code - insiders', processID=5180)
appModule.productName: 'Visual Studio Code - Insider'
appModule.productVersion: '1.93.0-insider'
appModule.helperLocalBindingHandle: c_long(113346544)
appModule.appArchitecture: 'AMD64'
windowHandle: 19333304
windowClassName: 'Chrome_RenderWidgetHostHWND'
windowControlID: 705200
windowStyle: 1445986304
extendedWindowStyle: 32
windowThreadID: 31212
windowText: 'Chrome Legacy Window'
displayText: ''
IAccessibleObject: <POINTER(IAccessible2) ptr=0x705092c at d251170>
IAccessibleChildID: 0
IAccessible event parameters: windowHandle=19333304, objectID=-4, childID=-22
IAccessible accName: '欢迎 - Visual Studio Code - Insiders'
IAccessible accRole: ROLE_SYSTEM_DOCUMENT
IAccessible accState: STATE_SYSTEM_READONLY, STATE_SYSTEM_FOCUSABLE, STATE_SYSTEM_VALID (1048640)
IAccessible accDescription: None
IAccessible accValue: 'vscode-file://vscode-app/c:/Users/hwf1324/AppData/Local/Programs/Microsoft%20VS%20Code%20Insiders/resources/app/out/vs/code/electron-sandbox/workbench/workbench.html'
IAccessible2 windowHandle: 19333304
IAccessible2 uniqueID: -22
IAccessible2 role: ROLE_SYSTEM_DOCUMENT
IAccessible2 states: IA2_STATE_OPAQUE (1024)
IAccessible2 attributes: 'tag:#document;explicit-name:true;text-align:left;'
IAccessible2 relations: 
INFO - external:globalPlugins.electronMouse.RedirectDocument.objectFromPointRedirect (22:26:24.067) - MainThread (10900):
IAccessibleObject.accHitTest returned <comtypes.client.dynamic._Dispatch object at 0x0D249950>
INFO - external:globalPlugins.electronMouse.RedirectDocument.objectFromPointRedirect (22:26:24.069) - MainThread (10900):
Redirected object: None
INFO - external:globalPlugins.electronMouse.RedirectDocument.objectFromPointRedirect (22:26:24.137) - MainThread (10900):
Developer info for the document object:
name: '欢迎 - Visual Studio Code - Insiders'
role: DOCUMENT
processID: 5180
roleText: None
states: READONLY, FOCUSABLE
isFocusable: True
hasFocus: False
Python object: <NVDAObjects.Dynamic_DocumentWithLogVSCodeDocumentDocumentIa2WebIAccessible object at 0x0D243C10>
Python class mro: (<class 'NVDAObjects.Dynamic_DocumentWithLogVSCodeDocumentDocumentIa2WebIAccessible'>, <class 'globalPlugins.ndtt.logReader.DocumentWithLog'>, <class 'appModules.code.VSCodeDocument'>, <class 'NVDAObjects.IAccessible.chromium.Document'>, <class 'NVDAObjects.IAccessible.ia2Web.Document'>, <class 'NVDAObjects.IAccessible.ia2Web.Ia2Web'>, <class 'NVDAObjects.IAccessible.IAccessible'>, <class 'NVDAObjects.window.Window'>, <class 'NVDAObjects.NVDAObject'>, <class 'documentBase.TextContainerObject'>, <class 'baseObject.ScriptableObject'>, <class 'baseObject.AutoPropertyObject'>, <class 'garbageHandler.TrackedObject'>, <class 'object'>)
description: None
location: RectLTWH(left=0, top=0, width=1920, height=1032)
value: None
TextInfo: <class 'NVDAObjects.NVDAObjectTextInfo'>
appModule: AppModule(code, appName='code - insiders', processID=5180)
appModule.productName: 'Visual Studio Code - Insider'
appModule.productVersion: '1.93.0-insider'
appModule.helperLocalBindingHandle: c_long(113346544)
appModule.appArchitecture: 'AMD64'
windowHandle: 19333304
windowClassName: 'Chrome_RenderWidgetHostHWND'
windowControlID: 705200
windowStyle: 1445986304
extendedWindowStyle: 32
windowThreadID: 31212
windowText: 'Chrome Legacy Window'
displayText: ''
IAccessibleObject: <POINTER(IAccessible2) ptr=0x705092c at d2511c0>
IAccessibleChildID: 0
IAccessible event parameters: windowHandle=19333304, objectID=-4, childID=-22
IAccessible accName: '欢迎 - Visual Studio Code - Insiders'
IAccessible accRole: ROLE_SYSTEM_DOCUMENT
IAccessible accState: STATE_SYSTEM_READONLY, STATE_SYSTEM_FOCUSABLE, STATE_SYSTEM_VALID (1048640)
IAccessible accDescription: None
IAccessible accValue: 'vscode-file://vscode-app/c:/Users/hwf1324/AppData/Local/Programs/Microsoft%20VS%20Code%20Insiders/resources/app/out/vs/code/electron-sandbox/workbench/workbench.html'
IAccessible2 windowHandle: 19333304
IAccessible2 uniqueID: -22
IAccessible2 role: ROLE_SYSTEM_DOCUMENT
IAccessible2 states: IA2_STATE_OPAQUE (1024)
IAccessible2 attributes: 'tag:#document;explicit-name:true;text-align:left;'
IAccessible2 relations: 
INFO - external:globalPlugins.electronMouse.RedirectDocument.objectFromPointRedirect (22:26:24.139) - MainThread (10900):
IAccessibleObject.accHitTest returned <comtypes.client.dynamic._Dispatch object at 0x0D23D6F0>
INFO - external:globalPlugins.electronMouse.RedirectDocument.objectFromPointRedirect (22:26:24.142) - MainThread (10900):
Redirected object: None
INFO - external:globalPlugins.electronMouse.RedirectDocument.objectFromPointRedirect (22:26:24.192) - MainThread (10900):
Developer info for the document object:
name: '欢迎 - Visual Studio Code - Insiders'
role: DOCUMENT
processID: 5180
roleText: None
states: READONLY, FOCUSABLE
isFocusable: True
hasFocus: False
Python object: <NVDAObjects.Dynamic_DocumentWithLogVSCodeDocumentDocumentIa2WebIAccessible object at 0x032B5D30>
Python class mro: (<class 'NVDAObjects.Dynamic_DocumentWithLogVSCodeDocumentDocumentIa2WebIAccessible'>, <class 'globalPlugins.ndtt.logReader.DocumentWithLog'>, <class 'appModules.code.VSCodeDocument'>, <class 'NVDAObjects.IAccessible.chromium.Document'>, <class 'NVDAObjects.IAccessible.ia2Web.Document'>, <class 'NVDAObjects.IAccessible.ia2Web.Ia2Web'>, <class 'NVDAObjects.IAccessible.IAccessible'>, <class 'NVDAObjects.window.Window'>, <class 'NVDAObjects.NVDAObject'>, <class 'documentBase.TextContainerObject'>, <class 'baseObject.ScriptableObject'>, <class 'baseObject.AutoPropertyObject'>, <class 'garbageHandler.TrackedObject'>, <class 'object'>)
description: None
location: RectLTWH(left=0, top=0, width=1920, height=1032)
value: None
TextInfo: <class 'NVDAObjects.NVDAObjectTextInfo'>
appModule: AppModule(code, appName='code - insiders', processID=5180)
appModule.productName: 'Visual Studio Code - Insider'
appModule.productVersion: '1.93.0-insider'
appModule.helperLocalBindingHandle: c_long(113346544)
appModule.appArchitecture: 'AMD64'
windowHandle: 19333304
windowClassName: 'Chrome_RenderWidgetHostHWND'
windowControlID: 705200
windowStyle: 1445986304
extendedWindowStyle: 32
windowThreadID: 31212
windowText: 'Chrome Legacy Window'
displayText: ''
IAccessibleObject: <POINTER(IAccessible2) ptr=0x705092c at d251030>
IAccessibleChildID: 0
IAccessible event parameters: windowHandle=19333304, objectID=-4, childID=-22
IAccessible accName: '欢迎 - Visual Studio Code - Insiders'
IAccessible accRole: ROLE_SYSTEM_DOCUMENT
IAccessible accState: STATE_SYSTEM_READONLY, STATE_SYSTEM_FOCUSABLE, STATE_SYSTEM_VALID (1048640)
IAccessible accDescription: None
IAccessible accValue: 'vscode-file://vscode-app/c:/Users/hwf1324/AppData/Local/Programs/Microsoft%20VS%20Code%20Insiders/resources/app/out/vs/code/electron-sandbox/workbench/workbench.html'
IAccessible2 windowHandle: 19333304
IAccessible2 uniqueID: -22
IAccessible2 role: ROLE_SYSTEM_DOCUMENT
IAccessible2 states: IA2_STATE_OPAQUE (1024)
IAccessible2 attributes: 'tag:#document;explicit-name:true;text-align:left;'
IAccessible2 relations: 
INFO - external:globalPlugins.electronMouse.RedirectDocument.objectFromPointRedirect (22:26:24.193) - MainThread (10900):
IAccessibleObject.accHitTest returned <comtypes.client.dynamic._Dispatch object at 0x0D2495D0>
INFO - external:globalPlugins.electronMouse.RedirectDocument.objectFromPointRedirect (22:26:24.197) - MainThread (10900):
Redirected object: None
INFO - external:globalPlugins.electronMouse.RedirectDocument.objectFromPointRedirect (22:26:24.241) - MainThread (10900):
Developer info for the document object:
name: '欢迎 - Visual Studio Code - Insiders'
role: DOCUMENT
processID: 5180
roleText: None
states: READONLY, FOCUSABLE
isFocusable: True
hasFocus: False
Python object: <NVDAObjects.Dynamic_DocumentWithLogVSCodeDocumentDocumentIa2WebIAccessible object at 0x0AFE6D30>
Python class mro: (<class 'NVDAObjects.Dynamic_DocumentWithLogVSCodeDocumentDocumentIa2WebIAccessible'>, <class 'globalPlugins.ndtt.logReader.DocumentWithLog'>, <class 'appModules.code.VSCodeDocument'>, <class 'NVDAObjects.IAccessible.chromium.Document'>, <class 'NVDAObjects.IAccessible.ia2Web.Document'>, <class 'NVDAObjects.IAccessible.ia2Web.Ia2Web'>, <class 'NVDAObjects.IAccessible.IAccessible'>, <class 'NVDAObjects.window.Window'>, <class 'NVDAObjects.NVDAObject'>, <class 'documentBase.TextContainerObject'>, <class 'baseObject.ScriptableObject'>, <class 'baseObject.AutoPropertyObject'>, <class 'garbageHandler.TrackedObject'>, <class 'object'>)
description: None
location: RectLTWH(left=0, top=0, width=1920, height=1032)
value: None
TextInfo: <class 'NVDAObjects.NVDAObjectTextInfo'>
appModule: AppModule(code, appName='code - insiders', processID=5180)
appModule.productName: 'Visual Studio Code - Insider'
appModule.productVersion: '1.93.0-insider'
appModule.helperLocalBindingHandle: c_long(113346544)
appModule.appArchitecture: 'AMD64'
windowHandle: 19333304
windowClassName: 'Chrome_RenderWidgetHostHWND'
windowControlID: 705200
windowStyle: 1445986304
extendedWindowStyle: 32
windowThreadID: 31212
windowText: 'Chrome Legacy Window'
displayText: ''
IAccessibleObject: <POINTER(IAccessible2) ptr=0x705092c at d2513f0>
IAccessibleChildID: 0
IAccessible event parameters: windowHandle=19333304, objectID=-4, childID=-22
IAccessible accName: '欢迎 - Visual Studio Code - Insiders'
IAccessible accRole: ROLE_SYSTEM_DOCUMENT
IAccessible accState: STATE_SYSTEM_READONLY, STATE_SYSTEM_FOCUSABLE, STATE_SYSTEM_VALID (1048640)
IAccessible accDescription: None
IAccessible accValue: 'vscode-file://vscode-app/c:/Users/hwf1324/AppData/Local/Programs/Microsoft%20VS%20Code%20Insiders/resources/app/out/vs/code/electron-sandbox/workbench/workbench.html'
IAccessible2 windowHandle: 19333304
IAccessible2 uniqueID: -22
IAccessible2 role: ROLE_SYSTEM_DOCUMENT
IAccessible2 states: IA2_STATE_OPAQUE (1024)
IAccessible2 attributes: 'tag:#document;explicit-name:true;text-align:left;'
IAccessible2 relations: 
INFO - external:globalPlugins.electronMouse.RedirectDocument.objectFromPointRedirect (22:26:24.244) - MainThread (10900):
IAccessibleObject.accHitTest returned <comtypes.client.dynamic._Dispatch object at 0x0D249510>
INFO - external:globalPlugins.electronMouse.RedirectDocument.objectFromPointRedirect (22:26:24.246) - MainThread (10900):
Redirected object: None
INFO - external:globalPlugins.electronMouse.RedirectDocument.objectFromPointRedirect (22:26:24.286) - MainThread (10900):
Developer info for the document object:
name: '欢迎 - Visual Studio Code - Insiders'
role: DOCUMENT
processID: 5180
roleText: None
states: READONLY, FOCUSABLE
isFocusable: True
hasFocus: False
Python object: <NVDAObjects.Dynamic_DocumentWithLogVSCodeDocumentDocumentIa2WebIAccessible object at 0x0AEE2050>
Python class mro: (<class 'NVDAObjects.Dynamic_DocumentWithLogVSCodeDocumentDocumentIa2WebIAccessible'>, <class 'globalPlugins.ndtt.logReader.DocumentWithLog'>, <class 'appModules.code.VSCodeDocument'>, <class 'NVDAObjects.IAccessible.chromium.Document'>, <class 'NVDAObjects.IAccessible.ia2Web.Document'>, <class 'NVDAObjects.IAccessible.ia2Web.Ia2Web'>, <class 'NVDAObjects.IAccessible.IAccessible'>, <class 'NVDAObjects.window.Window'>, <class 'NVDAObjects.NVDAObject'>, <class 'documentBase.TextContainerObject'>, <class 'baseObject.ScriptableObject'>, <class 'baseObject.AutoPropertyObject'>, <class 'garbageHandler.TrackedObject'>, <class 'object'>)
description: None
location: RectLTWH(left=0, top=0, width=1920, height=1032)
value: None
TextInfo: <class 'NVDAObjects.NVDAObjectTextInfo'>
appModule: AppModule(code, appName='code - insiders', processID=5180)
appModule.productName: 'Visual Studio Code - Insider'
appModule.productVersion: '1.93.0-insider'
appModule.helperLocalBindingHandle: c_long(113346544)
appModule.appArchitecture: 'AMD64'
windowHandle: 19333304
windowClassName: 'Chrome_RenderWidgetHostHWND'
windowControlID: 705200
windowStyle: 1445986304
extendedWindowStyle: 32
windowThreadID: 31212
windowText: 'Chrome Legacy Window'
displayText: ''
IAccessibleObject: <POINTER(IAccessible2) ptr=0x705092c at d2513a0>
IAccessibleChildID: 0
IAccessible event parameters: windowHandle=19333304, objectID=-4, childID=-22
IAccessible accName: '欢迎 - Visual Studio Code - Insiders'
IAccessible accRole: ROLE_SYSTEM_DOCUMENT
IAccessible accState: STATE_SYSTEM_READONLY, STATE_SYSTEM_FOCUSABLE, STATE_SYSTEM_VALID (1048640)
IAccessible accDescription: None
IAccessible accValue: 'vscode-file://vscode-app/c:/Users/hwf1324/AppData/Local/Programs/Microsoft%20VS%20Code%20Insiders/resources/app/out/vs/code/electron-sandbox/workbench/workbench.html'
IAccessible2 windowHandle: 19333304
IAccessible2 uniqueID: -22
IAccessible2 role: ROLE_SYSTEM_DOCUMENT
IAccessible2 states: IA2_STATE_OPAQUE (1024)
IAccessible2 attributes: 'tag:#document;explicit-name:true;text-align:left;'
IAccessible2 relations: 
INFO - external:globalPlugins.electronMouse.RedirectDocument.objectFromPointRedirect (22:26:24.288) - MainThread (10900):
IAccessibleObject.accHitTest returned <comtypes.client.dynamic._Dispatch object at 0x0D249D50>
INFO - external:globalPlugins.electronMouse.RedirectDocument.objectFromPointRedirect (22:26:24.292) - MainThread (10900):
Redirected object: None
INFO - external:globalPlugins.electronMouse.RedirectDocument.objectFromPointRedirect (22:26:24.351) - MainThread (10900):
Developer info for the document object:
name: '欢迎 - Visual Studio Code - Insiders'
role: DOCUMENT
processID: 5180
roleText: None
states: READONLY, FOCUSABLE
isFocusable: True
hasFocus: False
Python object: <NVDAObjects.Dynamic_DocumentWithLogVSCodeDocumentDocumentIa2WebIAccessible object at 0x0D243C10>
Python class mro: (<class 'NVDAObjects.Dynamic_DocumentWithLogVSCodeDocumentDocumentIa2WebIAccessible'>, <class 'globalPlugins.ndtt.logReader.DocumentWithLog'>, <class 'appModules.code.VSCodeDocument'>, <class 'NVDAObjects.IAccessible.chromium.Document'>, <class 'NVDAObjects.IAccessible.ia2Web.Document'>, <class 'NVDAObjects.IAccessible.ia2Web.Ia2Web'>, <class 'NVDAObjects.IAccessible.IAccessible'>, <class 'NVDAObjects.window.Window'>, <class 'NVDAObjects.NVDAObject'>, <class 'documentBase.TextContainerObject'>, <class 'baseObject.ScriptableObject'>, <class 'baseObject.AutoPropertyObject'>, <class 'garbageHandler.TrackedObject'>, <class 'object'>)
description: None
location: RectLTWH(left=0, top=0, width=1920, height=1032)
value: None
TextInfo: <class 'NVDAObjects.NVDAObjectTextInfo'>
appModule: AppModule(code, appName='code - insiders', processID=5180)
appModule.productName: 'Visual Studio Code - Insider'
appModule.productVersion: '1.93.0-insider'
appModule.helperLocalBindingHandle: c_long(113346544)
appModule.appArchitecture: 'AMD64'
windowHandle: 19333304
windowClassName: 'Chrome_RenderWidgetHostHWND'
windowControlID: 705200
windowStyle: 1445986304
extendedWindowStyle: 32
windowThreadID: 31212
windowText: 'Chrome Legacy Window'
displayText: ''
IAccessibleObject: <POINTER(IAccessible2) ptr=0x705092c at d2514e0>
IAccessibleChildID: 0
IAccessible event parameters: windowHandle=19333304, objectID=-4, childID=-22
IAccessible accName: '欢迎 - Visual Studio Code - Insiders'
IAccessible accRole: ROLE_SYSTEM_DOCUMENT
IAccessible accState: STATE_SYSTEM_READONLY, STATE_SYSTEM_FOCUSABLE, STATE_SYSTEM_VALID (1048640)
IAccessible accDescription: None
IAccessible accValue: 'vscode-file://vscode-app/c:/Users/hwf1324/AppData/Local/Programs/Microsoft%20VS%20Code%20Insiders/resources/app/out/vs/code/electron-sandbox/workbench/workbench.html'
IAccessible2 windowHandle: 19333304
IAccessible2 uniqueID: -22
IAccessible2 role: ROLE_SYSTEM_DOCUMENT
IAccessible2 states: IA2_STATE_OPAQUE (1024)
IAccessible2 attributes: 'tag:#document;explicit-name:true;text-align:left;'
IAccessible2 relations: 
INFO - external:globalPlugins.electronMouse.RedirectDocument.objectFromPointRedirect (22:26:24.352) - MainThread (10900):
IAccessibleObject.accHitTest returned <comtypes.client.dynamic._Dispatch object at 0x0D249CB0>
INFO - external:globalPlugins.electronMouse.RedirectDocument.objectFromPointRedirect (22:26:24.357) - MainThread (10900):
Redirected object: None
INFO - external:globalPlugins.electronMouse.RedirectDocument.objectFromPointRedirect (22:26:24.409) - MainThread (10900):
Developer info for the document object:
name: '欢迎 - Visual Studio Code - Insiders'
role: DOCUMENT
processID: 5180
roleText: None
states: READONLY, FOCUSABLE
isFocusable: True
hasFocus: False
Python object: <NVDAObjects.Dynamic_DocumentWithLogVSCodeDocumentDocumentIa2WebIAccessible object at 0x0D243750>
Python class mro: (<class 'NVDAObjects.Dynamic_DocumentWithLogVSCodeDocumentDocumentIa2WebIAccessible'>, <class 'globalPlugins.ndtt.logReader.DocumentWithLog'>, <class 'appModules.code.VSCodeDocument'>, <class 'NVDAObjects.IAccessible.chromium.Document'>, <class 'NVDAObjects.IAccessible.ia2Web.Document'>, <class 'NVDAObjects.IAccessible.ia2Web.Ia2Web'>, <class 'NVDAObjects.IAccessible.IAccessible'>, <class 'NVDAObjects.window.Window'>, <class 'NVDAObjects.NVDAObject'>, <class 'documentBase.TextContainerObject'>, <class 'baseObject.ScriptableObject'>, <class 'baseObject.AutoPropertyObject'>, <class 'garbageHandler.TrackedObject'>, <class 'object'>)
description: None
location: RectLTWH(left=0, top=0, width=1920, height=1032)
value: None
TextInfo: <class 'NVDAObjects.NVDAObjectTextInfo'>
appModule: AppModule(code, appName='code - insiders', processID=5180)
appModule.productName: 'Visual Studio Code - Insider'
appModule.productVersion: '1.93.0-insider'
appModule.helperLocalBindingHandle: c_long(113346544)
appModule.appArchitecture: 'AMD64'
windowHandle: 19333304
windowClassName: 'Chrome_RenderWidgetHostHWND'
windowControlID: 705200
windowStyle: 1445986304
extendedWindowStyle: 32
windowThreadID: 31212
windowText: 'Chrome Legacy Window'
displayText: ''
IAccessibleObject: <POINTER(IAccessible2) ptr=0x705092c at d251210>
IAccessibleChildID: 0
IAccessible event parameters: windowHandle=19333304, objectID=-4, childID=-22
IAccessible accName: '欢迎 - Visual Studio Code - Insiders'
IAccessible accRole: ROLE_SYSTEM_DOCUMENT
IAccessible accState: STATE_SYSTEM_READONLY, STATE_SYSTEM_FOCUSABLE, STATE_SYSTEM_VALID (1048640)
IAccessible accDescription: None
IAccessible accValue: 'vscode-file://vscode-app/c:/Users/hwf1324/AppData/Local/Programs/Microsoft%20VS%20Code%20Insiders/resources/app/out/vs/code/electron-sandbox/workbench/workbench.html'
IAccessible2 windowHandle: 19333304
IAccessible2 uniqueID: -22
IAccessible2 role: ROLE_SYSTEM_DOCUMENT
IAccessible2 states: IA2_STATE_OPAQUE (1024)
IAccessible2 attributes: 'tag:#document;explicit-name:true;text-align:left;'
IAccessible2 relations: 
INFO - external:globalPlugins.electronMouse.RedirectDocument.objectFromPointRedirect (22:26:24.411) - MainThread (10900):
IAccessibleObject.accHitTest returned <comtypes.client.dynamic._Dispatch object at 0x0D2499D0>
INFO - external:globalPlugins.electronMouse.RedirectDocument.objectFromPointRedirect (22:26:24.413) - MainThread (10900):
Redirected object: None
INFO - external:globalPlugins.electronMouse.RedirectDocument.objectFromPointRedirect (22:26:24.451) - MainThread (10900):
Developer info for the document object:
name: '欢迎 - Visual Studio Code - Insiders'
role: DOCUMENT
processID: 5180
roleText: None
states: READONLY, FOCUSABLE
isFocusable: True
hasFocus: False
Python object: <NVDAObjects.Dynamic_DocumentWithLogVSCodeDocumentDocumentIa2WebIAccessible object at 0x0D94E6D0>
Python class mro: (<class 'NVDAObjects.Dynamic_DocumentWithLogVSCodeDocumentDocumentIa2WebIAccessible'>, <class 'globalPlugins.ndtt.logReader.DocumentWithLog'>, <class 'appModules.code.VSCodeDocument'>, <class 'NVDAObjects.IAccessible.chromium.Document'>, <class 'NVDAObjects.IAccessible.ia2Web.Document'>, <class 'NVDAObjects.IAccessible.ia2Web.Ia2Web'>, <class 'NVDAObjects.IAccessible.IAccessible'>, <class 'NVDAObjects.window.Window'>, <class 'NVDAObjects.NVDAObject'>, <class 'documentBase.TextContainerObject'>, <class 'baseObject.ScriptableObject'>, <class 'baseObject.AutoPropertyObject'>, <class 'garbageHandler.TrackedObject'>, <class 'object'>)
description: None
location: RectLTWH(left=0, top=0, width=1920, height=1032)
value: None
TextInfo: <class 'NVDAObjects.NVDAObjectTextInfo'>
appModule: AppModule(code, appName='code - insiders', processID=5180)
appModule.productName: 'Visual Studio Code - Insider'
appModule.productVersion: '1.93.0-insider'
appModule.helperLocalBindingHandle: c_long(113346544)
appModule.appArchitecture: 'AMD64'
windowHandle: 19333304
windowClassName: 'Chrome_RenderWidgetHostHWND'
windowControlID: 705200
windowStyle: 1445986304
extendedWindowStyle: 32
windowThreadID: 31212
windowText: 'Chrome Legacy Window'
displayText: ''
IAccessibleObject: <POINTER(IAccessible2) ptr=0x705092c at d251530>
IAccessibleChildID: 0
IAccessible event parameters: windowHandle=19333304, objectID=-4, childID=-22
IAccessible accName: '欢迎 - Visual Studio Code - Insiders'
IAccessible accRole: ROLE_SYSTEM_DOCUMENT
IAccessible accState: STATE_SYSTEM_READONLY, STATE_SYSTEM_FOCUSABLE, STATE_SYSTEM_VALID (1048640)
IAccessible accDescription: None
IAccessible accValue: 'vscode-file://vscode-app/c:/Users/hwf1324/AppData/Local/Programs/Microsoft%20VS%20Code%20Insiders/resources/app/out/vs/code/electron-sandbox/workbench/workbench.html'
IAccessible2 windowHandle: 19333304
IAccessible2 uniqueID: -22
IAccessible2 role: ROLE_SYSTEM_DOCUMENT
IAccessible2 states: IA2_STATE_OPAQUE (1024)
IAccessible2 attributes: 'tag:#document;explicit-name:true;text-align:left;'
IAccessible2 relations: 
INFO - external:globalPlugins.electronMouse.RedirectDocument.objectFromPointRedirect (22:26:24.452) - MainThread (10900):
IAccessibleObject.accHitTest returned <comtypes.client.dynamic._Dispatch object at 0x0D249B10>
INFO - external:globalPlugins.electronMouse.RedirectDocument.objectFromPointRedirect (22:26:24.453) - MainThread (10900):
Redirected object: None

@hwf1324
Copy link
Contributor Author

hwf1324 commented Sep 7, 2024

INFO - external:globalPlugins.electronMouse.RedirectDocument.objectFromPointRedirect (18:58:36.917) - MainThread (29908):
IAccessibleObject.accHitTest returned <comtypes.client.dynamic._Dispatch object at 0x0E0E9A10>
DEBUGWARNING - NVDAObjects.IAccessible.IAccessible.__init__ (18:58:36.919) - MainThread (29908):
Resorting to WindowFromPoint on accLocation
DEBUGWARNING - NVDAObjects.IAccessible.IAccessible.__init__ (18:58:36.919) - MainThread (29908):
accLocation failed: (-2147319779, '库没有注册。', (None, None, None, 0, None))
DEBUGWARNING - NVDAObjects.__call__ (18:58:36.919) - MainThread (29908):
Invalid NVDAObject: Can't get a window handle from IAccessible
Traceback (most recent call last):
  File "NVDAObjects\__init__.py", line 96, in __call__
    obj.__init__(**kwargs)
  File "NVDAObjects\IAccessible\__init__.py", line 777, in __init__
    raise InvalidNVDAObject("Can't get a window handle from IAccessible")
NVDAObjects.InvalidNVDAObject: Can't get a window handle from IAccessible
INFO - external:globalPlugins.electronMouse.RedirectDocument.objectFromPointRedirect (18:58:36.920) - MainThread (29908):
Redirected object: None

@jcsteh
Copy link
Contributor

jcsteh commented Sep 8, 2024

Ah. I forgot accHitTest returns an IDispatch. You'll need to pass that to IAccessibleHandler.normalizeIAccessible, then pass that return value to the IAccessible NVDAObject constructor.

@hwf1324
Copy link
Contributor Author

hwf1324 commented Sep 8, 2024

I actually tried to automate this process using IAccessibleHandler.accHitTest, but there seems to be a problem. I will try calling normalizeIAccessible the way you described.

from contextlib import contextmanager

import controlTypes
import globalPluginHandler
import IAccessibleHandler
import winUser
from logHandler import log
from NVDAObjects import NVDAObject
from NVDAObjects.IAccessible import IAccessible
from NVDAObjects.IAccessible.chromium import Document
from NVDAObjects.IAccessible.ia2Web import Ia2Web


@contextmanager
def debugLog():
	import config
	import logHandler
	import logging

	curLevel = log.getEffectiveLevel()
	config.conf["general"]["loggingLevel"] = "DEBUG"
	logHandler.setLogLevelFromConfig()
	try:
		yield
	finally:
		config.conf["general"]["loggingLevel"] = logging.getLevelName(curLevel)
		logHandler.setLogLevelFromConfig()


class RedirectDocument(Ia2Web):

	def objectFromPointRedirect(self, x: int, y: int):
		with debugLog():
			docObj: Document = self.previous.lastChild
			log.info(
				"Developer info for the document object:\n%s" % "\n".join(docObj.devInfo),
			)
			# redirect = docObj.IAccessibleObject.accHitTest(x, y)
			redirect = IAccessibleHandler.accHitTest(docObj.IAccessibleObject, x, y)
			log.info(f"IAccessibleObject.accHitTest returned {redirect}")
			if not redirect:
				return None
			(pacc, child) = redirect
			# obj = IAccessible(IAccessibleObject=redirect, IAccessibleChildID=winUser.CHILDID_SELF)
			obj = IAccessible(IAccessibleObject=pacc, IAccessibleChildID=child)
			# log.info(
			# 	"Developer info for the redirected object:\n%s" % "\n".join(obj.devInfo),
			# )
			log.info(f"Redirected object: {obj}")
			return obj


class GlobalPlugin(globalPluginHandler.GlobalPlugin):

	def chooseNVDAObjectOverlayClasses(self, obj: Ia2Web, clsList: list[NVDAObject]):
		if (
			obj.windowClassName.startswith("Chrome_")
			and obj.role == controlTypes.Role.PANE
			and obj.childCount == 0
			and obj.previous
			and obj.previous.childCount != 0
			and obj.previous.lastChild.windowClassName == "Chrome_RenderWidgetHostHWND"
		):
			clsList.insert(0, RedirectDocument)
INFO - __main__ (07:10:55.113) - MainThread (5772):
Starting NVDA version source-typeHints-7e526e8 x86
INFO - core.main (07:10:55.288) - MainThread (5772):
Config dir: D:\NVDA\nvda\source\userConfig
INFO - config.ConfigManager._loadConfig (07:10:55.292) - MainThread (5772):
Loading config: D:\NVDA\nvda\source\userConfig\nvda.ini
INFO - core.main (07:10:55.302) - MainThread (5772):
Developer Scratchpad mode enabled
INFO - core.main (07:10:55.496) - MainThread (5772):
Windows version: Windows 11 22H2 (10.0.22621) workstation AMD64
INFO - core.main (07:10:55.497) - MainThread (5772):
Using Python version 3.11.6 (tags/v3.11.6:8b6ee5b, Oct  2 2023, 14:40:55) [MSC v.1935 32 bit (Intel)]
INFO - core.main (07:10:55.497) - MainThread (5772):
Using comtypes version 1.4.6
INFO - core.main (07:10:55.499) - MainThread (5772):
Using configobj version 5.1.0 with validate version 1.0.1
INFO - synthDriverHandler.setSynth (07:10:55.777) - MainThread (5772):
Loaded synthDriver aisound
WARNING - mathPres.initialize (07:10:55.783) - MainThread (5772):
MathPlayer 4 not available
INFO - core._setUpWxApp (07:10:55.783) - MainThread (5772):
Using wx version 4.2.2a1 msw (phoenix) wxWidgets 3.2.4 with six version 1.16.0
INFO - brailleInput.initialize (07:10:55.785) - MainThread (5772):
Braille input initialized
INFO - braille.initialize (07:10:55.785) - MainThread (5772):
Using liblouis version 3.30.0
INFO - braille.initialize (07:10:55.785) - MainThread (5772):
Using pySerial version 3.5
INFO - braille.BrailleHandler._setDisplay (07:10:55.788) - MainThread (5772):
Loaded braille display driver 'noBraille', current display has 0 cells.
INFO - core.main (07:10:55.902) - MainThread (5772):
Java Access Bridge support initialized
INFO - UIAHandler.UIAHandler.MTAThreadFunc (07:10:55.978) - UIAHandler.UIAHandler.MTAThread (7892):
UIAutomation: IUIAutomation6
INFO - external:globalPlugins.ndtt.logManagement.moduleInitialize (07:10:56.176) - MainThread (5772):
NDTT - Log management initialization: 2024-09-08_23-10-56
INFO - core.main (07:10:56.201) - MainThread (5772):
NVDA initialized
ERROR - eventHandler.executeEvent (07:10:56.471) - MainThread (5772):
error executing event: gainFocus on <NVDAObjects.Dynamic_EditableTextLogContainerEditorEditableTextWithAutoSelectDetectionEditorIa2WebIAccessible object at 0x0B379C10> with extra args of {}
Traceback (most recent call last):
  File "eventHandler.py", line 353, in executeEvent
    _EventExecuter(eventName, obj, kwargs)
  File "eventHandler.py", line 119, in __init__
    self.next()
  File "eventHandler.py", line 128, in next
    return func(*args, **self.kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "userConfig\addons\ime_expressive\globalPlugins\ime_expressive.py", line 336, in event_gainFocus
    nextHandler()
  File "eventHandler.py", line 128, in next
    return func(*args, **self.kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "NVDAObjects\behaviors.py", line 333, in event_gainFocus
    super().event_gainFocus()
  File "NVDAObjects\__init__.py", line 1364, in event_gainFocus
    self.reportFocus()
  File "NVDAObjects\__init__.py", line 1200, in reportFocus
    speech.speakObject(self, reason=controlTypes.OutputReason.FOCUS)
  File "userConfig\addons\nvdaDevTestToolbox\globalPlugins\ndtt\objPropExplorer.py", line 180, in new_speakObject
    return self.orig_speakObject(obj, reason, _prefixSpeechCommand, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "speech\speech.py", line 791, in speakObject
    sequence = getObjectSpeech(
               ^^^^^^^^^^^^^^^^
  File "speech\speech.py", line 849, in getObjectSpeech
    info = obj.makeTextInfo(textInfos.POSITION_FIRST)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "documentBase.py", line 76, in makeTextInfo
    return self.TextInfo(self, position)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "NVDAObjects\IAccessible\ia2TextMozilla.py", line 139, in __init__
    self._start, self._startObj = self._findContentDescendant(obj, position)
                                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "NVDAObjects\IAccessible\ia2TextMozilla.py", line 281, in _findContentDescendant
    raise LookupError("Object has no text descendants")
LookupError: Object has no text descendants
INFO - external:globalPlugins.electronMouse.RedirectDocument.objectFromPointRedirect (07:10:59.046) - MainThread (5772):
Developer info for the document object:
name: '欢迎 - Visual Studio Code - Insiders'
role: DOCUMENT
processID: 23264
roleText: None
states: READONLY, FOCUSABLE
isFocusable: True
hasFocus: False
Python object: <NVDAObjects.Dynamic_DocumentWithLogVSCodeDocumentDocumentIa2WebIAccessible object at 0x07C05A70>
Python class mro: (<class 'NVDAObjects.Dynamic_DocumentWithLogVSCodeDocumentDocumentIa2WebIAccessible'>, <class 'globalPlugins.ndtt.logReader.DocumentWithLog'>, <class 'appModules.code.VSCodeDocument'>, <class 'NVDAObjects.IAccessible.chromium.Document'>, <class 'NVDAObjects.IAccessible.ia2Web.Document'>, <class 'NVDAObjects.IAccessible.ia2Web.Ia2Web'>, <class 'NVDAObjects.IAccessible.IAccessible'>, <class 'NVDAObjects.window.Window'>, <class 'NVDAObjects.NVDAObject'>, <class 'documentBase.TextContainerObject'>, <class 'baseObject.ScriptableObject'>, <class 'baseObject.AutoPropertyObject'>, <class 'garbageHandler.TrackedObject'>, <class 'object'>)
description: None
location: RectLTWH(left=768, top=312, width=1024, height=768)
value: None
TextInfo: <class 'NVDAObjects.NVDAObjectTextInfo'>
appModule: AppModule(code, appName='code - insiders', processID=23264)
appModule.productName: 'Visual Studio Code - Insider'
appModule.productVersion: '1.93.0-insider'
appModule.helperLocalBindingHandle: c_long(121868352)
appModule.appArchitecture: 'AMD64'
windowHandle: 134552
windowClassName: 'Chrome_RenderWidgetHostHWND'
windowControlID: 542592
windowStyle: 1445986304
extendedWindowStyle: 32
windowThreadID: 4724
windowText: 'Chrome Legacy Window'
displayText: ''
IAccessibleObject: <POINTER(IAccessible2) ptr=0x52ef514 at e375620>
IAccessibleChildID: 0
IAccessible event parameters: windowHandle=134552, objectID=-4, childID=-26
IAccessible accName: '欢迎 - Visual Studio Code - Insiders'
IAccessible accRole: ROLE_SYSTEM_DOCUMENT
IAccessible accState: STATE_SYSTEM_READONLY, STATE_SYSTEM_FOCUSABLE, STATE_SYSTEM_VALID (1048640)
IAccessible accDescription: None
IAccessible accValue: 'vscode-file://vscode-app/c:/Users/hwf1324/AppData/Local/Programs/Microsoft%20VS%20Code%20Insiders/resources/app/out/vs/code/electron-sandbox/workbench/workbench.html'
IAccessible2 windowHandle: 134552
IAccessible2 uniqueID: -26
IAccessible2 role: ROLE_SYSTEM_DOCUMENT
IAccessible2 states: IA2_STATE_OPAQUE (1024)
IAccessible2 attributes: 'tag:#document;explicit-name:true;text-align:left;'
IAccessible2 relations: 
INFO - external:globalPlugins.electronMouse.RedirectDocument.objectFromPointRedirect (07:10:59.049) - MainThread (5772):
IAccessibleObject.accHitTest returned ((<POINTER(IAccessible2) ptr=0x53487b4 at e3757b0>, 0), 0)
ERROR - core.CorePump.Notify (07:10:59.049) - MainThread (5772):
errors in this core pump cycle
Traceback (most recent call last):
  File "core.py", line 965, in Notify
    mouseHandler.pumpAll()
  File "mouseHandler.py", line 287, in pumpAll
    executeMouseMoveEvent(x, y)
  File "mouseHandler.py", line 226, in executeMouseMoveEvent
    mouseObject = desktopObject.objectFromPoint(x, y)
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "NVDAObjects\__init__.py", line 338, in objectFromPoint
    redirect = obj.objectFromPointRedirect(x, y)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "userConfig\scratchpad\globalPlugins\electronMouse.py", line 45, in objectFromPointRedirect
    obj = IAccessible(IAccessibleObject=pacc, IAccessibleChildID=child)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "NVDAObjects\__init__.py", line 85, in __call__
    APIClass = self.findBestAPIClass(kwargs)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "NVDAObjects\__init__.py", line 261, in findBestAPIClass
    if possibleAPIClass.kwargsFromSuper(kwargs, relation=relation):
       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "NVDAObjects\IAccessible\MSHTML.py", line 496, in kwargsFromSuper
    HTMLNode = HTMLNodeFromIAccessible(IAccessibleObject)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "NVDAObjects\IAccessible\MSHTML.py", line 188, in HTMLNodeFromIAccessible
    s = IAccessibleObject.QueryInterface(IServiceProvider)
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'tuple' object has no attribute 'QueryInterface'
INFO - external:globalPlugins.electronMouse.RedirectDocument.objectFromPointRedirect (07:10:59.103) - MainThread (5772):
Developer info for the document object:
name: '欢迎 - Visual Studio Code - Insiders'
role: DOCUMENT
processID: 23264
roleText: None
states: READONLY, FOCUSABLE
isFocusable: True
hasFocus: False
Python object: <NVDAObjects.Dynamic_DocumentWithLogVSCodeDocumentDocumentIa2WebIAccessible object at 0x0E37ECF0>
Python class mro: (<class 'NVDAObjects.Dynamic_DocumentWithLogVSCodeDocumentDocumentIa2WebIAccessible'>, <class 'globalPlugins.ndtt.logReader.DocumentWithLog'>, <class 'appModules.code.VSCodeDocument'>, <class 'NVDAObjects.IAccessible.chromium.Document'>, <class 'NVDAObjects.IAccessible.ia2Web.Document'>, <class 'NVDAObjects.IAccessible.ia2Web.Ia2Web'>, <class 'NVDAObjects.IAccessible.IAccessible'>, <class 'NVDAObjects.window.Window'>, <class 'NVDAObjects.NVDAObject'>, <class 'documentBase.TextContainerObject'>, <class 'baseObject.ScriptableObject'>, <class 'baseObject.AutoPropertyObject'>, <class 'garbageHandler.TrackedObject'>, <class 'object'>)
description: None
location: RectLTWH(left=768, top=312, width=1024, height=768)
value: None
TextInfo: <class 'NVDAObjects.NVDAObjectTextInfo'>
appModule: AppModule(code, appName='code - insiders', processID=23264)
appModule.productName: 'Visual Studio Code - Insider'
appModule.productVersion: '1.93.0-insider'
appModule.helperLocalBindingHandle: c_long(121868352)
appModule.appArchitecture: 'AMD64'
windowHandle: 134552
windowClassName: 'Chrome_RenderWidgetHostHWND'
windowControlID: 542592
windowStyle: 1445986304
extendedWindowStyle: 32
windowThreadID: 4724
windowText: 'Chrome Legacy Window'
displayText: ''
IAccessibleObject: <POINTER(IAccessible2) ptr=0x52ef514 at 7c2ddf0>
IAccessibleChildID: 0
IAccessible event parameters: windowHandle=134552, objectID=-4, childID=-26
IAccessible accName: '欢迎 - Visual Studio Code - Insiders'
IAccessible accRole: ROLE_SYSTEM_DOCUMENT
IAccessible accState: STATE_SYSTEM_READONLY, STATE_SYSTEM_FOCUSABLE, STATE_SYSTEM_VALID (1048640)
IAccessible accDescription: None
IAccessible accValue: 'vscode-file://vscode-app/c:/Users/hwf1324/AppData/Local/Programs/Microsoft%20VS%20Code%20Insiders/resources/app/out/vs/code/electron-sandbox/workbench/workbench.html'
IAccessible2 windowHandle: 134552
IAccessible2 uniqueID: -26
IAccessible2 role: ROLE_SYSTEM_DOCUMENT
IAccessible2 states: IA2_STATE_OPAQUE (1024)
IAccessible2 attributes: 'tag:#document;explicit-name:true;text-align:left;'
IAccessible2 relations: 
INFO - external:globalPlugins.electronMouse.RedirectDocument.objectFromPointRedirect (07:10:59.108) - MainThread (5772):
IAccessibleObject.accHitTest returned (((<POINTER(IAccessible2) ptr=0x534849c at 7c12210>, 0), 0), 0)
ERROR - core.CorePump.Notify (07:10:59.108) - MainThread (5772):
errors in this core pump cycle
Traceback (most recent call last):
  File "core.py", line 965, in Notify
    mouseHandler.pumpAll()
  File "mouseHandler.py", line 287, in pumpAll
    executeMouseMoveEvent(x, y)
  File "mouseHandler.py", line 226, in executeMouseMoveEvent
    mouseObject = desktopObject.objectFromPoint(x, y)
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "NVDAObjects\__init__.py", line 338, in objectFromPoint
    redirect = obj.objectFromPointRedirect(x, y)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "userConfig\scratchpad\globalPlugins\electronMouse.py", line 45, in objectFromPointRedirect
    obj = IAccessible(IAccessibleObject=pacc, IAccessibleChildID=child)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "NVDAObjects\__init__.py", line 85, in __call__
    APIClass = self.findBestAPIClass(kwargs)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "NVDAObjects\__init__.py", line 261, in findBestAPIClass
    if possibleAPIClass.kwargsFromSuper(kwargs, relation=relation):
       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "NVDAObjects\IAccessible\MSHTML.py", line 496, in kwargsFromSuper
    HTMLNode = HTMLNodeFromIAccessible(IAccessibleObject)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "NVDAObjects\IAccessible\MSHTML.py", line 188, in HTMLNodeFromIAccessible
    s = IAccessibleObject.QueryInterface(IServiceProvider)
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'tuple' object has no attribute 'QueryInterface'
INFO - external:globalPlugins.electronMouse.RedirectDocument.objectFromPointRedirect (07:10:59.194) - MainThread (5772):
Developer info for the document object:
name: '欢迎 - Visual Studio Code - Insiders'
role: DOCUMENT
processID: 23264
roleText: None
states: READONLY, FOCUSABLE
isFocusable: True
hasFocus: False
Python object: <NVDAObjects.Dynamic_DocumentWithLogVSCodeDocumentDocumentIa2WebIAccessible object at 0x0E370790>
Python class mro: (<class 'NVDAObjects.Dynamic_DocumentWithLogVSCodeDocumentDocumentIa2WebIAccessible'>, <class 'globalPlugins.ndtt.logReader.DocumentWithLog'>, <class 'appModules.code.VSCodeDocument'>, <class 'NVDAObjects.IAccessible.chromium.Document'>, <class 'NVDAObjects.IAccessible.ia2Web.Document'>, <class 'NVDAObjects.IAccessible.ia2Web.Ia2Web'>, <class 'NVDAObjects.IAccessible.IAccessible'>, <class 'NVDAObjects.window.Window'>, <class 'NVDAObjects.NVDAObject'>, <class 'documentBase.TextContainerObject'>, <class 'baseObject.ScriptableObject'>, <class 'baseObject.AutoPropertyObject'>, <class 'garbageHandler.TrackedObject'>, <class 'object'>)
description: None
location: RectLTWH(left=768, top=312, width=1024, height=768)
value: None
TextInfo: <class 'NVDAObjects.NVDAObjectTextInfo'>
appModule: AppModule(code, appName='code - insiders', processID=23264)
appModule.productName: 'Visual Studio Code - Insider'
appModule.productVersion: '1.93.0-insider'
appModule.helperLocalBindingHandle: c_long(121868352)
appModule.appArchitecture: 'AMD64'
windowHandle: 134552
windowClassName: 'Chrome_RenderWidgetHostHWND'
windowControlID: 542592
windowStyle: 1445986304
extendedWindowStyle: 32
windowThreadID: 4724
windowText: 'Chrome Legacy Window'
displayText: ''
IAccessibleObject: <POINTER(IAccessible2) ptr=0x52ef514 at e375620>
IAccessibleChildID: 0
IAccessible event parameters: windowHandle=134552, objectID=-4, childID=-26
IAccessible accName: '欢迎 - Visual Studio Code - Insiders'
IAccessible accRole: ROLE_SYSTEM_DOCUMENT
IAccessible accState: STATE_SYSTEM_READONLY, STATE_SYSTEM_FOCUSABLE, STATE_SYSTEM_VALID (1048640)
IAccessible accDescription: None
IAccessible accValue: 'vscode-file://vscode-app/c:/Users/hwf1324/AppData/Local/Programs/Microsoft%20VS%20Code%20Insiders/resources/app/out/vs/code/electron-sandbox/workbench/workbench.html'
IAccessible2 windowHandle: 134552
IAccessible2 uniqueID: -26
IAccessible2 role: ROLE_SYSTEM_DOCUMENT
IAccessible2 states: IA2_STATE_OPAQUE (1024)
IAccessible2 attributes: 'tag:#document;explicit-name:true;text-align:left;'
IAccessible2 relations: 
INFO - external:globalPlugins.electronMouse.RedirectDocument.objectFromPointRedirect (07:10:59.196) - MainThread (5772):
IAccessibleObject.accHitTest returned ((<POINTER(IAccessible2) ptr=0x5347f44 at 7c12260>, 0), 0)
ERROR - core.CorePump.Notify (07:10:59.196) - MainThread (5772):
errors in this core pump cycle
Traceback (most recent call last):
  File "core.py", line 965, in Notify
    mouseHandler.pumpAll()
  File "mouseHandler.py", line 287, in pumpAll
    executeMouseMoveEvent(x, y)
  File "mouseHandler.py", line 226, in executeMouseMoveEvent
    mouseObject = desktopObject.objectFromPoint(x, y)
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "NVDAObjects\__init__.py", line 338, in objectFromPoint
    redirect = obj.objectFromPointRedirect(x, y)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "userConfig\scratchpad\globalPlugins\electronMouse.py", line 45, in objectFromPointRedirect
    obj = IAccessible(IAccessibleObject=pacc, IAccessibleChildID=child)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "NVDAObjects\__init__.py", line 85, in __call__
    APIClass = self.findBestAPIClass(kwargs)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "NVDAObjects\__init__.py", line 261, in findBestAPIClass
    if possibleAPIClass.kwargsFromSuper(kwargs, relation=relation):
       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "NVDAObjects\IAccessible\MSHTML.py", line 496, in kwargsFromSuper
    HTMLNode = HTMLNodeFromIAccessible(IAccessibleObject)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "NVDAObjects\IAccessible\MSHTML.py", line 188, in HTMLNodeFromIAccessible
    s = IAccessibleObject.QueryInterface(IServiceProvider)
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'tuple' object has no attribute 'QueryInterface'
INFO - external:globalPlugins.electronMouse.RedirectDocument.objectFromPointRedirect (07:10:59.277) - MainThread (5772):
Developer info for the document object:
name: '欢迎 - Visual Studio Code - Insiders'
role: DOCUMENT
processID: 23264
roleText: None
states: READONLY, FOCUSABLE
isFocusable: True
hasFocus: False
Python object: <NVDAObjects.Dynamic_DocumentWithLogVSCodeDocumentDocumentIa2WebIAccessible object at 0x0B615D70>
Python class mro: (<class 'NVDAObjects.Dynamic_DocumentWithLogVSCodeDocumentDocumentIa2WebIAccessible'>, <class 'globalPlugins.ndtt.logReader.DocumentWithLog'>, <class 'appModules.code.VSCodeDocument'>, <class 'NVDAObjects.IAccessible.chromium.Document'>, <class 'NVDAObjects.IAccessible.ia2Web.Document'>, <class 'NVDAObjects.IAccessible.ia2Web.Ia2Web'>, <class 'NVDAObjects.IAccessible.IAccessible'>, <class 'NVDAObjects.window.Window'>, <class 'NVDAObjects.NVDAObject'>, <class 'documentBase.TextContainerObject'>, <class 'baseObject.ScriptableObject'>, <class 'baseObject.AutoPropertyObject'>, <class 'garbageHandler.TrackedObject'>, <class 'object'>)
description: None
location: RectLTWH(left=768, top=312, width=1024, height=768)
value: None
TextInfo: <class 'NVDAObjects.NVDAObjectTextInfo'>
appModule: AppModule(code, appName='code - insiders', processID=23264)
appModule.productName: 'Visual Studio Code - Insider'
appModule.productVersion: '1.93.0-insider'
appModule.helperLocalBindingHandle: c_long(121868352)
appModule.appArchitecture: 'AMD64'
windowHandle: 134552
windowClassName: 'Chrome_RenderWidgetHostHWND'
windowControlID: 542592
windowStyle: 1445986304
extendedWindowStyle: 32
windowThreadID: 4724
windowText: 'Chrome Legacy Window'
displayText: ''
IAccessibleObject: <POINTER(IAccessible2) ptr=0x52ef514 at 7c12120>
IAccessibleChildID: 0
IAccessible event parameters: windowHandle=134552, objectID=-4, childID=-26
IAccessible accName: '欢迎 - Visual Studio Code - Insiders'
IAccessible accRole: ROLE_SYSTEM_DOCUMENT
IAccessible accState: STATE_SYSTEM_READONLY, STATE_SYSTEM_FOCUSABLE, STATE_SYSTEM_VALID (1048640)
IAccessible accDescription: None
IAccessible accValue: 'vscode-file://vscode-app/c:/Users/hwf1324/AppData/Local/Programs/Microsoft%20VS%20Code%20Insiders/resources/app/out/vs/code/electron-sandbox/workbench/workbench.html'
IAccessible2 windowHandle: 134552
IAccessible2 uniqueID: -26
IAccessible2 role: ROLE_SYSTEM_DOCUMENT
IAccessible2 states: IA2_STATE_OPAQUE (1024)
IAccessible2 attributes: 'tag:#document;explicit-name:true;text-align:left;'
IAccessible2 relations: 
INFO - external:globalPlugins.electronMouse.RedirectDocument.objectFromPointRedirect (07:10:59.279) - MainThread (5772):
IAccessibleObject.accHitTest returned ((<POINTER(IAccessible2) ptr=0x5348454 at 7c12350>, 0), 0)
ERROR - core.CorePump.Notify (07:10:59.279) - MainThread (5772):
errors in this core pump cycle
Traceback (most recent call last):
  File "core.py", line 965, in Notify
    mouseHandler.pumpAll()
  File "mouseHandler.py", line 287, in pumpAll
    executeMouseMoveEvent(x, y)
  File "mouseHandler.py", line 226, in executeMouseMoveEvent
    mouseObject = desktopObject.objectFromPoint(x, y)
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "NVDAObjects\__init__.py", line 338, in objectFromPoint
    redirect = obj.objectFromPointRedirect(x, y)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "userConfig\scratchpad\globalPlugins\electronMouse.py", line 45, in objectFromPointRedirect
    obj = IAccessible(IAccessibleObject=pacc, IAccessibleChildID=child)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "NVDAObjects\__init__.py", line 85, in __call__
    APIClass = self.findBestAPIClass(kwargs)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "NVDAObjects\__init__.py", line 261, in findBestAPIClass
    if possibleAPIClass.kwargsFromSuper(kwargs, relation=relation):
       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "NVDAObjects\IAccessible\MSHTML.py", line 496, in kwargsFromSuper
    HTMLNode = HTMLNodeFromIAccessible(IAccessibleObject)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "NVDAObjects\IAccessible\MSHTML.py", line 188, in HTMLNodeFromIAccessible
    s = IAccessibleObject.QueryInterface(IServiceProvider)
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'tuple' object has no attribute 'QueryInterface'
INFO - external:globalPlugins.electronMouse.RedirectDocument.objectFromPointRedirect (07:10:59.356) - MainThread (5772):
Developer info for the document object:
name: '欢迎 - Visual Studio Code - Insiders'
role: DOCUMENT
processID: 23264
roleText: None
states: READONLY, FOCUSABLE
isFocusable: True
hasFocus: False
Python object: <NVDAObjects.Dynamic_DocumentWithLogVSCodeDocumentDocumentIa2WebIAccessible object at 0x07C05EF0>
Python class mro: (<class 'NVDAObjects.Dynamic_DocumentWithLogVSCodeDocumentDocumentIa2WebIAccessible'>, <class 'globalPlugins.ndtt.logReader.DocumentWithLog'>, <class 'appModules.code.VSCodeDocument'>, <class 'NVDAObjects.IAccessible.chromium.Document'>, <class 'NVDAObjects.IAccessible.ia2Web.Document'>, <class 'NVDAObjects.IAccessible.ia2Web.Ia2Web'>, <class 'NVDAObjects.IAccessible.IAccessible'>, <class 'NVDAObjects.window.Window'>, <class 'NVDAObjects.NVDAObject'>, <class 'documentBase.TextContainerObject'>, <class 'baseObject.ScriptableObject'>, <class 'baseObject.AutoPropertyObject'>, <class 'garbageHandler.TrackedObject'>, <class 'object'>)
description: None
location: RectLTWH(left=768, top=312, width=1024, height=768)
value: None
TextInfo: <class 'NVDAObjects.NVDAObjectTextInfo'>
appModule: AppModule(code, appName='code - insiders', processID=23264)
appModule.productName: 'Visual Studio Code - Insider'
appModule.productVersion: '1.93.0-insider'
appModule.helperLocalBindingHandle: c_long(121868352)
appModule.appArchitecture: 'AMD64'
windowHandle: 134552
windowClassName: 'Chrome_RenderWidgetHostHWND'
windowControlID: 542592
windowStyle: 1445986304
extendedWindowStyle: 32
windowThreadID: 4724
windowText: 'Chrome Legacy Window'
displayText: ''
IAccessibleObject: <POINTER(IAccessible2) ptr=0x52ef514 at 7c12300>
IAccessibleChildID: 0
IAccessible event parameters: windowHandle=134552, objectID=-4, childID=-26
IAccessible accName: '欢迎 - Visual Studio Code - Insiders'
IAccessible accRole: ROLE_SYSTEM_DOCUMENT
IAccessible accState: STATE_SYSTEM_READONLY, STATE_SYSTEM_FOCUSABLE, STATE_SYSTEM_VALID (1048640)
IAccessible accDescription: None
IAccessible accValue: 'vscode-file://vscode-app/c:/Users/hwf1324/AppData/Local/Programs/Microsoft%20VS%20Code%20Insiders/resources/app/out/vs/code/electron-sandbox/workbench/workbench.html'
IAccessible2 windowHandle: 134552
IAccessible2 uniqueID: -26
IAccessible2 role: ROLE_SYSTEM_DOCUMENT
IAccessible2 states: IA2_STATE_OPAQUE (1024)
IAccessible2 attributes: 'tag:#document;explicit-name:true;text-align:left;'
IAccessible2 relations: 
INFO - external:globalPlugins.electronMouse.RedirectDocument.objectFromPointRedirect (07:10:59.360) - MainThread (5772):
IAccessibleObject.accHitTest returned (((<POINTER(IAccessible2) ptr=0x53484e4 at 7c12440>, 0), 0), 0)
ERROR - core.CorePump.Notify (07:10:59.360) - MainThread (5772):
errors in this core pump cycle
Traceback (most recent call last):
  File "core.py", line 965, in Notify
    mouseHandler.pumpAll()
  File "mouseHandler.py", line 287, in pumpAll
    executeMouseMoveEvent(x, y)
  File "mouseHandler.py", line 226, in executeMouseMoveEvent
    mouseObject = desktopObject.objectFromPoint(x, y)
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "NVDAObjects\__init__.py", line 338, in objectFromPoint
    redirect = obj.objectFromPointRedirect(x, y)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "userConfig\scratchpad\globalPlugins\electronMouse.py", line 45, in objectFromPointRedirect
    obj = IAccessible(IAccessibleObject=pacc, IAccessibleChildID=child)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "NVDAObjects\__init__.py", line 85, in __call__
    APIClass = self.findBestAPIClass(kwargs)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "NVDAObjects\__init__.py", line 261, in findBestAPIClass
    if possibleAPIClass.kwargsFromSuper(kwargs, relation=relation):
       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "NVDAObjects\IAccessible\MSHTML.py", line 496, in kwargsFromSuper
    HTMLNode = HTMLNodeFromIAccessible(IAccessibleObject)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "NVDAObjects\IAccessible\MSHTML.py", line 188, in HTMLNodeFromIAccessible
    s = IAccessibleObject.QueryInterface(IServiceProvider)
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'tuple' object has no attribute 'QueryInterface'

@hwf1324
Copy link
Contributor Author

hwf1324 commented Sep 8, 2024

That's great! Thank you so much! It worked!

from contextlib import contextmanager

import controlTypes
import globalPluginHandler
import IAccessibleHandler
import winUser
from logHandler import log
from NVDAObjects import NVDAObject
from NVDAObjects.IAccessible import IAccessible
from NVDAObjects.IAccessible.chromium import Document
from NVDAObjects.IAccessible.ia2Web import Ia2Web


@contextmanager
def debugLog():
	import config
	import logHandler
	import logging

	curLevel = log.getEffectiveLevel()
	config.conf["general"]["loggingLevel"] = "DEBUG"
	logHandler.setLogLevelFromConfig()
	try:
		yield
	finally:
		config.conf["general"]["loggingLevel"] = logging.getLevelName(curLevel)
		logHandler.setLogLevelFromConfig()


class RedirectDocument(Ia2Web):

	def objectFromPointRedirect(self, x: int, y: int):
		with debugLog():
			docObj: Document = self.previous.lastChild
			log.info(
				"Developer info for the document object:\n%s" % "\n".join(docObj.devInfo),
			)
			redirect = docObj.IAccessibleObject.accHitTest(x, y)
			# redirect = IAccessibleHandler.accHitTest(docObj.IAccessibleObject, x, y)
			log.info(f"IAccessibleObject.accHitTest returned {redirect}")
			if not redirect:
				return None
			redirect = IAccessibleHandler.normalizeIAccessible(redirect)
			# (pacc, child) = redirect
			obj = IAccessible(IAccessibleObject=redirect, IAccessibleChildID=winUser.CHILDID_SELF)
			# obj = IAccessible(IAccessibleObject=pacc, IAccessibleChildID=child)
			# log.info(
			# 	"Developer info for the redirected object:\n%s" % "\n".join(obj.devInfo),
			# )
			log.info(f"Redirected object: {obj}")
			return obj


class GlobalPlugin(globalPluginHandler.GlobalPlugin):

	def chooseNVDAObjectOverlayClasses(self, obj: Ia2Web, clsList: list[NVDAObject]):
		if (
			obj.windowClassName.startswith("Chrome_")
			and obj.role == controlTypes.Role.PANE
			and obj.childCount == 0
			and obj.previous
			and obj.previous.childCount != 0
			and obj.previous.lastChild.windowClassName == "Chrome_RenderWidgetHostHWND"
		):
			clsList.insert(0, RedirectDocument)

@jcsteh
Copy link
Contributor

jcsteh commented Sep 8, 2024

Yeah, looking at the code, it looks to me like IAccessibleHandler.accHitTest might be broken in this situation. I'm not certain, but it's very, very old code, so it wouldn't surprise me. It's probably just easier to use IAccessible.accHitTest directly for now.

@hwf1324
Copy link
Contributor Author

hwf1324 commented Sep 9, 2024

@seanbudd

This issue can be fixed in NVDA and I intend to release the above code as an add-on. However, this add-on uses an API that was introduced in 2024.4.

Is it necessary to add this fix to the NVDA core?

@seanbudd
Copy link
Member

seanbudd commented Sep 9, 2024

If this issue gets triaged I would encourage fixing it within NVDA rather than an add-on, depending on the approach.
The API issue shouldn't be relevant, you can make add-ons require any version of NVDA, just set minimumNVDAVersion to 2024.4

@hwf1324
Copy link
Contributor Author

hwf1324 commented Sep 9, 2024

The API issue shouldn't be relevant, you can make add-ons require any version of NVDA, just set minimumNVDAVersion to 2024.4

That I understand.
It's just that 2024.4 hasn't been released yet.

Then I will release it today.

Doubtful though considering the issue is very widespread and it's not clear when Electron will fix it.

@seanbudd seanbudd added p2 https://github.com/nvaccess/nvda/blob/master/projectDocs/issues/triage.md#priority triaged Has been triaged, issue is waiting for implementation. app/chrome blocked/needs-external-fix labels Sep 10, 2024
@cary-rowen
Copy link
Contributor

#17190 has been triaged, and based on @seanbudd's comment you might consider implementing this fix.

@seanbudd
Copy link
Member

Closing - we don't think its possible to consistently handle these cases.
Closing in favour of #17190

@seanbudd seanbudd closed this as not planned Won't fix, can't repro, duplicate, stale Feb 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
app/chrome blocked/needs-external-fix p2 https://github.com/nvaccess/nvda/blob/master/projectDocs/issues/triage.md#priority triaged Has been triaged, issue is waiting for implementation.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants