diff options
author | Marco Trevisan (TreviƱo) <mail@3v1n0.net> | 2021-07-09 18:27:37 +0200 |
---|---|---|
committer | Marco Trevisan <mail@3v1n0.net> | 2021-07-10 16:06:30 +0000 |
commit | a5edfb20651edaa56468e95ea356cb600b2b8a7c (patch) | |
tree | b65c563143b89f5660156c2e450a7dba9507efa0 /daemon | |
parent | b0feff5fd2e2ac0bcadbac3e2e6e6d0e7cd40bb2 (diff) | |
download | gdm-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.c | 14 |
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, |