[orca] More aggressively filter out object:state-changed:showing events



commit 7fee0086a1d620b9f1df6a331595ab078715d23b
Author: Joanmarie Diggs <jdiggs igalia com>
Date:   Wed Nov 18 17:16:51 2015 -0500

    More aggressively filter out object:state-changed:showing events
    
    We get completely spammed by this event. And for most roles, we don't
    even care. So only queue and process events from the roles we do care
    about.

 src/orca/event_manager.py |    8 +++++++-
 1 files changed, 7 insertions(+), 1 deletions(-)
---
diff --git a/src/orca/event_manager.py b/src/orca/event_manager.py
index 831083b..69a248a 100644
--- a/src/orca/event_manager.py
+++ b/src/orca/event_manager.py
@@ -158,7 +158,13 @@ class EventManager:
             return True
 
         if event.type.startswith('object:state-changed:showing'):
-            if role in [pyatspi.ROLE_IMAGE, pyatspi.ROLE_MENU_ITEM, pyatspi.ROLE_PARAGRAPH]:
+            if role not in [pyatspi.ROLE_ALERT,
+                            pyatspi.ROLE_ANIMATION,
+                            pyatspi.ROLE_INFO_BAR,
+                            pyatspi.ROLE_NOTIFICATION,
+                            pyatspi.ROLE_PANEL,
+                            pyatspi.ROLE_STATUS_BAR,
+                            pyatspi.ROLE_TOOL_TIP]:
                 msg = 'INFO: %s for %s in app %s. Who cares?' % \
                       (event.type, event.source, event.host_application)
                 debug.println(debug.LEVEL_INFO, msg)


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