summaryrefslogtreecommitdiff
path: root/daemon
diff options
context:
space:
mode:
authorMarco Trevisan (TreviƱo) <mail@3v1n0.net>2021-07-09 18:27:37 +0200
committerMarco Trevisan <mail@3v1n0.net>2021-07-10 16:06:30 +0000
commita5edfb20651edaa56468e95ea356cb600b2b8a7c (patch)
treeb65c563143b89f5660156c2e450a7dba9507efa0 /daemon
parentb0feff5fd2e2ac0bcadbac3e2e6e6d0e7cd40bb2 (diff)
downloadgdm-a5edfb20651edaa56468e95ea356cb600b2b8a7c.tar.gz
session: Emit session-opened-failed on session failures
We used the same signal (session-start-failed) when we had both session starting and opening failures. This may lead to wrong behaviors, so let's introduce another signal to notify such state. (cherry picked from commit 2f9afacd494311b8b7393848fec59bc8df7520b7)
Diffstat (limited to 'daemon')
-rw-r--r--daemon/gdm-session.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/daemon/gdm-session.c b/daemon/gdm-session.c
index 5ef67fe5..3693722e 100644
--- a/daemon/gdm-session.c
+++ b/daemon/gdm-session.c
@@ -172,6 +172,7 @@ enum {
AUTHENTICATION_FAILED,
VERIFICATION_COMPLETE,
SESSION_OPENED,
+ SESSION_OPENED_FAILED,
SESSION_STARTED,
SESSION_START_FAILED,
SESSION_EXITED,
@@ -880,7 +881,7 @@ on_opened (GdmDBusWorker *worker,
report_and_stop_conversation (self, service_name, error);
g_debug ("GdmSession: Emitting 'session-start-failed' signal");
- g_signal_emit (self, signals[SESSION_START_FAILED], 0, service_name, error->message);
+ g_signal_emit (self, signals[SESSION_OPENED_FAILED], 0, service_name, error->message);
}
}
@@ -3742,6 +3743,17 @@ gdm_session_class_init (GdmSessionClass *session_class)
2,
G_TYPE_STRING,
G_TYPE_STRING);
+ signals [SESSION_OPENED_FAILED] =
+ g_signal_new ("session-opened-failed",
+ GDM_TYPE_SESSION,
+ G_SIGNAL_RUN_FIRST,
+ 0,
+ NULL,
+ NULL,
+ g_cclosure_marshal_generic,
+ G_TYPE_NONE,
+ 2,
+ G_TYPE_STRING, G_TYPE_STRING);
signals [SESSION_STARTED] =
g_signal_new ("session-started",
GDM_TYPE_SESSION,