diff options
Diffstat (limited to 'src/indicator-power.c')
-rw-r--r-- | src/indicator-power.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/indicator-power.c b/src/indicator-power.c index a81b791..8180d38 100644 --- a/src/indicator-power.c +++ b/src/indicator-power.c @@ -498,9 +498,6 @@ get_primary_device (GVariant *devices) g_debug ("%s: got data from object %s", G_STRFUNC, object_path); - if (primary_device == NULL && kind == UP_DEVICE_KIND_BATTERY) - primary_device = device; - if (state == UP_DEVICE_STATE_DISCHARGING) { discharging = TRUE; @@ -519,6 +516,10 @@ get_primary_device (GVariant *devices) primary_device_charging = device; } } + else + { + primary_device = device; + } } if (discharging) |