summaryrefslogtreecommitdiff
path: root/daemon/gdm-session.c
diff options
context:
space:
mode:
authorMarco Trevisan (Treviño) <mail@3v1n0.net>2021-07-09 18:27:37 +0200
committerMarco Trevisan (Treviño) <mail@3v1n0.net>2021-07-09 18:42:14 +0200
commit2f9afacd494311b8b7393848fec59bc8df7520b7 (patch)
treed5ba96028c578d48c3e1154cd53ddec953283833 /daemon/gdm-session.c
parentf65c681a469a2675d96012a77a563e50369b9e54 (diff)
downloadgdm-2f9afacd494311b8b7393848fec59bc8df7520b7.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.
Diffstat (limited to 'daemon/gdm-session.c')
-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 2bc9d943..f705f0e0 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,
@@ -883,7 +884,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);
}
}
@@ -3746,6 +3747,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,