[gnome-settings-daemon] power: always use absolute values to set the keyboard brightness
- From: Cosimo Cecchi <cosimoc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-settings-daemon] power: always use absolute values to set the keyboard brightness
- Date: Fri, 2 Aug 2013 08:52:15 +0000 (UTC)
commit f79014fb840677eba1ab1176b4f8638bf74c6146
Author: Cosimo Cecchi <cosimoc gnome org>
Date: Thu Aug 1 15:31:57 2013 +0200
power: always use absolute values to set the keyboard brightness
The property is a percentage, but we need to pass the absolute value down to upower.
https://bugzilla.gnome.org/show_bug.cgi?id=705269
plugins/power/gsd-power-manager.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
---
diff --git a/plugins/power/gsd-power-manager.c b/plugins/power/gsd-power-manager.c
index 7d92805..fde90ef 100644
--- a/plugins/power/gsd-power-manager.c
+++ b/plugins/power/gsd-power-manager.c
@@ -3842,6 +3842,8 @@ handle_set_property_other (GsdPowerManager *manager,
brightness_value, NULL);
} else if (g_strcmp0 (interface_name, GSD_POWER_DBUS_INTERFACE_KEYBOARD) == 0) {
g_variant_get (value, "i", &brightness_value);
+ brightness_value = PERCENTAGE_TO_ABS (0, manager->priv->kbd_brightness_max,
+ brightness_value);
return upower_kbd_set_brightness (manager, brightness_value, NULL);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]