[gnome-settings-daemon] power: use gnome_rr_output_get_min_backlight_step
- From: Bastien Nocera <hadess src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-settings-daemon] power: use gnome_rr_output_get_min_backlight_step
- Date: Mon, 21 Oct 2013 21:30:31 +0000 (UTC)
commit 9eae369912184a75369171684c70322c44c67ac5
Author: Asad Mehmood <asad78611 googlemail com>
Date: Thu Oct 17 16:41:44 2013 +0100
power: use gnome_rr_output_get_min_backlight_step
Use min_backlight_step or 5% increments whichever is larger
https://bugzilla.gnome.org/show_bug.cgi?id=710380
plugins/power/gpm-common.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/plugins/power/gpm-common.c b/plugins/power/gpm-common.c
index ebbaa7a..74adccc 100644
--- a/plugins/power/gpm-common.c
+++ b/plugins/power/gpm-common.c
@@ -633,7 +633,7 @@ backlight_step_up (GnomeRRScreen *rr_screen, GError **error)
now = gnome_rr_output_get_backlight (output);
if (now < 0)
return percentage_value;
- step = BRIGHTNESS_STEP_AMOUNT (max - min + 1);
+ step = MAX(gnome_rr_output_get_min_backlight_step (output), BRIGHTNESS_STEP_AMOUNT(max - min
+ 1));
discrete = MIN (now + step, max);
ret = gnome_rr_output_set_backlight (output,
discrete,
@@ -692,7 +692,7 @@ backlight_step_down (GnomeRRScreen *rr_screen, GError **error)
now = gnome_rr_output_get_backlight (output);
if (now < 0)
return percentage_value;
- step = BRIGHTNESS_STEP_AMOUNT (max - min + 1);
+ step = MAX (gnome_rr_output_get_min_backlight_step (output), BRIGHTNESS_STEP_AMOUNT (max -
min + 1));
discrete = MAX (now - step, 0);
ret = gnome_rr_output_set_backlight (output,
discrete,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]