[orca] Ignore object:state-changed:sensitive events for menu items



commit 19e85dd3223bb3e4e73a0dbbc5dec90eb6134eb5
Author: Joanmarie Diggs <jdiggs igalia com>
Date:   Thu Jun 9 08:15:06 2016 -0400

    Ignore object:state-changed:sensitive events for menu items
    
    LibreOffice is completely flooding us, and we don't do anything with
    this event type for menu items anyway, so there's no point in queueing
    them for processing.

 src/orca/event_manager.py |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)
---
diff --git a/src/orca/event_manager.py b/src/orca/event_manager.py
index 776768e..57a451a 100644
--- a/src/orca/event_manager.py
+++ b/src/orca/event_manager.py
@@ -165,6 +165,14 @@ class EventManager:
             debug.println(debug.LEVEL_INFO, msg, True)
             return True
 
+        if event.type.startswith('object:state-changed:sensitive'):
+            if role in [pyatspi.ROLE_MENU_ITEM,
+                        pyatspi.ROLE_CHECK_MENU_ITEM,
+                        pyatspi.ROLE_RADIO_MENU_ITEM]:
+                msg = 'EVENT MANAGER: Ignoring event type due to role'
+                debug.println(debug.LEVEL_INFO, msg, True)
+                return True
+
         if event.type.startswith('object:state-changed:showing'):
             if role not in [pyatspi.ROLE_ALERT,
                             pyatspi.ROLE_ANIMATION,


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