1 diff --git a/ck-seat.c.old b/ck-seat.c
2 index 9981e53..e9d954f 100644
3 --- ConsoleKit-0.4.1/src/ck-seat.c.~6~ 2015-03-22 14:28:54.595545396 +0300
4 +++ ConsoleKit-0.4.1/src/ck-seat.c 2015-03-22 14:32:35.313366034 +0300
7 char *session_type = NULL;
8 CkSession *login_session = NULL;
9 + gboolean done = FALSE;
11 g_hash_table_iter_init (&iter, seat->priv->sessions);
12 while (g_hash_table_iter_next (&iter, &key, &value)) {
17 - login_session = NULL;
19 + login_session = NULL;
21 g_debug ("Found open session.");
24 ck_session_get_session_type (value, &session_type, NULL);
25 if (IS_STR_SET (session_type) &&
26 g_str_equal (session_type, "LoginWindow")) {
27 - login_session = value;
28 - g_free (session_type);
30 + login_session = value;
31 + /* Give non-open session a precedence */
34 + g_debug ("CkSeat: Setting login_session");
37 + g_free (session_type);