power: Do not compute percentage on keyboard disappearing
When the module in charge of the keyboard backlight is rmmod-ed, upower emits a new signal to communicate to gsd that we don't have backlight anymore. This signal is carrying (value == -1, max == 0). In this case we do not want to calculate the new brightness.
Signed-off-by: Carlo Caione carlo@endlessm.com
Note 2020-09-03: Based on discussion on the Endless bug tracker, the
steps to reproduce this are to unplug a Filco USB keyboard from a
Mission One, but perhaps it's applicable on other hardware as well.
The original PR for this was
https://github.com/endlessm/gnome-settings-daemon/pull/43
- mwleeds
Edited by Phaedrus Leeds