[orca] Don't queue events from defunct or dead objects
- From: Joanmarie Diggs <joanied src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [orca] Don't queue events from defunct or dead objects
- Date: Thu, 4 Jun 2015 00:31:09 +0000 (UTC)
commit 6adcbd70fed3f3a5a4ad13e97457de10f5931c6e
Author: Joanmarie Diggs <jdiggs igalia com>
Date: Wed Jun 3 20:30:25 2015 -0400
Don't queue events from defunct or dead objects
src/orca/event_manager.py | 12 ++++++++++++
1 files changed, 12 insertions(+), 0 deletions(-)
---
diff --git a/src/orca/event_manager.py b/src/orca/event_manager.py
index 4bff6ef..eb31346 100644
--- a/src/orca/event_manager.py
+++ b/src/orca/event_manager.py
@@ -107,6 +107,18 @@ class EventManager:
and event.source != self.registry.getDesktop(0):
return True
+ try:
+ name = event.source.name
+ state = event.source.getState()
+ except:
+ msg = 'ERROR: %s from potentially-defunct obj' % event.type
+ debug.println(debug.LEVEL_INFO, msg)
+ return True
+ if state.contains(pyatspi.STATE_DEFUNCT):
+ msg = 'ERROR: %s from defunct obj' % event.type
+ debug.println(debug.LEVEL_INFO, msg)
+ return True
+
if event.type.startswith('object:children-changed:add'):
if not event.any_data:
msg = 'ERROR: Children changed add event without child'
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]