From b6282d82c67990e57cad0b70c229d4224190f6bf Mon Sep 17 00:00:00 2001 From: "Brian J. Tarricone" Date: Sun, 4 Aug 2024 21:32:40 -0700 Subject: [PATCH] Set minimum screen brightness level to 1, not 0 --- locker/src/monitor.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/locker/src/monitor.rs b/locker/src/monitor.rs index fcf7e4a..276e843 100644 --- a/locker/src/monitor.rs +++ b/locker/src/monitor.rs @@ -547,7 +547,7 @@ fn find_backlight_control(conn: &xcb::Connection, output: randr::Output) -> anyh if let Ok(reply) = conn.wait_for_reply(cookie) { let values = reply.valid_values(); if reply.range() && values.len() == 2 { - let min_level = values[0]; + let min_level = values[0] + 1; let max_level = values[1]; let range = max_level - min_level; if range > 0 { @@ -577,7 +577,7 @@ fn find_backlight_control(conn: &xcb::Connection, output: randr::Output) -> anyh debug!("Found sysfs backlight control at {:?}", cur_path); return Ok(Some(BacklightControl { location: BacklightLocation::Sysfs(cur_path), - min_level: 0, + min_level: 1, max_level, step: calc_step(0, max_level), }));