Blame 0001-lib-don-t-set-loaded-state-until-seat-is-fetched.patch

b0e7050
From c7fa612023a163e8b2352e1170c6df3fceb19b27 Mon Sep 17 00:00:00 2001
b0e7050
From: Ray Strode <rstrode@redhat.com>
b0e7050
Date: Thu, 19 Jul 2018 13:14:09 -0400
b0e7050
Subject: [PATCH 1/3] lib: don't set loaded state until seat is fetched
b0e7050
b0e7050
At the moment we set is-loaded on the user-manager
b0e7050
object as soon as we start fetching the seat, but
b0e7050
we should waiting until the seat is fetched, so
b0e7050
that can_switch() will return the correct value
b0e7050
if the caller waited until the loaded signal
b0e7050
to use it.
b0e7050
b0e7050
This commit changes the >= to > which I believe
b0e7050
was the original intention anyway.
b0e7050
b0e7050
https://bugs.freedesktop.org/show_bug.cgi?id=107298
b0e7050
---
b0e7050
 src/libaccountsservice/act-user-manager.c | 2 +-
b0e7050
 1 file changed, 1 insertion(+), 1 deletion(-)
b0e7050
b0e7050
diff --git a/src/libaccountsservice/act-user-manager.c b/src/libaccountsservice/act-user-manager.c
b0e7050
index 325421b..e7e26b1 100644
b0e7050
--- a/src/libaccountsservice/act-user-manager.c
b0e7050
+++ b/src/libaccountsservice/act-user-manager.c
b0e7050
@@ -2382,7 +2382,7 @@ maybe_set_is_loaded (ActUserManager *manager)
b0e7050
         /* Don't set is_loaded yet unless the seat is already loaded enough
b0e7050
          * or failed to load.
b0e7050
          */
b0e7050
-        if (manager->priv->seat.state >= ACT_USER_MANAGER_SEAT_STATE_GET_ID) {
b0e7050
+        if (manager->priv->seat.state > ACT_USER_MANAGER_SEAT_STATE_GET_ID) {
b0e7050
                 g_debug ("ActUserManager: Seat loaded, so now setting loaded property");
b0e7050
         } else if (manager->priv->seat.state == ACT_USER_MANAGER_SEAT_STATE_UNLOADED) {
b0e7050
                 g_debug ("ActUserManager: Seat wouldn't load, so giving up on it and setting loaded property");
b0e7050
-- 
b0e7050
2.19.0
b0e7050