summaryrefslogtreecommitdiff
path: root/mate-extra/mate-power-manager/files/mate-power-manager-1.8.0-r1-avoid-levels-is-0-warning.patch
diff options
context:
space:
mode:
authorV3n3RiX <venerix@rogentos.ro>2016-04-24 20:14:15 +0100
committerV3n3RiX <venerix@rogentos.ro>2016-04-24 20:14:15 +0100
commitdc0c250ebeebc929347823e47921443c4edee24d (patch)
tree2664f7574359227d09e18806c1ceafb14e723f03 /mate-extra/mate-power-manager/files/mate-power-manager-1.8.0-r1-avoid-levels-is-0-warning.patch
parent3c04df6705e3e8a4e15c9f9e219c4739f74fe1d5 (diff)
cherry pick upower1 API support for mate-session-manager && mate-power-manager
Diffstat (limited to 'mate-extra/mate-power-manager/files/mate-power-manager-1.8.0-r1-avoid-levels-is-0-warning.patch')
-rw-r--r--mate-extra/mate-power-manager/files/mate-power-manager-1.8.0-r1-avoid-levels-is-0-warning.patch15
1 files changed, 15 insertions, 0 deletions
diff --git a/mate-extra/mate-power-manager/files/mate-power-manager-1.8.0-r1-avoid-levels-is-0-warning.patch b/mate-extra/mate-power-manager/files/mate-power-manager-1.8.0-r1-avoid-levels-is-0-warning.patch
new file mode 100644
index 00000000..9bccb5c9
--- /dev/null
+++ b/mate-extra/mate-power-manager/files/mate-power-manager-1.8.0-r1-avoid-levels-is-0-warning.patch
@@ -0,0 +1,15 @@
+diff --git a/src/gpm-kbd-backlight.c b/src/gpm-kbd-backlight.c
+index 0ac6801..a439e94 100644
+--- a/src/gpm-kbd-backlight.c
++++ b/src/gpm-kbd-backlight.c
+@@ -113,6 +113,9 @@ gpm_kbd_backlight_set (GpmKbdBacklight *backlight,
+ guint goal;
+
+ g_return_val_if_fail (GPM_IS_KBD_BACKLIGHT (backlight), FALSE);
++ /* avoid warnings if no keyboard brightness is available */
++ if (backlight->priv->max_brightness < 1)
++ return FALSE;
+ /* if we're setting the same we are, don't bother */
+ //g_return_val_if_fail (backlight->priv->brightness_percent != percentage, FALSE);
+
+