From d77f2a94511e7a57a6e3a656eb07b9ab7ea27b016d3ad1f8c11c600e58786649 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B8rn=20Lie?= Date: Tue, 31 Jan 2017 11:37:46 +0000 Subject: [PATCH] Accepting request 452492 from home:Zaitor 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 --- ...-settings-daemon-fix-keyboard-slider.patch | 40 +++++++++++++++++++ gnome-settings-daemon.changes | 7 ++++ gnome-settings-daemon.spec | 3 ++ 3 files changed, 50 insertions(+) create mode 100644 gnome-settings-daemon-fix-keyboard-slider.patch diff --git a/gnome-settings-daemon-fix-keyboard-slider.patch b/gnome-settings-daemon-fix-keyboard-slider.patch new file mode 100644 index 0000000..c763017 --- /dev/null +++ b/gnome-settings-daemon-fix-keyboard-slider.patch @@ -0,0 +1,40 @@ +From 5aaf80d68716fbbd0bc122ef52defab579b84d80 Mon Sep 17 00:00:00 2001 +From: Adam Goode +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 + + diff --git a/gnome-settings-daemon.changes b/gnome-settings-daemon.changes index 8e001cb..5cb262b 100644 --- a/gnome-settings-daemon.changes +++ b/gnome-settings-daemon.changes @@ -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 diff --git a/gnome-settings-daemon.spec b/gnome-settings-daemon.spec index 357c092..2f8ad74 100644 --- a/gnome-settings-daemon.spec +++ b/gnome-settings-daemon.spec @@ -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