Skip to content

Commit

Permalink
Block console UIA notifications for SV2M2
Browse files Browse the repository at this point in the history
  • Loading branch information
codeofdusk committed Jan 20, 2022
1 parent b45926c commit 5aa6dbf
Showing 1 changed file with 21 additions and 1 deletion.
22 changes: 21 additions & 1 deletion source/NVDAObjects/UIA/winConsoleUIA.py
Original file line number Diff line number Diff line change
Expand Up @@ -400,6 +400,17 @@ def detectPossibleSelectionChange(self):
"probably due to a switch to/from the alt buffer."
), exc_info=True)

def event_UIA_notification(self, **kwargs):
"""
In Windows Sun Valley 2 (SV2 M2), UIA notification events will be sent
to announce new text. Block these for now to avoid double-reporting of
text changes.
@note: In the longer term, NVDA should leverage these events in place
of the current LiveText strategy, as performance will likely be
significantly improved and #11002 can be completely mitigated.
"""
log.debugWarning(f"Notification event blocked to avoid double-report: {kwargs}")


def findExtraOverlayClasses(obj, clsList):
if obj.UIAElement.cachedAutomationId == "Text Area":
Expand All @@ -409,4 +420,13 @@ def findExtraOverlayClasses(obj, clsList):


class WinTerminalUIA(EnhancedTermTypedCharSupport):
pass
def event_UIA_notification(self, **kwargs):
"""
In an upcoming terminal release, UIA notification events will be sent
to announce new text. Block these for now to avoid double-reporting of
text changes.
@note: In the longer term, NVDA should leverage these events in place
of the current LiveText strategy, as performance will likely be
significantly improved and #11002 can be completely mitigated.
"""
log.debugWarning(f"Notification event blocked to avoid double-report: {kwargs}")

0 comments on commit 5aa6dbf

Please sign in to comment.