diff options
author | Ray Strode <rstrode@redhat.com> | 2015-03-19 22:38:15 -0400 |
---|---|---|
committer | Ray Strode <rstrode@redhat.com> | 2015-03-24 10:45:13 -0400 |
commit | 2cbd7ad1f66d0a757c1d2217705436aa1beca76a (patch) | |
tree | 480da566aab10f5ebb3011f4f7a43ab275a3a32d | |
parent | c46f1f6798088c4d0ebc809fe200e2fee50d69f6 (diff) | |
download | gdm-2cbd7ad1f66d0a757c1d2217705436aa1beca76a.tar.gz |
manager: add a different hack to quit plymouth later
Right now wayland sessions register with GDM before they're
actually ready, so we quit plymouth too soon.
Until we can fix that, this commit quits plymouth when the login screen
connects to the daemon, or in the event of automatic login (where there
is no login screen), after 20 seconds.
This is like commit 862ba1bd67ec85b5784d3e8809a405f1845b1c43
but hopefully less broken..
https://bugzilla.gnome.org/show_bug.cgi?id=746498
-rw-r--r-- | daemon/gdm-manager.c | 26 |
1 files changed, 19 insertions, 7 deletions
diff --git a/daemon/gdm-manager.c b/daemon/gdm-manager.c index 8c36e064..7b2cf65b 100644 --- a/daemon/gdm-manager.c +++ b/daemon/gdm-manager.c @@ -182,7 +182,7 @@ plymouth_prepare_for_transition (void) } } -static void +static gboolean plymouth_quit_with_transition (void) { gboolean res; @@ -194,6 +194,8 @@ plymouth_quit_with_transition (void) g_warning ("Could not quit plymouth: %s", error->message); g_error_free (error); } + + return G_SOURCE_REMOVE; } static void @@ -1734,12 +1736,6 @@ on_display_status_changed (GdmDisplay *display, } if (status == GDM_DISPLAY_MANAGED) { -#ifdef WITH_PLYMOUTH - if (quit_plymouth) { - plymouth_quit_with_transition (); - manager->priv->plymouth_is_running = FALSE; - } -#endif greeter_display_started (manager, display); } break; @@ -1999,6 +1995,15 @@ on_user_session_started (GdmSession *session, { g_debug ("GdmManager: session started %d", pid); add_session_record (manager, session, pid, SESSION_RECORD_LOGIN); + +#ifdef WITH_PLYMOUTH + if (g_strcmp0 (service_name, "gdm-autologin") == 0) { + if (manager->priv->plymouth_is_running) { + g_timeout_add_seconds (20, (GSourceFunc) plymouth_quit_with_transition, NULL); + manager->priv->plymouth_is_running = FALSE; + } + } +#endif } static void @@ -2168,6 +2173,13 @@ on_session_client_connected (GdmSession *session, return; } +#ifdef WITH_PLYMOUTH + if (manager->priv->plymouth_is_running) { + plymouth_quit_with_transition (); + manager->priv->plymouth_is_running = FALSE; + } +#endif + g_object_get (G_OBJECT (display), "allow-timed-login", &allow_timed_login, NULL); if (!allow_timed_login) { |