Commit 09b8ad20 authored by Joanmarie Diggs's avatar Joanmarie Diggs

Don't present GtkComboBox selection changes if we're not on/in that widget

parent 1b29bbfe
......@@ -759,6 +759,12 @@ class Utilities:
def isTypeahead(self, obj):
return False
def isOrDescendsFrom(self, obj, ancestor):
if obj == ancestor:
return True
return pyatspi.findAncestor(obj, lambda x: x and x == ancestor)
def isFunctionalDialog(self, obj):
"""Returns True if the window is a functioning as a dialog.
This method should be subclassed by application scripts as
......@@ -176,7 +176,8 @@ class Script(default.Script):
def onSelectionChanged(self, event):
"""Callback for object:selection-changed accessibility events."""
if self.utilities.isComboBoxWithToggleDescendant(event.source):
if self.utilities.isComboBoxWithToggleDescendant(event.source) \
and self.utilities.isOrDescendsFrom(orca_state.locusOfFocus, event.source):
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment