From 65eeff79fff8a1bfdf67ca51d147384f46f4d5c0 Mon Sep 17 00:00:00 2001 From: Nicolás Reynolds Date: Fri, 27 Dec 2013 23:55:53 +0000 Subject: Fri Dec 27 23:54:04 UTC 2013 --- ...se-gnome_rr_output_get_min_backlight_step.patch | 37 ++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 extra/gnome-settings-daemon/0001-power-use-gnome_rr_output_get_min_backlight_step.patch (limited to 'extra/gnome-settings-daemon/0001-power-use-gnome_rr_output_get_min_backlight_step.patch') diff --git a/extra/gnome-settings-daemon/0001-power-use-gnome_rr_output_get_min_backlight_step.patch b/extra/gnome-settings-daemon/0001-power-use-gnome_rr_output_get_min_backlight_step.patch new file mode 100644 index 000000000..8a804429e --- /dev/null +++ b/extra/gnome-settings-daemon/0001-power-use-gnome_rr_output_get_min_backlight_step.patch @@ -0,0 +1,37 @@ +From 28c4f287523607cd24bcb62b25bf83691036fadd Mon Sep 17 00:00:00 2001 +From: Asad Mehmood +Date: Thu, 17 Oct 2013 16:41:44 +0100 +Subject: [PATCH] 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 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/plugins/power/gpm-common.c b/plugins/power/gpm-common.c +index 81af0b7..81dc048 100644 +--- a/plugins/power/gpm-common.c ++++ b/plugins/power/gpm-common.c +@@ -1275,7 +1275,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, +@@ -1334,7 +1334,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, +-- +1.8.4.1 + -- cgit v1.2.3-54-g00ecf