From 66c26c15d7ea5436910071e0294c507fdc5cc78a Mon Sep 17 00:00:00 2001 From: Jason Perlow Date: Wed, 18 Nov 2026 15:25:45 -0500 Subject: [PATCH] fix(idle): restore the screens before re-arming the idle watches rearm() drops every idle watch, including the resume event that undoes a dim or blank. If a setting changes while the screens are dimmed, they stay dimmed. Undo the dim and blank first. Assisted-by: claude-code:claude-sonnet-5-5 AI-Scope: Diagnosed the stuck dim from logs and wrote the small fix; the author reproduced and reviewed it on hardware. --- src/core/idle_manager.vala | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/core/idle_manager.vala b/src/core/idle_manager.vala index f2b756f0..39b5cc4f 100644 --- a/src/core/idle_manager.vala +++ b/src/core/idle_manager.vala @@ -95,6 +95,10 @@ namespace Singularity { public void rearm() { if (!available) return; + // Dropping the watches below also drops the resume events that would + // undo a dim or blank in progress, so put the screens back first. + undim(); + if (blanked) blank_screens(false); int[] all = { DIM, BLANK, LOCK, SUSPEND, PROBE }; foreach (int id in all) IdleNotify.unwatch(id); fired.clear();