Set minimum screen brightness level to 1, not 0
This commit is contained in:
parent
3cb1b1793d
commit
5766c7d627
@ -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),
|
||||
}));
|
||||
|
Loading…
Reference in New Issue
Block a user