]> git.ipfire.org Git - thirdparty/plymouth.git/commitdiff
Create window when showing splash screen instead of at startup
authorRay Strode <rstrode@redhat.com>
Fri, 27 Jun 2008 15:14:33 +0000 (11:14 -0400)
committerRay Strode <rstrode@redhat.com>
Fri, 27 Jun 2008 15:14:57 +0000 (11:14 -0400)
This will make it easier to add a --hide-splash option, which
will provide an escape hatch for repair mode etc

src/main.c

index 7af0b169da69c7627701a60284fc28d6887f452c..a79cf35e06259dd91843c9ca979c59807de25765 100644 (file)
@@ -63,6 +63,8 @@ typedef struct
 static ply_boot_splash_t *start_boot_splash (state_t    *state,
                                              const char *module_path);
 
+static ply_window_t *create_window (state_t *state, int vt_number);
+
 static void
 on_session_output (state_t    *state,
                    const char *output,
@@ -160,6 +162,13 @@ show_default_splash (state_t *state)
 static void
 on_show_splash (state_t *state)
 {
+
+  if (state->window == NULL)
+    {
+      state->window = create_window (state, 7);
+      ply_window_take_console (state->window);
+    }
+
   show_default_splash (state);
 }
 
@@ -526,10 +535,6 @@ main (int    argc,
       return EX_UNAVAILABLE;
     }
 
-  state.window = create_window (&state, 7);
-
-  ply_window_take_console (state.window);
-
   ply_trace ("entering event loop");
   exit_code = ply_event_loop_run (state.loop);
   ply_trace ("exited event loop");