-
Jakob Petsovits authored
Instead of hardcoding it to 1 for all screens, we add a function knownSafeMinBrightness() to the DisplayBrightness interface and query it from ScreenBrightnessController. Backlight displays use a hardcoded minimum of 1 as before, whereas DDC/CI displays now default to a minimum of 0 again. We are not aware of external monitors turning off the backlight when set 0 as brightness value. KWin/Wayland outputs are also defined with 0 as "not completely dark". ScreenBrightnessController exposes knownSafeMinBrightness() directly (only that of the first known display, until we get per-display APIs) and also adds an extra minBrightness() function. The latter is meant to change at runtime in the future, based on user configuration. Configurability of minBrightness() is not yet implemented. Both methods are added to the D-Bus interface of BacklightControl, for subsequent use by the brightness applet.