[orca] Clear the AT-SPI2 cache for selected panels in gnome-shell



commit cc0a53a25159abcc4206b4f49f7956e44ecd4fa6
Author: Joanmarie Diggs <jdiggs igalia com>
Date:   Tue Mar 27 08:34:04 2018 -0400

    Clear the AT-SPI2 cache for selected panels in gnome-shell
    
    When panels are re-used, AT-SPI2's cache has stale information causing
    us to present things which are not actually on the screen.

 src/orca/scripts/apps/gnome-shell/script.py |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)
---
diff --git a/src/orca/scripts/apps/gnome-shell/script.py b/src/orca/scripts/apps/gnome-shell/script.py
index eadfb1f..862cc82 100644
--- a/src/orca/scripts/apps/gnome-shell/script.py
+++ b/src/orca/scripts/apps/gnome-shell/script.py
@@ -136,6 +136,7 @@ class Script(clutter.Script):
         """Callback for object:state-changed:selected accessibility events."""
         try:
             state = event.source.getState()
+            role = event.source.getRole()
         except:
             return
 
@@ -146,6 +147,12 @@ class Script(clutter.Script):
         # we'll stop doing so and hope we are right.
 
         if event.detail1:
+            if role == pyatspi.ROLE_PANEL:
+                try:
+                    event.source.clearCache()
+                except:
+                    pass
+
             if state.contains(pyatspi.STATE_SELECTED):
                 orca.setLocusOfFocus(event, event.source)
             return


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