diff options
author | Ray Strode <rstrode@redhat.com> | 2008-06-27 11:14:33 -0400 |
---|---|---|
committer | Ray Strode <rstrode@redhat.com> | 2008-06-27 11:14:57 -0400 |
commit | f1378a5218bc7a89d7acadcd2089bb18413cd693 (patch) | |
tree | 3065ed0b012fc9c57de828807465b4c310ea6e37 | |
parent | baea12f03d3c18cbe5af5e31d73cf282b3d5830a (diff) | |
download | plymouth-f1378a5218bc7a89d7acadcd2089bb18413cd693.tar.gz plymouth-f1378a5218bc7a89d7acadcd2089bb18413cd693.tar.xz plymouth-f1378a5218bc7a89d7acadcd2089bb18413cd693.zip |
Create window when showing splash screen instead of at startup
This will make it easier to add a --hide-splash option, which
will provide an escape hatch for repair mode etc
-rw-r--r-- | src/main.c | 13 |
1 files changed, 9 insertions, 4 deletions
@@ -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"); |