[orca] Do not process object events from 'dead' apps.
- From: Joanmarie Diggs <joanied src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [orca] Do not process object events from 'dead' apps.
- Date: Wed, 4 Apr 2012 19:19:01 +0000 (UTC)
commit ab8023fc851aaf5cec905cd327c4b3123e808235
Author: Joanmarie Diggs <jdiggs igalia com>
Date: Wed Apr 4 15:17:13 2012 -0400
Do not process object events from 'dead' apps.
src/orca/event_manager.py | 7 +++++++
1 files changed, 7 insertions(+), 0 deletions(-)
---
diff --git a/src/orca/event_manager.py b/src/orca/event_manager.py
index 4263bc4..be8e675 100644
--- a/src/orca/event_manager.py
+++ b/src/orca/event_manager.py
@@ -393,6 +393,10 @@ class EventManager:
script = None
try:
app = event.host_application or event.source.getApplication()
+ if app.getState().contains(pyatspi.STATE_DEFUNCT):
+ msg = 'WARNING: App is defunct. Cannot get script for event.'
+ debug.println(debug.LEVEL_WARNING, msg)
+ return None
except:
debug.printException(debug.LEVEL_WARNING)
else:
@@ -518,6 +522,9 @@ class EventManager:
debug.printDetails(debug.LEVEL_FINEST, " ", event.source)
script = self._getScriptForEvent(event)
+ if not script:
+ return
+
debug.println(debug.LEVEL_FINEST, "Script for event: %s" % script.name)
setNewActiveScript, reason = self._isActivatableEvent(event, script)
if setNewActiveScript:
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]