compositor: Turn off display in non-ambient mode when display goes Off (fixes #198) - #236
Open
NickASanOS wants to merge 1 commit into
Open
NickASanOS wants to merge 1 commit into
NickASanOS wants to merge 1 commit into
Conversation
Only start the 5-second delayTimer when ambient/AOD is enabled. In non-ambient mode, display-off handling is done immediately in LipstickCompositor::reactOnDisplayStateChanges. Refs AsteroidOS#198
Member
|
Is this necessary in addition to AsteroidOS/lipstick#24 or is only one or the other required ? |
Member
|
This PR appears to depend on #235. Keeping this as a note here |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
When ambient/AOD is disabled and the display goes Off (power button press while an app is open), the compositor window was never hidden because the ambient-only code path never triggered.
Root cause
In
LipstickCompositor::reactOnDisplayStateChanges, when display goes Off and ambient is disabled, onlydisplayOff()was emitted. The window stayed visible indefinitely —delayTimerfired after 5 seconds butsetAmbientUpdatesEnabled(true)returned immediately because!ambientEnabled().Changes
setUpdatesEnabled(false)when display goes Off in non-ambient mode. On wake-up, callsetUpdatesEnabled(true)for proper restoration (DisplayOn, displayAboutToBeOn).delayTimerwhen ambient is enabled. Non-ambient display-off is now handled in C++.Fixes #198