Commit c7fa6120 authored by Ray Strode's avatar Ray Strode

lib: don't set loaded state until seat is fetched

At the moment we set is-loaded on the user-manager
object as soon as we start fetching the seat, but
we should waiting until the seat is fetched, so
that can_switch() will return the correct value
if the caller waited until the loaded signal
to use it.

This commit changes the >= to > which I believe
was the original intention anyway.

https://bugs.freedesktop.org/show_bug.cgi?id=107298
parent f49ca647
......@@ -2382,7 +2382,7 @@ maybe_set_is_loaded (ActUserManager *manager)
/* Don't set is_loaded yet unless the seat is already loaded enough
* or failed to load.
*/
if (manager->priv->seat.state >= ACT_USER_MANAGER_SEAT_STATE_GET_ID) {
if (manager->priv->seat.state > ACT_USER_MANAGER_SEAT_STATE_GET_ID) {
g_debug ("ActUserManager: Seat loaded, so now setting loaded property");
} else if (manager->priv->seat.state == ACT_USER_MANAGER_SEAT_STATE_UNLOADED) {
g_debug ("ActUserManager: Seat wouldn't load, so giving up on it and setting loaded property");
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment