]> git.ipfire.org Git - thirdparty/plymouth.git/commitdiff
Force windows to get closed on quit
authorRay Strode <rstrode@redhat.com>
Thu, 30 Oct 2008 16:56:46 +0000 (12:56 -0400)
committerRay Strode <rstrode@redhat.com>
Thu, 30 Oct 2008 16:58:53 +0000 (12:58 -0400)
If plymouth was called with --retain-splash, the
window wasn't getting closed which caused the tty
to not get reset correctly.

src/main.c

index 150e5156620487a664c0faed752739b49d76289e..d4286fcb65c25c21012748d1fd64f960ae94c1a0 100644 (file)
@@ -323,13 +323,10 @@ on_show_splash (state_t *state)
 }
 
 static void
-on_hide_splash (state_t *state)
+quit_splash (state_t *state)
 {
-
-  ply_trace ("hiding boot splash");
   if (state->boot_splash != NULL)
     {
-      ply_boot_splash_hide (state->boot_splash);
       ply_boot_splash_free (state->boot_splash);
       state->boot_splash = NULL;
     }
@@ -350,6 +347,17 @@ on_hide_splash (state_t *state)
     }
 }
 
+static void
+on_hide_splash (state_t *state)
+{
+
+  ply_trace ("hiding boot splash");
+  if (state->boot_splash != NULL)
+    ply_boot_splash_hide (state->boot_splash);
+
+  quit_splash (state);
+}
+
 #ifdef PLY_ENABLE_GDM_TRANSITION
 static void
 tell_gdm_to_transition (void)
@@ -373,6 +381,8 @@ on_quit (state_t *state,
     {
       if (!retain_splash)
         on_hide_splash (state);
+      else
+        quit_splash (state);
       ply_boot_splash_free (state->boot_splash);
       state->boot_splash = NULL;
     }