[PATCH] Fix for the "Reduce screen brightness when computer is inactive" feature on 64 bit installations that use the xfpm-power-backlight-helper.

Marcus Overhagen marcus.overhagen at gmail.com
Wed May 29 19:13:25 CEST 2013


---
 src/xfpm-backlight.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/src/xfpm-backlight.c b/src/xfpm-backlight.c
index baeeb43..02bd629 100644
--- a/src/xfpm-backlight.c
+++ b/src/xfpm-backlight.c
@@ -80,9 +80,10 @@ xfpm_backlight_dim_brightness (XfpmBacklight *backlight)
     if (xfpm_power_get_mode (backlight->priv->power) == XFPM_POWER_MODE_NORMAL )
     {
 	glong dim_level;
+	guint dim_setting;
 	
 	g_object_get (G_OBJECT (backlight->priv->conf),
-		      backlight->priv->on_battery ? BRIGHTNESS_LEVEL_ON_BATTERY : BRIGHTNESS_LEVEL_ON_AC, &dim_level,
+		      backlight->priv->on_battery ? BRIGHTNESS_LEVEL_ON_BATTERY : BRIGHTNESS_LEVEL_ON_AC, &dim_setting,
 		      NULL);
 	
 	ret = xfpm_brightness_get_level (backlight->priv->brightness, &backlight->priv->last_level);
@@ -93,7 +94,7 @@ xfpm_backlight_dim_brightness (XfpmBacklight *backlight)
 	    return;
 	}
 	
-	dim_level = dim_level * backlight->priv->max_level / 100;
+	dim_level = dim_setting * backlight->priv->max_level / 100;
 	
 	/**
 	 * Only reduce if the current level is brighter than
-- 
1.8.1.2



More information about the Xfce4-dev mailing list