Skip to content
Merged
Changes from 1 commit
Commits
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
Next Next commit
Don't cancel speech for focused windows
  • Loading branch information
feerrenrut committed Sep 18, 2020
commit 0c010900c0bc424b717e2259f1b629f61905f3f6
2 changes: 2 additions & 0 deletions source/eventHandler.py
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,7 @@ def _getFocusLossCancellableSpeechCommand(
) -> Optional[_CancellableSpeechCommand]:
if reason != controlTypes.REASON_FOCUS or not speech.manager._shouldCancelExpiredFocusEvents():
return None
from NVDAObjects.window import Window
from NVDAObjects import NVDAObject
if not isinstance(obj, NVDAObject):
log.warning("Unhandled object type. Expected all objects to be descendant from NVDAObject")
Expand All @@ -181,6 +182,7 @@ def isSpeechStillValid():
isLastFocusObj()
or not previouslyHadFocus()
or isAncestorOfCurrentFocus()
or isinstance(obj, Window) # ensure new windows are reported
)
return stillValid

Expand Down