Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow display to turn off for power saving during say all #11118

Merged
merged 2 commits into from
May 7, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
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
2 changes: 1 addition & 1 deletion source/inputCore.py
Original file line number Diff line number Diff line change
Expand Up @@ -444,7 +444,7 @@ def executeGesture(self, gesture):
queueHandler.queueFunction(queueHandler.eventQueue, speech.pauseSpeech, speechEffect == gesture.SPEECHEFFECT_PAUSE)

if gesture.shouldPreventSystemIdle:
winKernel.SetThreadExecutionState(winKernel.ES_SYSTEM_REQUIRED | winKernel.ES_DISPLAY_REQUIRED)
winKernel.SetThreadExecutionState(winKernel.ES_SYSTEM_REQUIRED)

if log.isEnabledFor(log.IO) and not gesture.isModifier:
self._lastInputTime = time.time()
Expand Down
4 changes: 2 additions & 2 deletions source/sayAllHandler.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ def next(self):
if self.prevObj:
# We just started speaking this object, so move the navigator to it.
api.setNavigatorObject(self.prevObj, isFocus=lastSayAllMode==CURSOR_CARET)
winKernel.SetThreadExecutionState(winKernel.ES_SYSTEM_REQUIRED | winKernel.ES_DISPLAY_REQUIRED)
winKernel.SetThreadExecutionState(winKernel.ES_SYSTEM_REQUIRED)
# Move onto the next object.
self.prevObj = obj = next(self.walker, None)
if not obj:
Expand Down Expand Up @@ -206,7 +206,7 @@ def lineReached(self, obj, bookmark, state):
updater.updateCaret()
if self.cursor != CURSOR_CARET or config.conf["reviewCursor"]["followCaret"]:
api.setReviewPosition(updater, isCaret=self.cursor==CURSOR_CARET)
winKernel.SetThreadExecutionState(winKernel.ES_SYSTEM_REQUIRED | winKernel.ES_DISPLAY_REQUIRED)
winKernel.SetThreadExecutionState(winKernel.ES_SYSTEM_REQUIRED)
if self.numBufferedLines == 0:
# This was the last line spoken, so move on.
self.nextLine()
Expand Down