forked from pool/gnome-settings-daemon
Dominique Leuenberger
7ee2072cce
fix for bnc#861365 OBS-URL: https://build.opensuse.org/request/show/221166 OBS-URL: https://build.opensuse.org/package/show/GNOME:Factory/gnome-settings-daemon?expand=0&rev=192
31 lines
1.3 KiB
Diff
31 lines
1.3 KiB
Diff
Index: gnome-settings-daemon-3.10.2/plugins/power/gsd-power-manager.c
|
|
===================================================================
|
|
--- gnome-settings-daemon-3.10.2.orig/plugins/power/gsd-power-manager.c
|
|
+++ gnome-settings-daemon-3.10.2/plugins/power/gsd-power-manager.c
|
|
@@ -909,7 +909,7 @@ device_perhaps_recall (GsdPowerManager *
|
|
static void
|
|
engine_device_add (GsdPowerManager *manager, UpDevice *device)
|
|
{
|
|
- gboolean recall_notice;
|
|
+ gboolean recall_notice = FALSE;
|
|
GsdPowerManagerWarning warning;
|
|
UpDeviceState state;
|
|
UpDeviceKind kind;
|
|
@@ -936,6 +936,7 @@ engine_device_add (GsdPowerManager *mana
|
|
|
|
if (kind == UP_DEVICE_KIND_BATTERY) {
|
|
g_debug ("updating because we added a device");
|
|
+ g_ptr_array_add (manager->priv->devices_array, g_object_ref (device));
|
|
engine_update_composite_device (manager);
|
|
|
|
/* reset those values for the composite device */
|
|
@@ -1014,8 +1015,6 @@ engine_coldplug (GsdPowerManager *manage
|
|
static void
|
|
engine_device_added_cb (UpClient *client, UpDevice *device, GsdPowerManager *manager)
|
|
{
|
|
- /* add to list */
|
|
- g_ptr_array_add (manager->priv->devices_array, g_object_ref (device));
|
|
engine_device_add (manager, device);
|
|
engine_check_recall (manager, device);
|
|
|