summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRay Strode <halfline@gmail.com>2018-06-22 20:16:20 +0000
committerRay Strode <halfline@gmail.com>2018-06-22 20:16:20 +0000
commitaa12f167807e1d94c67bb1873eb92386181f1534 (patch)
tree5d0629f8cb886434f9de2e5515f9f93cc499e7a3
parentbfdb201bb43ed4cab7b5227e457ee16f16d47ddb (diff)
parent155ee7eca48888c6ac15cf8e6cd2bfce6f1db1ad (diff)
downloadgdm-aa12f167807e1d94c67bb1873eb92386181f1534.tar.gz
Merge branch 'wip/fix-missing-login-screen' into 'master'
login screen doesn't come back after log out when performing user switching See merge request GNOME/gdm!9
-rw-r--r--daemon/gdm-manager.c16
1 files changed, 14 insertions, 2 deletions
diff --git a/daemon/gdm-manager.c b/daemon/gdm-manager.c
index 26b2c667..1370bab4 100644
--- a/daemon/gdm-manager.c
+++ b/daemon/gdm-manager.c
@@ -1345,6 +1345,11 @@ get_login_window_session_id (const char *seat_id,
res = sd_session_get_class (sessions[i], &service_class);
if (res < 0) {
+ if (res == -ENOENT) {
+ free (service_class);
+ continue;
+ }
+
g_debug ("failed to determine class of session %s: %s", sessions[i], strerror (-res));
ret = FALSE;
goto out;
@@ -1359,6 +1364,9 @@ get_login_window_session_id (const char *seat_id,
ret = sd_session_get_state (sessions[i], &state);
if (ret < 0) {
+ if (res == -ENOENT)
+ continue;
+
g_debug ("failed to determine state of session %s: %s", sessions[i], strerror (-res));
ret = FALSE;
goto out;
@@ -1372,6 +1380,8 @@ get_login_window_session_id (const char *seat_id,
res = sd_session_get_service (sessions[i], &service_id);
if (res < 0) {
+ if (res == -ENOENT)
+ continue;
g_debug ("failed to determine service of session %s: %s", sessions[i], strerror (-res));
ret = FALSE;
goto out;
@@ -1424,7 +1434,7 @@ maybe_activate_other_session (GdmManager *self,
GdmDisplay *old_display)
{
char *seat_id = NULL;
- char *session_id;
+ char *session_id = NULL;
int ret;
g_object_get (G_OBJECT (old_display),
@@ -1440,9 +1450,11 @@ maybe_activate_other_session (GdmManager *self,
lookup_by_session_id,
(gpointer) session_id);
- if (display == NULL) {
+ if (display == NULL || gdm_display_get_status (display) == GDM_DISPLAY_FINISHED) {
activate_login_window_session_on_seat (self, seat_id);
}
+
+ g_free (session_id);
}
g_free (seat_id);