[orca: 1/2] Do not announce redundant information when enabling mouse review



commit 271b269c8195c04aec0b786c2c72fb1f823e4ac6
Author: Colomban Wendling <cwendling hypra fr>
Date:   Wed Mar 25 19:15:31 2020 +0100

    Do not announce redundant information when enabling mouse review
    
    When enabling mouse review don't present information that would be
    redundant with the currently focused element.
    
    https://gitlab.gnome.org/GNOME/orca/issues/82

 src/orca/mouse_review.py | 11 +++++++++++
 1 file changed, 11 insertions(+)
---
diff --git a/src/orca/mouse_review.py b/src/orca/mouse_review.py
index c9f6c40ba..4d1856633 100644
--- a/src/orca/mouse_review.py
+++ b/src/orca/mouse_review.py
@@ -342,6 +342,17 @@ class MouseReviewer:
     def activate(self):
         """Activates mouse review."""
 
+        # Set up the initial object as the one with the focus to avoid
+        # presenting irrelevant info the first time.
+        obj = orca_state.locusOfFocus
+        script = None
+        frame = None
+        if obj:
+            script = _scriptManager.getScript(obj.getApplication(), obj)
+        if script:
+            frame = script.utilities.topLevelObject(obj)
+        self._currentMouseOver = _ItemContext(obj=obj, frame=frame, script=script)
+
         _eventManager.registerModuleListeners(self._get_listeners())
         screen = Wnck.Screen.get_default()
         if screen:


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