From 018786dab8e253fe45347aea8313ac291d3b858a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florian=20M=C3=BCllner?= Date: Mon, 3 Apr 2023 20:38:21 +0200 Subject: [PATCH] output-xrandr: Don't treat 0 as invalid backlight value Whether a value is in range depends on the backlight-min/max values, and I didn't spot anything that excludes 0 as a valid lower limit outright. Part-of: --- src/backends/x11/meta-output-xrandr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/backends/x11/meta-output-xrandr.c b/src/backends/x11/meta-output-xrandr.c index 383babffb..d70063757 100644 --- a/src/backends/x11/meta-output-xrandr.c +++ b/src/backends/x11/meta-output-xrandr.c @@ -529,7 +529,7 @@ output_get_backlight_xrandr (MetaOutput *output) return -1; value = ((int*)buffer)[0]; - if (value > 0) + if (value >= 0) return normalize_backlight (output, value); else return -1;