Keep clock active when hidden or minimized#124
Merged
Conversation
Fixes a startup edge case where launching with `StartHidden` could leave the displayed clock text stale until the window was restored. Minimizing was previously treated as a reason to pause the timer, but in practice that optimization is too small to justify the risk: the app remains resident either way, and a one-second clock tick is core behavior for a desktop clock. This keeps the app’s background behavior aligned with user expectations: hidden or minimized should mean “not visible,” not “time stops updating.”
The efficiency gain is likely negligible for one lightweight tick per second, and removing it makes the lifecycle argument cleaner. If efficiency mode matters, bring it back as a separate, explicit feature with a name/setting that says the app may deprioritize background timing.
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.
Minimizing the clock should only change its visibility, not put the app into a reduced-activity state. The previous behavior could stop or deprioritize the timer during StartHidden, which made the clock state less reliable while the app was still running.
This keeps the timer lifecycle predictable: the clock starts updating at startup, continues while hidden or minimized, and only pauses for explicit short-lived interactions like dragging.
Closes #123