mirror of
https://github.com/brl/mutter.git
synced 2024-12-26 21:02:14 +00:00
output-xrandr: Consistently return -1 on error
Returning FALSE does not indicate an error, but a valid backlight value of 0. Consumers expect a negative value to indicate no backlight support, so return -1 in case of error, just like we already do for invalid values. Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2947>
This commit is contained in:
parent
1e459c8302
commit
aa1eaa8120
@ -526,7 +526,7 @@ output_get_backlight_xrandr (MetaOutput *output)
|
||||
&nitems, &bytes_after, &buffer);
|
||||
|
||||
if (actual_type != XA_INTEGER || actual_format != 32 || nitems < 1)
|
||||
return FALSE;
|
||||
return -1;
|
||||
|
||||
value = ((int*)buffer)[0];
|
||||
if (value > 0)
|
||||
|
Loading…
Reference in New Issue
Block a user