Created
November 3, 2015 06:36
-
-
Save nachanon/da35ebff56868602020c to your computer and use it in GitHub Desktop.
Patch for MATE Power Manager 1.8.0 idle handler, to always calculate backlight from configured value
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
From: Nutchanon Wetchasit <nachanon@users.noreply.github.com> | |
Subject: Make idle event handler always calculate backlight from configured settings | |
Bug: https://github.com/mate-desktop/mate-power-manager/issues/150 | |
--- a/src/gpm-backlight.c | |
+++ b/src/gpm-backlight.c | |
@@ -578,7 +578,7 @@ | |
if (mode == GPM_IDLE_MODE_NORMAL) { | |
/* sync lcd brightness */ | |
gpm_backlight_notify_system_idle_changed (backlight, FALSE); | |
- gpm_backlight_brightness_evaluate_and_set (backlight, FALSE, FALSE); | |
+ gpm_backlight_brightness_evaluate_and_set (backlight, FALSE, TRUE); | |
/* ensure backlight is on */ | |
ret = gpm_dpms_set_mode (backlight->priv->dpms, GPM_DPMS_MODE_ON, &error); | |
@@ -591,7 +591,7 @@ | |
/* sync lcd brightness */ | |
gpm_backlight_notify_system_idle_changed (backlight, TRUE); | |
- gpm_backlight_brightness_evaluate_and_set (backlight, FALSE, FALSE); | |
+ gpm_backlight_brightness_evaluate_and_set (backlight, FALSE, TRUE); | |
/* ensure backlight is on */ | |
ret = gpm_dpms_set_mode (backlight->priv->dpms, GPM_DPMS_MODE_ON, &error); | |
@@ -604,7 +604,7 @@ | |
/* sync lcd brightness */ | |
gpm_backlight_notify_system_idle_changed (backlight, TRUE); | |
- gpm_backlight_brightness_evaluate_and_set (backlight, FALSE, FALSE); | |
+ gpm_backlight_brightness_evaluate_and_set (backlight, FALSE, TRUE); | |
/* get the DPMS state we're supposed to use on the power state */ | |
g_object_get (backlight->priv->client, |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment