Testet ok - I can now use the slider, not having to rely on hardware keys to alter brightness of keyboard backlight. OBS-URL: https://build.opensuse.org/request/show/452492 OBS-URL: https://build.opensuse.org/package/show/GNOME:Factory/gnome-settings-daemon?expand=0&rev=271
41 lines
1.9 KiB
Diff
41 lines
1.9 KiB
Diff
From 5aaf80d68716fbbd0bc122ef52defab579b84d80 Mon Sep 17 00:00:00 2001
|
|
From: Adam Goode <agoode@google.com>
|
|
Date: Fri, 20 Jan 2017 10:09:33 -0500
|
|
Subject: [PATCH] power: emit correct value for set keyboard backlight
|
|
|
|
In the UI, the keyboard backlight is expressed on a percent
|
|
scale. This is translated to the hardware's scale and sent
|
|
to the hardware. The just-set value is then emitted so that
|
|
any UI can show the correct value. Unfortunately the value
|
|
is sent in the hardware scale, not the expected percent scale,
|
|
causing incorrect display of the current value.
|
|
|
|
This emits the value in the correct scale.
|
|
|
|
https://bugzilla.gnome.org/show_bug.cgi?id=725655
|
|
---
|
|
AUTHORS | 1 +
|
|
plugins/power/gsd-power-manager.c | 5 ++---
|
|
2 files changed, 3 insertions(+), 3 deletions(-)
|
|
|
|
diff --git a/plugins/power/gsd-power-manager.c b/plugins/power/gsd-power-manager.c
|
|
index 5db92f4..14c6542 100644
|
|
--- a/plugins/power/gsd-power-manager.c
|
|
+++ b/plugins/power/gsd-power-manager.c
|
|
@@ -2941,9 +2941,8 @@ handle_set_property_other (GsdPowerManager *manager,
|
|
}
|
|
} 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);
|
|
- if (upower_kbd_set_brightness (manager, brightness_value, error)) {
|
|
+ if (upower_kbd_set_brightness (manager, PERCENTAGE_TO_ABS(0, manager->priv->kbd_brightness_max,
|
|
+ brightness_value), error)) {
|
|
backlight_iface_emit_changed (manager, GSD_POWER_DBUS_INTERFACE_KEYBOARD, brightness_value);
|
|
return TRUE;
|
|
} else {
|
|
--
|
|
2.9.3
|
|
|
|
|