[orca] Eliminate some chattiness from text insertions



commit 85c1ef5e0bdad8d3afb6aa2694761ac96c32153c
Author: Joanmarie Diggs <jdiggs igalia com>
Date:   Wed Mar 23 17:12:06 2022 +0100

    Eliminate some chattiness from text insertions
    
    We were treating text insertions which met a number of requirements
    as possibly presentable if the locusOfFocus was dead. But this can
    result in our presenting text we shouldn't, for instance when VSCode's
    editor gets destroyed and recreated when the user shows the Problems
    view.
    
    We can eliminate some of this chattiness by checking for the focused
    state: If we're not in it, and we don't (yet) know where we are, and
    the object in which the text was inserted isn't focused, ignore it.

 src/orca/script_utilities.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/src/orca/script_utilities.py b/src/orca/script_utilities.py
index 1c72eb1e9..bf0540d16 100644
--- a/src/orca/script_utilities.py
+++ b/src/orca/script_utilities.py
@@ -5610,7 +5610,7 @@ class Utilities:
             return True
 
         if self.isDead(orca_state.locusOfFocus):
-            return True
+            return state.contains(pyatspi.STATE_FOCUSED)
 
         msg = "INFO: Event is not being presented due to lack of cause"
         debug.println(debug.LEVEL_INFO, msg, True)


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]