Dominique Leuenberger 2017-02-02 14:28:20 +00:00 committed by Git OBS Bridge
commit d4fa60853e
3 changed files with 50 additions and 0 deletions

View File

@ -0,0 +1,40 @@
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

View File

@ -1,3 +1,10 @@
-------------------------------------------------------------------
Wed Jan 25 21:01:14 UTC 2017 - zaitor@opensuse.org
- Add gnome-settings-daemon-fix-keyboard-slider.patch: Make
keyboard backlight slider work like intended, patch from
bugzilla (bgo#725655).
-------------------------------------------------------------------
Fri Jan 13 21:41:44 UTC 2017 - zaitor@opensuse.org

View File

@ -53,6 +53,8 @@ Patch31: gnome-settings-daemon-bring-back-updates-plugin.patch
Patch32: gnome-settings-daemon-more-power-button-actions.patch
# PATCH-FIX-UPSTREAM gnome-settings-daemon-shutdown-dialog-delay.patch bgo#774452 xwang@suse.com -- Shutdown dialog delay 1 to 2 seconds.
Patch33: gnome-settings-daemon-shutdown-dialog-delay.patch
# PATCH-FIX-UPSTREAM gnome-settings-daemon-fix-keyboard-slider.patch bgo#725655 zaitor@opensuse.org -- Make keyboard backlight slider work
Patch34: gnome-settings-daemon-fix-keyboard-slider.patch
BuildRequires: cups-devel
BuildRequires: fdupes
BuildRequires: gtk-doc
@ -167,6 +169,7 @@ gnome-patch-translation-prepare
%endif
%patch32 -p1
%patch33 -p1
%patch34 -p1
%build
%if 0%{?suse_version} == 1315