[Xfce4-commits] [xfce/xfce4-power-manager] 02/02: Fix two more range checks regarding brightness levels
noreply at xfce.org
noreply at xfce.org
Tue Jun 24 18:37:05 CEST 2014
This is an automated email from the git hooks/post-receive script.
eric pushed a commit to branch master
in repository xfce/xfce4-power-manager.
commit e5ee773213583f87f6544bad31e65d5bf10e5288
Author: Harald Judt <h.judt at gmx.at>
Date: Tue Jun 24 15:04:03 2014 +0200
Fix two more range checks regarding brightness levels
Signed-off-by: Eric Koegel <eric.koegel at gmail.com>
---
common/xfpm-brightness.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/common/xfpm-brightness.c b/common/xfpm-brightness.c
index 4dbf519..2b94777 100644
--- a/common/xfpm-brightness.c
+++ b/common/xfpm-brightness.c
@@ -417,7 +417,7 @@ xfpm_brightness_helper_up (XfpmBrightness *brightness, gint32 *new_level)
if ( !ret )
return FALSE;
- if ( hw_level == brightness->priv->max_level )
+ if ( hw_level >= brightness->priv->max_level )
{
*new_level = brightness->priv->max_level;
return TRUE;
@@ -457,7 +457,7 @@ xfpm_brightness_helper_down (XfpmBrightness *brightness, gint32 *new_level)
if ( !ret )
return FALSE;
- if ( hw_level == brightness->priv->min_level )
+ if ( hw_level <= brightness->priv->min_level )
{
*new_level = brightness->priv->min_level;
return TRUE;
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Xfce4-commits
mailing list