[gdm] manager: add a different hack to quit plymouth later
- From: Ray Strode <halfline src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gdm] manager: add a different hack to quit plymouth later
- Date: Tue, 24 Mar 2015 14:45:29 +0000 (UTC)
commit 2cbd7ad1f66d0a757c1d2217705436aa1beca76a
Author: Ray Strode <rstrode redhat com>
Date: Thu Mar 19 22:38:15 2015 -0400
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
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 8c36e06..7b2cf65 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) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]