From: Ray Strode Date: Wed, 24 Mar 2010 03:54:17 +0000 (-0400) Subject: [main] move guts of on_escaped_press to new function X-Git-Tag: 0.8.0~10 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=09bf42fddcc94e1cced4b3d70765a9753d22f530;p=thirdparty%2Fplymouth.git [main] move guts of on_escaped_press to new function Before we were calling the handler directly when it wasn't in response to an escape key press event, which was a little groaty. --- diff --git a/src/main.c b/src/main.c index 2ad123b5..87146882 100644 --- a/src/main.c +++ b/src/main.c @@ -740,7 +740,7 @@ static void dump_details_and_quit_splash (state_t *state) { state->showing_details = false; - on_escape_pressed (state); + toggle_between_splash_and_details (state); if (state->renderer != NULL) ply_renderer_deactivate (state->renderer); @@ -1067,10 +1067,12 @@ update_display (state_t *state) } static void -on_escape_pressed (state_t *state) +toggle_between_splash_and_details (state_t *state) { + ply_trace ("toggling between splash and details"); if (state->boot_splash != NULL) { + ply_trace ("hiding and freeing current splash"); ply_boot_splash_hide (state->boot_splash); ply_boot_splash_free (state->boot_splash); state->boot_splash = NULL; @@ -1089,6 +1091,13 @@ on_escape_pressed (state_t *state) update_display (state); } +static void +on_escape_pressed (state_t *state) +{ + ply_trace ("escape key pressed"); + toggle_between_splash_and_details (state); +} + static void on_keyboard_input (state_t *state, const char *keyboard_input,