Blame SOURCES/fix-hide-splash.patch

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