From 32e38080da2eb38acfc8b0048c8bae6821290ce8 Mon Sep 17 00:00:00 2001 From: Hans de Goede Date: Tue, 3 Jul 2018 09:06:21 +0200 Subject: [PATCH] main: Consistently only (de)activate renderers if the splash uses pixel displays We do not want to re-activate renderers on a re-activate if we were using a text based splash or don't have a splash yet at all. Deactivating renderers actually also has some side-effects, for some backends the backend->activate() callback is not called on the first activate() doing a deactivate() before this changes the init sequence for the first bringup of the renderer. So lets be consistent and also only deactivate renderers if we've a boot-splash which uses pixel displays and thus have activated them first. Signed-off-by: Hans de Goede --- src/main.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/main.c b/src/main.c index 38ba625..68f819b 100644 --- a/src/main.c +++ b/src/main.c @@ -1181,7 +1181,8 @@ quit_splash (state_t *state) static void hide_splash (state_t *state) { - ply_device_manager_deactivate_renderers (state->device_manager); + if (state->boot_splash && ply_boot_splash_uses_pixel_displays (state->boot_splash)) + ply_device_manager_deactivate_renderers (state->device_manager); state->is_shown = false; @@ -1267,7 +1268,8 @@ deactivate_splash (state_t *state) { assert (!state->is_inactive); - ply_device_manager_deactivate_renderers (state->device_manager); + if (state->boot_splash && ply_boot_splash_uses_pixel_displays (state->boot_splash)) + ply_device_manager_deactivate_renderers (state->device_manager); detach_from_running_session (state); @@ -1366,7 +1368,8 @@ on_reactivate (state_t *state) } ply_device_manager_activate_keyboards (state->device_manager); - ply_device_manager_activate_renderers (state->device_manager); + if (state->boot_splash && ply_boot_splash_uses_pixel_displays (state->boot_splash)) + ply_device_manager_activate_renderers (state->device_manager); state->is_inactive = false; -- 2.17.1