[orca] Fix for bug #627052 - Orca shouldn't ignore of object:text-caret-moved events which immediately foll
- From: Alejandro Leiva <aleiva src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [orca] Fix for bug #627052 - Orca shouldn't ignore of object:text-caret-moved events which immediately foll
- Date: Fri, 20 Aug 2010 18:45:04 +0000 (UTC)
commit 76ac3faf36c40e9acb5c7bc4e5139e33f22d89d2
Author: Alejandro Leiva <aleiva emergya es>
Date: Fri Aug 20 20:43:23 2010 +0200
Fix for bug #627052 - Orca shouldn't ignore of object:text-caret-moved events which immediately follow a window:activate event
src/orca/default.py | 13 +++++++++++++
1 files changed, 13 insertions(+), 0 deletions(-)
---
diff --git a/src/orca/default.py b/src/orca/default.py
index bf369f6..d298e47 100644
--- a/src/orca/default.py
+++ b/src/orca/default.py
@@ -3042,6 +3042,19 @@ class Script(script.Script):
- event: the Event
"""
+ if not orca_state.locusOfFocus:
+ return
+
+ # Should the event source be the locusOfFocus?
+ #
+ role = orca_state.locusOfFocus.getRole()
+ if role in [pyatspi.ROLE_FRAME, pyatspi.ROLE_DIALOG]:
+ frameApp = orca_state.locusOfFocus.getApplication()
+ eventApp = event.source.getApplication()
+ if frameApp == eventApp \
+ and event.source.getState().contains(pyatspi.STATE_FOCUSED):
+ orca.setLocusOfFocus(event, event.source, False)
+
# Ignore caret movements from non-focused objects, unless the
# currently focused object is the parent of the object which
# has the caret.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]