[gnome-settings-daemon] power: Default to the kbd backlight being unavailable



commit 33c8a8743892ba5d2201cacc16a61bcd58d446cb
Author: Bastien Nocera <hadess hadess net>
Date:   Fri Sep 6 14:10:01 2013 -0300

    power: Default to the kbd backlight being unavailable
    
    The default value of the keyboard backlight should be -1, so
    that we don't advertise ourselves as having one until we got
    the info back from upower.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=706040

 plugins/power/gsd-power-manager.c |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)
---
diff --git a/plugins/power/gsd-power-manager.c b/plugins/power/gsd-power-manager.c
index 341dbfb..0bc521a 100644
--- a/plugins/power/gsd-power-manager.c
+++ b/plugins/power/gsd-power-manager.c
@@ -2876,6 +2876,11 @@ power_keyboard_proxy_ready_cb (GObject             *source_object,
                         g_error_free (error);
                 }
         }
+
+        /* Tell the front-end that the brightness changed from
+         * its default "-1/no keyboard backlight available" default */
+        backlight_iface_emit_changed (manager, GSD_POWER_DBUS_INTERFACE_KEYBOARD, 
manager->priv->kbd_brightness_now);
+
 out:
         if (k_now != NULL)
                 g_variant_unref (k_now);
@@ -3282,6 +3287,7 @@ on_rr_screen_acquired (GObject      *object,
                           G_CALLBACK (up_client_on_battery_cb), manager);
 
         /* connect to UPower for keyboard backlight control */
+        manager->priv->kbd_brightness_now = -1;
         g_dbus_proxy_new_for_bus (G_BUS_TYPE_SYSTEM,
                                   G_DBUS_PROXY_FLAGS_DO_NOT_LOAD_PROPERTIES,
                                   NULL,


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]