Reduce CPU usage while window is unfocused and not hovered over

Only render if window is focused, hovered, subscript is running,
or coroutine is active.

Closes #18
This commit is contained in:
meehl committed 2025-11-28 18:30:25 +01:00
1 parent 0066a05e13
commit ae6a24f82c
9 files changed
+116 -30

No files matched your search

+3
View File
@@ -34,6 +34,9 @@ pub enum ModeTransition {
pub struct ModeFrameOutput {
pub primitives: Box<dyn Iterator<Item = ClippedPrimitive>>,
pub can_elide: bool,
/// Indicates that this should be redrawn again next frame even if user is not interacting with
/// window
pub should_continue: bool,
}
pub enum AppMode {