Commit 60e498ce authored by Joanmarie Diggs's avatar Joanmarie Diggs

Add more debugging

parent 87a12c0d
...@@ -4634,22 +4634,36 @@ class Utilities(script_utilities.Utilities): ...@@ -4634,22 +4634,36 @@ class Utilities(script_utilities.Utilities):
def handleEventFromContextReplicant(self, event, replicant): def handleEventFromContextReplicant(self, event, replicant):
if self.isDead(replicant): if self.isDead(replicant):
msg = "WEB: Context replicant is dead."
debug.println(debug.LEVEL_INFO, msg, True)
return False return False
if not self.isDead(orca_state.locusOfFocus): if not self.isDead(orca_state.locusOfFocus):
msg = "WEB: Not event from context replicant. locusOfFocus %s is not dead." \
% orca_state.locusOfFocus
debug.println(debug.LEVEL_INFO, msg, True)
return False return False
path, role, name = self.getCaretContextPathRoleAndName() path, role, name = self.getCaretContextPathRoleAndName()
if path != pyatspi.getPath(replicant): replicantPath = pyatspi.getPath(replicant)
if path != replicantPath:
msg = "WEB: Not event from context replicant. Path %s != replicant path %s." \
% (path, replicantPath)
return False return False
if role != replicant.getRole(): replicantRole = replicant.getRole()
if role != replicantRole:
msg = "WEB: Not event from context replicant. Role %s != replicant role %s." \
% (role, replicantRole)
return False return False
notify = != name notify = != name
documentFrame = self.documentFrame() documentFrame = self.documentFrame()
obj, offset = self._caretContexts.get(hash(documentFrame.parent)) obj, offset = self._caretContexts.get(hash(documentFrame.parent))
msg = "WEB: Is event from context replicant. Notify: %s" % notify
debug.println(debug.LEVEL_INFO, msg, True)
orca.setLocusOfFocus(event, replicant, notify) orca.setLocusOfFocus(event, replicant, notify)
self.setCaretContext(replicant, offset, documentFrame) self.setCaretContext(replicant, offset, documentFrame)
return True return True
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment