Blame SOURCES/fix-hide-splash.patch

ff86aa
From 1628320b093e3605e91f0aa7183b6859920a0a85 Mon Sep 17 00:00:00 2001
ff86aa
From: Ray Strode <rstrode@redhat.com>
ff86aa
Date: Thu, 6 Feb 2014 14:42:40 -0500
ff86aa
Subject: [PATCH 1/2] main: don't nullify local_console_terminal in quit_splash
ff86aa
ff86aa
quit_splash gets called on hide-splash so nullify the terminal
ff86aa
will make it unavailable on later show-splash calls.
ff86aa
---
ff86aa
 src/main.c | 1 -
ff86aa
 1 file changed, 1 deletion(-)
ff86aa
ff86aa
diff --git a/src/main.c b/src/main.c
ff86aa
index 91e0649..1f9f6dd 100644
ff86aa
--- a/src/main.c
ff86aa
+++ b/src/main.c
ff86aa
@@ -1042,61 +1042,60 @@ load_devices (state_t                    *state,
ff86aa
 {
ff86aa
   state->device_manager = ply_device_manager_new (state->default_tty, flags);
ff86aa
   state->local_console_terminal = ply_device_manager_get_default_terminal (state->device_manager);
ff86aa
 
ff86aa
   ply_device_manager_watch_seats (state->device_manager,
ff86aa
                                   (ply_seat_added_handler_t)
ff86aa
                                   on_seat_added,
ff86aa
                                   (ply_seat_removed_handler_t)
ff86aa
                                   on_seat_removed,
ff86aa
                                   state);
ff86aa
 }
ff86aa
 
ff86aa
 static void
ff86aa
 quit_splash (state_t *state)
ff86aa
 {
ff86aa
   ply_trace ("quiting splash");
ff86aa
   if (state->boot_splash != NULL)
ff86aa
     {
ff86aa
       ply_trace ("freeing splash");
ff86aa
       ply_boot_splash_free (state->boot_splash);
ff86aa
       state->boot_splash = NULL;
ff86aa
     }
ff86aa
 
ff86aa
   if (state->local_console_terminal != NULL)
ff86aa
     {
ff86aa
       if (!state->should_retain_splash)
ff86aa
         {
ff86aa
           ply_trace ("Not retaining splash, so deallocating VT");
ff86aa
           ply_terminal_deactivate_vt (state->local_console_terminal);
ff86aa
         }
ff86aa
-      state->local_console_terminal = NULL;
ff86aa
     }
ff86aa
 
ff86aa
   detach_from_running_session (state);
ff86aa
 }
ff86aa
 
ff86aa
 static void
ff86aa
 hide_splash (state_t *state)
ff86aa
 {
ff86aa
   state->is_shown = false;
ff86aa
 
ff86aa
   cancel_pending_delayed_show (state);
ff86aa
 
ff86aa
   if (state->boot_splash == NULL)
ff86aa
     return;
ff86aa
 
ff86aa
   ply_boot_splash_hide (state->boot_splash);
ff86aa
 
ff86aa
   if (state->local_console_terminal != NULL)
ff86aa
     ply_terminal_set_mode (state->local_console_terminal, PLY_TERMINAL_MODE_TEXT);
ff86aa
 }
ff86aa
 
ff86aa
 static void
ff86aa
 dump_details_and_quit_splash (state_t *state)
ff86aa
 {
ff86aa
   state->showing_details = false;
ff86aa
   toggle_between_splash_and_details (state);
ff86aa
 
ff86aa
   ply_device_manager_deactivate_renderers (state->device_manager);
ff86aa
   hide_splash (state);
ff86aa
   quit_splash (state);
ff86aa
-- 
ff86aa
1.8.3.1
ff86aa
ff86aa
ff86aa
From fea0252399bf9d13e88b27b7296f263732f180fc Mon Sep 17 00:00:00 2001
ff86aa
From: Ray Strode <rstrode@redhat.com>
ff86aa
Date: Thu, 6 Feb 2014 15:22:54 -0500
ff86aa
Subject: [PATCH 2/2] main: detach from keyboard on hide-splash
ff86aa
ff86aa
Currently plymouth stays in control of the terminal
ff86aa
after hide-splash.  This is wrong.  Once plymouth is
ff86aa
hidden, the terminal should be free to use for other
ff86aa
programs.
ff86aa
ff86aa
This commit makes sure we free up the terminal on
ff86aa
hide splash.
ff86aa
---
ff86aa
 src/main.c | 3 +++
ff86aa
 1 file changed, 3 insertions(+)
ff86aa
ff86aa
diff --git a/src/main.c b/src/main.c
ff86aa
index 1f9f6dd..92a1cfd 100644
ff86aa
--- a/src/main.c
ff86aa
+++ b/src/main.c
ff86aa
@@ -1035,66 +1035,69 @@ on_seat_added (state_t    *state,
ff86aa
                                   on_enter, state);
ff86aa
 
ff86aa
 }
ff86aa
 
ff86aa
 static void
ff86aa
 load_devices (state_t                    *state,
ff86aa
               ply_device_manager_flags_t  flags)
ff86aa
 {
ff86aa
   state->device_manager = ply_device_manager_new (state->default_tty, flags);
ff86aa
   state->local_console_terminal = ply_device_manager_get_default_terminal (state->device_manager);
ff86aa
 
ff86aa
   ply_device_manager_watch_seats (state->device_manager,
ff86aa
                                   (ply_seat_added_handler_t)
ff86aa
                                   on_seat_added,
ff86aa
                                   (ply_seat_removed_handler_t)
ff86aa
                                   on_seat_removed,
ff86aa
                                   state);
ff86aa
 }
ff86aa
 
ff86aa
 static void
ff86aa
 quit_splash (state_t *state)
ff86aa
 {
ff86aa
   ply_trace ("quiting splash");
ff86aa
   if (state->boot_splash != NULL)
ff86aa
     {
ff86aa
       ply_trace ("freeing splash");
ff86aa
       ply_boot_splash_free (state->boot_splash);
ff86aa
       state->boot_splash = NULL;
ff86aa
     }
ff86aa
 
ff86aa
+  ply_device_manager_deactivate_keyboards (state->device_manager);
ff86aa
+
ff86aa
   if (state->local_console_terminal != NULL)
ff86aa
     {
ff86aa
       if (!state->should_retain_splash)
ff86aa
         {
ff86aa
           ply_trace ("Not retaining splash, so deallocating VT");
ff86aa
           ply_terminal_deactivate_vt (state->local_console_terminal);
ff86aa
+          ply_terminal_close (state->local_console_terminal);
ff86aa
         }
ff86aa
     }
ff86aa
 
ff86aa
   detach_from_running_session (state);
ff86aa
 }
ff86aa
 
ff86aa
 static void
ff86aa
 hide_splash (state_t *state)
ff86aa
 {
ff86aa
   state->is_shown = false;
ff86aa
 
ff86aa
   cancel_pending_delayed_show (state);
ff86aa
 
ff86aa
   if (state->boot_splash == NULL)
ff86aa
     return;
ff86aa
 
ff86aa
   ply_boot_splash_hide (state->boot_splash);
ff86aa
 
ff86aa
   if (state->local_console_terminal != NULL)
ff86aa
     ply_terminal_set_mode (state->local_console_terminal, PLY_TERMINAL_MODE_TEXT);
ff86aa
 }
ff86aa
 
ff86aa
 static void
ff86aa
 dump_details_and_quit_splash (state_t *state)
ff86aa
 {
ff86aa
   state->showing_details = false;
ff86aa
   toggle_between_splash_and_details (state);
ff86aa
 
ff86aa
   ply_device_manager_deactivate_renderers (state->device_manager);
ff86aa
   hide_splash (state);
ff86aa
-- 
ff86aa
1.8.3.1
ff86aa