[orca/gnome-41] Event Manager: Ignore all text changed events for embedded objects
- From: Joanmarie Diggs <joanied src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [orca/gnome-41] Event Manager: Ignore all text changed events for embedded objects
- Date: Thu, 13 Jan 2022 11:04:46 +0000 (UTC)
commit b8564cc6413b3545c8ac8533f4fc86fc52929ea2
Author: Joanmarie Diggs <jdiggs igalia com>
Date: Thu Jan 13 12:01:23 2022 +0100
Event Manager: Ignore all text changed events for embedded objects
Chromium is flooding us and we should also get children-changed events.
src/orca/event_manager.py | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
---
diff --git a/src/orca/event_manager.py b/src/orca/event_manager.py
index 5fc84d878..ce5e3dced 100644
--- a/src/orca/event_manager.py
+++ b/src/orca/event_manager.py
@@ -191,13 +191,14 @@ class EventManager:
debug.println(debug.LEVEL_INFO, msg, True)
return True
- if event.type.startswith('object:text-changed') and event.type.endswith('system'):
+ if event.type.startswith('object:text-changed') \
+ and self.EMBEDDED_OBJECT_CHARACTER in event.any_data \
+ and not event.any_data.replace(self.EMBEDDED_OBJECT_CHARACTER, ""):
# We should also get children-changed events telling us the same thing.
# Getting a bunch of both can result in a flood that grinds us to a halt.
- if event.any_data == self.EMBEDDED_OBJECT_CHARACTER:
- msg = 'EVENT MANAGER: Ignoring because changed text is embedded object'
- debug.println(debug.LEVEL_INFO, msg, True)
- return True
+ msg = 'EVENT MANAGER: Ignoring because changed text is only embedded objects'
+ debug.println(debug.LEVEL_INFO, msg, True)
+ return True
try:
# TODO - JD: For now we won't ask for the name. Simply asking for the name should
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]