From 644ca1a68ec273ae129c388f0e0365520b433420 Mon Sep 17 00:00:00 2001 From: Hans de Goede Date: Mon, 25 Jun 2018 17:06:58 +0200 Subject: [PATCH 2/3] main: Do not activate renderers when showing details When showing-details, we want to stay in text-mode and activating the renderers (and if using the drm-renderer becoming master) is not useful. Note the checking of showing_details in show_theme() requires it to be set before show_theme() gets called, so the setting of showing_details is moved into show_default_splash) and show_default_splash(). Signed-off-by: Hans de Goede --- src/main.c | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/src/main.c b/src/main.c index 841fe6b..4647d52 100644 --- a/src/main.c +++ b/src/main.c @@ -364,6 +364,8 @@ show_detailed_splash (state_t *state) if (state->boot_splash != NULL) return; + state->showing_details = true; + ply_trace ("Showing detailed splash screen"); splash = show_theme (state, NULL); @@ -504,6 +506,8 @@ show_default_splash (state_t *state) if (state->boot_splash != NULL) return; + state->showing_details = false; + ply_trace ("Showing splash screen"); if (state->override_splash_path != NULL) { ply_trace ("Trying override splash at '%s'", state->override_splash_path); @@ -1005,13 +1009,10 @@ show_splash (state_t *state) } } - if (plymouth_should_show_default_splash (state)) { + if (plymouth_should_show_default_splash (state)) show_default_splash (state); - state->showing_details = false; - } else { + else show_detailed_splash (state); - state->showing_details = true; - } } static void @@ -1359,7 +1360,8 @@ on_reactivate (state_t *state) } ply_device_manager_activate_keyboards (state->device_manager); - ply_device_manager_activate_renderers (state->device_manager); + if (!state->showing_details) + ply_device_manager_activate_renderers (state->device_manager); state->is_inactive = false; @@ -1507,13 +1509,10 @@ toggle_between_splash_and_details (state_t *state) state->boot_splash = NULL; } - if (!state->showing_details) { - show_detailed_splash (state); - state->showing_details = true; - } else { + if (state->showing_details) show_default_splash (state); - state->showing_details = false; - } + else + show_detailed_splash (state); } static void @@ -1763,7 +1762,8 @@ show_theme (state_t *state, return NULL; attach_splash_to_devices (state, splash); - ply_device_manager_activate_renderers (state->device_manager); + if (!state->showing_details) + ply_device_manager_activate_renderers (state->device_manager); splash_mode = get_splash_mode_from_mode (state->mode); -- 2.17.1