Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
c5a4a8c
Prototype for Windows Terminal: Use notifications instead of monitori…
LeonarddeR Aug 22, 2022
60d4b36
Comments
LeonarddeR Aug 22, 2022
5054d0c
Apply suggestions from code review
LeonarddeR Aug 24, 2022
f9771b3
Fix imports
LeonarddeR Aug 24, 2022
2cafc67
Import ordering
LeonarddeR Aug 24, 2022
f39870b
Merge branch 'master' into wtNotifications
codeofdusk Aug 29, 2022
1176505
Remove Windows Terminal from textChangeUIAClassNames as it no longer …
codeofdusk Aug 29, 2022
9735811
Suppress more blanks
codeofdusk Aug 29, 2022
3b678c4
Merge branch 'master' into wtNotifications
codeofdusk Sep 20, 2022
f79d0f6
Merge branch 'master' into wtNotifications
codeofdusk Sep 29, 2022
a2bff15
Merge branch 'master' into wtNotifications
codeofdusk Oct 18, 2022
40ca1e0
Place new functionality behind a feature flag
codeofdusk Oct 18, 2022
73b5367
Remove dead code
codeofdusk Oct 18, 2022
497e3f3
Rename flag enum
codeofdusk Oct 20, 2022
2cba013
Apply suggestions from code review
codeofdusk Oct 20, 2022
69f621e
Rename _shouldUseWtNotifications to _shouldUseWindowsTerminalNotifica…
codeofdusk Oct 20, 2022
81fe5e0
Apply suggestions from code review
codeofdusk Oct 21, 2022
6a1bbb2
Style
codeofdusk Oct 21, 2022
e043da9
Add types
codeofdusk Oct 24, 2022
b6620a7
Fix hyphen
codeofdusk Oct 24, 2022
f992db5
Add alias
codeofdusk Oct 24, 2022
1b915a0
Use getattr
codeofdusk Oct 24, 2022
715168b
Update source/NVDAObjects/UIA/winConsoleUIA.py
codeofdusk Oct 24, 2022
5139a56
Rename
codeofdusk Oct 24, 2022
b706a19
Merge branch 'wtNotifications' of https://github.com/leonardder/nvda …
codeofdusk Oct 24, 2022
5fe8559
Merge remote-tracking branch 'origin/master' into wtNotifications
seanbudd Oct 25, 2022
f6f6563
update changes
seanbudd Oct 25, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Add types
  • Loading branch information
codeofdusk committed Oct 24, 2022
commit e043da927d8b602364c1a44caaeec85fd5a58d23
8 changes: 7 additions & 1 deletion source/NVDAObjects/UIA/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2076,7 +2076,13 @@ def event_UIA_systemAlert(self):
# Ideally, we wouldn't use getPropertiesBraille directly.
braille.handler.message(braille.getPropertiesBraille(name=self.name, role=self.role))

def event_UIA_notification(self, notificationKind=None, notificationProcessing=UIAHandler.NotificationProcessing_CurrentThenMostRecent, displayString=None, activityId=None):
def event_UIA_notification(
self,
notificationKind: Optional[int] = None,
notificationProcessing: Optional[int] = UIAHandler.NotificationProcessing_CurrentThenMostRecent,
displayString: Optional[str] = None,
activityId: Optional[str] = None
):
"""
Introduced in Windows 10 Fall Creators Update (build 16299).
This base implementation announces all notifications from the UIA element.
Expand Down
18 changes: 9 additions & 9 deletions source/NVDAObjects/UIA/winConsoleUIA.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
from comtypes import COMError
from diffHandler import prefer_difflib
from logHandler import log
from typing import Optional
from UIAHandler.utils import _getConhostAPILevel
from UIAHandler.constants import WinConsoleAPILevel
from . import UIA, UIATextInfo
Expand Down Expand Up @@ -430,14 +431,7 @@ class DiffBasedWinTerminalUIA(EnhancedTermTypedCharSupport):
"""

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.
"""
"Block notification events when diffing to prevent double reporting."
log.debugWarning(f"Notification event blocked to avoid double-report: {kwargs}")


Expand All @@ -452,7 +446,13 @@ class NotificationsBasedWinTerminalUIA(UIA):
#: New line text is announced using UIA notification events
announceNewLineText = False

def event_UIA_notification(self, notificationKind, notificationProcessing, displayString, activityId):
def event_UIA_notification(
self,
notificationKind: Optional[int] = None,
notificationProcessing: Optional[int] = UIAHandler.NotificationProcessing_CurrentThenMostRecent,
displayString: Optional[str] = None,
activityId: Optional[str] = None
):
# Do not announce output from background terminals.
if self.appModule != api.getFocusObject().appModule:
return
Expand Down