[PATCH 11/20] [main] don't quit splash on deactivate

Scott James Remnant scott at ubuntu.com
Thu Mar 18 13:43:48 PDT 2010


Currently deactivate is mostly like hide splash, except it deactivates
the renderer first and doesn't reset the VT to text mode and dump the
details plugin over top.

Unfortunately this means that the renderer is closed and freed, and in
the case of the Intel DRM renderer, closing the DRM file descriptor
means that the kernel frees the buffers and restores the fbcon buffer
on our screen - losing the smooth transition.

This now changes deactivate such that it leaves the boot splash open,
but in an inactivate state, with the DRM connection still open, etc.
now the fbcon contents are not restored.

We deliberately stop watching for keyboard input, detach any logging
session from the console, take the VT out of VT_PROCESS mode and
put it back into cooked mode, etc.

This means the X server can be started, and this state can be cleaned
up by calling plymouth quit with affecting X.
---
 src/main.c |   23 +++++++++++++++++++++--
 1 files changed, 21 insertions(+), 2 deletions(-)

diff --git a/src/main.c b/src/main.c
index 4b06309..29408d3 100644
--- a/src/main.c
+++ b/src/main.c
@@ -732,8 +732,27 @@ deactivate_splash (state_t *state)
       ply_renderer_deactivate (state->renderer);
     }
 
-  ply_trace ("quitting splash");
-  quit_splash (state);
+  if (state->keyboard != NULL)
+    {
+      ply_trace ("deactivating keyboard");
+      ply_keyboard_stop_watching_for_input (state->keyboard);
+    }
+
+  if ((state->session != NULL) && state->is_attached)
+    {
+      ply_trace ("deactivating terminal session");
+      ply_terminal_session_detach (state->session);
+      state->is_redirected = false;
+      state->is_attached = false;
+    }
+
+  if (state->terminal != NULL)
+    {
+      ply_trace ("deactivating terminal");
+      ply_terminal_stop_watching_for_vt_changes (state->terminal);
+      ply_terminal_set_buffered_input (state->terminal);
+      ply_terminal_ignore_mode_changes (state->terminal, true);
+    }
 
   state->is_inactive = true;
 
-- 
1.7.0



More information about the plymouth mailing list