fix: tighten relevance gate focus handling
This commit is contained in:
@@ -251,7 +251,7 @@ class EventManager:
|
||||
liveAttr = AXObject.get_attribute(obj, 'live')
|
||||
containerLive = AXObject.get_attribute(obj, 'container-live')
|
||||
except Exception:
|
||||
return False
|
||||
return isinstance(obj, Atspi.Accessible)
|
||||
|
||||
if liveAttr in ('assertive', 'polite') or containerLive in ('assertive', 'polite'):
|
||||
return True
|
||||
@@ -333,7 +333,11 @@ class EventManager:
|
||||
return self.RELEVANCE_KEEP
|
||||
|
||||
if event.type.startswith("object:state-changed:focused"):
|
||||
return self.RELEVANCE_KEEP
|
||||
if event.detail1 or cthulhu_state.locusOfFocus is None:
|
||||
return self.RELEVANCE_KEEP
|
||||
if self._eventTouchesCurrentFocusContext(event):
|
||||
return self.RELEVANCE_KEEP
|
||||
return self.RELEVANCE_DROP
|
||||
|
||||
role = self._eventRoleForRelevance(event)
|
||||
eventGroup = self._relevanceEventGroup(event, role)
|
||||
|
||||
Reference in New Issue
Block a user