From eaabb6a04b819dfb5ed8fec33290e7ab307f944b Mon Sep 17 00:00:00 2001 From: Ray Strode Date: Fri, 5 Sep 2008 11:20:54 -0400 Subject: [PATCH] Reset details to raw mode when getting password For some reason it's getting reset during boot up. --- src/plugins/splash/details/plugin.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/plugins/splash/details/plugin.c b/src/plugins/splash/details/plugin.c index 3706e81f..1ba54752 100644 --- a/src/plugins/splash/details/plugin.c +++ b/src/plugins/splash/details/plugin.c @@ -66,6 +66,7 @@ struct _ply_boot_splash_plugin ply_event_loop_t *loop; ply_answer_t *pending_password_answer; + ply_window_t *window; uint32_t keyboard_input_is_hidden : 1; }; @@ -160,6 +161,8 @@ show_splash_screen (ply_boot_splash_plugin_t *plugin, interface = ply_boot_splash_plugin_get_interface (); interface->ask_for_password = ask_for_password; + + plugin->window = window; } plugin->loop = loop; @@ -209,6 +212,7 @@ hide_splash_screen (ply_boot_splash_plugin_t *plugin, { ply_answer_with_string (plugin->pending_password_answer, ""); plugin->pending_password_answer = NULL; + plugin->keyboard_input_is_hidden = false; } ply_window_set_keyboard_input_handler (window, NULL, NULL); @@ -220,6 +224,7 @@ hide_splash_screen (ply_boot_splash_plugin_t *plugin, detach_from_event_loop, plugin); detach_from_event_loop (plugin); + plugin->window = NULL; } void @@ -229,6 +234,9 @@ ask_for_password (ply_boot_splash_plugin_t *plugin, { plugin->pending_password_answer = answer; + if (plugin->window != NULL) + ply_window_set_mode (plugin->window, PLY_WINDOW_MODE_TEXT); + write (STDOUT_FILENO, "\nPassword: ", strlen ("\nPassword: ")); plugin->keyboard_input_is_hidden = true; } -- 2.47.3