Send plymouth mailing list submissions to
        [email protected]

To subscribe or unsubscribe via the World Wide Web, visit
        http://lists.freedesktop.org/mailman/listinfo/plymouth
or, via email, send a message with subject or body 'help' to
        [email protected]

You can reach the person managing the list at
        [email protected]

When replying, please edit your Subject line so it is more specific
than "Re: Contents of plymouth digest..."


Today's Topics:

   1. [PATCH 10/20] [main] call deactivate_splash() even when no
      splash (Scott James Remnant)
   2. [PATCH 15/20] [fade-throbber] resume animations on
      display_normal (Scott James Remnant)
   3. [PATCH 14/20] [main] update display after reactivate
      (Scott James Remnant)
   4. [PATCH 16/20] [space-flares] resume animations on
      display_normal (Scott James Remnant)
   5. [PATCH 13/20] [client] Add new reactivate command
      (Scott James Remnant)
   6. [PATCH 12/20] [daemon] add reactivate command
      (Scott James Remnant)
   7. [PATCH 17/20] [throbgress] resume animations on
      display_normal (Scott James Remnant)
   8. [PATCH 18/20] [two-step] resume animations on display_normal
      (Scott James Remnant)


----------------------------------------------------------------------

Message: 1
Date: Thu, 18 Mar 2010 20:40:58 +0000
From: Scott James Remnant <[email protected]>
Subject: [PATCH 10/20] [main] call deactivate_splash() even when no
        splash
To: [email protected]
Message-ID:
        
<084d042dec95e17432a97f7add43cfc7600f8e04.1268946935.git.sc...@ubuntu.com>
        

To allow deactivate_splash() to do more than affect the boot splash
plugin and renderer, call it from the deactivate path when there is
no boot splash screen as well.
---
 src/main.c |    7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/src/main.c b/src/main.c
index c320842..4b06309 100644
--- a/src/main.c
+++ b/src/main.c
@@ -735,9 +735,10 @@ deactivate_splash (state_t *state)
   ply_trace ("quitting splash");
   quit_splash (state);
 
+  state->is_inactive = true;
+
   ply_trigger_pull (state->deactivate_trigger, NULL);
   state->deactivate_trigger = NULL;
-  state->is_inactive = true;
 }
 
 static void
@@ -792,8 +793,8 @@ on_deactivate (state_t       *state,
     }
   else
     {
-      ply_trigger_pull (state->deactivate_trigger, NULL);
-      state->deactivate_trigger = NULL;
+      ply_trace ("deactivating splash");
+      deactivate_splash (state);
     }
 }
 
-- 
1.7.0



------------------------------

Message: 2
Date: Thu, 18 Mar 2010 20:58:57 +0000
From: Scott James Remnant <[email protected]>
Subject: [PATCH 15/20] [fade-throbber] resume animations on
        display_normal
To: [email protected]
Message-ID:
        
<e839dfce8b8e3b1ea3361485fa38184fb451f7c1.1268946935.git.sc...@ubuntu.com>
        

Change the display_normal() function so that rather than being a no-op
if we already saved the state as normal, it restarts any animations and
redraws the views.

The only thing we now do if the state is not previously the same is
hide any prompt.

This allows this to be used to reanimate the plugin on reactivate.
---
 src/plugins/splash/fade-throbber/plugin.c |   14 ++++++--------
 1 files changed, 6 insertions(+), 8 deletions(-)

diff --git a/src/plugins/splash/fade-throbber/plugin.c 
b/src/plugins/splash/fade-throbber/plugin.c
index 2e3221e..639fce8 100644
--- a/src/plugins/splash/fade-throbber/plugin.c
+++ b/src/plugins/splash/fade-throbber/plugin.c
@@ -1038,14 +1038,12 @@ static void
 display_normal (ply_boot_splash_plugin_t *plugin)
 {
   pause_views (plugin);
-  if (plugin->state ==  PLY_BOOT_SPLASH_DISPLAY_QUESTION_ENTRY ||
-      plugin->state ==  PLY_BOOT_SPLASH_DISPLAY_PASSWORD_ENTRY)
-    {
-      plugin->state = PLY_BOOT_SPLASH_DISPLAY_NORMAL;
-      hide_prompt (plugin);
-      start_animation (plugin);
-      redraw_views (plugin);
-    }
+  if (plugin->state != PLY_BOOT_SPLASH_DISPLAY_NORMAL)
+    hide_prompt (plugin);
+
+  plugin->state = PLY_BOOT_SPLASH_DISPLAY_NORMAL;
+  start_animation (plugin);
+  redraw_views (plugin);
   unpause_views (plugin);
 }
 
-- 
1.7.0



------------------------------

Message: 3
Date: Thu, 18 Mar 2010 20:58:01 +0000
From: Scott James Remnant <[email protected]>
Subject: [PATCH 14/20] [main] update display after reactivate
To: [email protected]
Message-ID:
        
<9a2f9b9057d85a5d6223fb301280a10cf70f9c32.1268946935.git.sc...@ubuntu.com>
        

Since deactivate uses on_boot_splash_idle, there's a good chance that
plugins will have stopped animating.  Prod them to animate again by
calling update_display()
---
 src/main.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/src/main.c b/src/main.c
index 6e95c4c..378bdaa 100644
--- a/src/main.c
+++ b/src/main.c
@@ -849,6 +849,8 @@ on_reactivate (state_t *state)
     }
 
   state->is_inactive = false;
+
+  update_display (state);
 }
 
 static void
-- 
1.7.0



------------------------------

Message: 4
Date: Thu, 18 Mar 2010 21:00:31 +0000
From: Scott James Remnant <[email protected]>
Subject: [PATCH 16/20] [space-flares] resume animations on
        display_normal
To: [email protected]
Message-ID:
        
<84f9acfcb3ec947accabb418c23b176f2c0862fa.1268946935.git.sc...@ubuntu.com>
        

Change the display_normal() function so that rather than being a no-op
if we already saved the state as normal, it restarts any animations and
redraws the views.

The only thing we now do if the state is not previously the same is
hide any prompt.

This allows this to be used to reanimate the plugin on reactivate.
---
 src/plugins/splash/space-flares/plugin.c |   11 +++++------
 1 files changed, 5 insertions(+), 6 deletions(-)

diff --git a/src/plugins/splash/space-flares/plugin.c 
b/src/plugins/splash/space-flares/plugin.c
index c13bead..4bfe834 100644
--- a/src/plugins/splash/space-flares/plugin.c
+++ b/src/plugins/splash/space-flares/plugin.c
@@ -1841,12 +1841,11 @@ display_normal (ply_boot_splash_plugin_t *plugin)
 {
   pause_views (plugin);
   if (plugin->state != PLY_BOOT_SPLASH_DISPLAY_NORMAL)
-    {
-      plugin->state = PLY_BOOT_SPLASH_DISPLAY_NORMAL;
-      hide_prompt (plugin);
-      start_animation (plugin);
-      redraw_views (plugin);
-    }
+    hide_prompt (plugin);
+
+  plugin->state = PLY_BOOT_SPLASH_DISPLAY_NORMAL;
+  start_animation (plugin);
+  redraw_views (plugin);
   unpause_views (plugin);
 }
 
-- 
1.7.0



------------------------------

Message: 5
Date: Thu, 18 Mar 2010 20:56:39 +0000
From: Scott James Remnant <[email protected]>
Subject: [PATCH 13/20] [client] Add new reactivate command
To: [email protected]
Message-ID:
        
<1b71a00a1c424aa8942e7562bd154a2bb164e5fd.1268946935.git.sc...@ubuntu.com>
        

This tells the daemon to reactivate itself after having previously
been suspended by the deactivate command.
---
 src/client/ply-boot-client.c |   12 ++++++++++++
 src/client/ply-boot-client.h |    4 ++++
 src/client/plymouth.c        |   16 ++++++++++++++++
 3 files changed, 32 insertions(+), 0 deletions(-)

diff --git a/src/client/ply-boot-client.c b/src/client/ply-boot-client.c
index fef7fb1..58c5e44 100644
--- a/src/client/ply-boot-client.c
+++ b/src/client/ply-boot-client.c
@@ -675,6 +675,18 @@ ply_boot_client_tell_daemon_to_deactivate 
(ply_boot_client_t                  *c
 }
 
 void
+ply_boot_client_tell_daemon_to_reactivate (ply_boot_client_t                  
*client,
+                                           ply_boot_client_response_handler_t  
handler,
+                                           ply_boot_client_response_handler_t  
failed_handler,
+                                           void                               
*user_data)
+{
+  assert (client != NULL);
+
+  ply_boot_client_queue_request (client, 
PLY_BOOT_PROTOCOL_REQUEST_TYPE_REACTIVATE,
+                                 NULL, handler, failed_handler, user_data);
+}
+
+void
 ply_boot_client_tell_daemon_to_quit (ply_boot_client_t                  
*client,
                                      bool                                
retain_splash,
                                      ply_boot_client_response_handler_t  
handler,
diff --git a/src/client/ply-boot-client.h b/src/client/ply-boot-client.h
index 0e9122c..046b6f7 100644
--- a/src/client/ply-boot-client.h
+++ b/src/client/ply-boot-client.h
@@ -108,6 +108,10 @@ void ply_boot_client_tell_daemon_to_deactivate 
(ply_boot_client_t
                                                 
ply_boot_client_response_handler_t  handler,
                                                 
ply_boot_client_response_handler_t  failed_handler,
                                                 void                           
    *user_data);
+void ply_boot_client_tell_daemon_to_reactivate (ply_boot_client_t              
    *client,
+                                                
ply_boot_client_response_handler_t  handler,
+                                                
ply_boot_client_response_handler_t  failed_handler,
+                                                void                           
    *user_data);
 void ply_boot_client_tell_daemon_to_quit (ply_boot_client_t                  
*client,
                                           bool                                
retain_splash,
                                           ply_boot_client_response_handler_t  
handler,
diff --git a/src/client/plymouth.c b/src/client/plymouth.c
index a520901..5dffba8 100644
--- a/src/client/plymouth.c
+++ b/src/client/plymouth.c
@@ -679,6 +679,17 @@ on_deactivate_request (state_t    *state,
 }
 
 static void
+on_reactivate_request (state_t    *state,
+                       const char *command)
+{
+  ply_boot_client_tell_daemon_to_reactivate (state->client,
+                                             
(ply_boot_client_response_handler_t)
+                                             on_success,
+                                             
(ply_boot_client_response_handler_t)
+                                             on_failure, state);
+}
+
+static void
 on_quit_request (state_t    *state,
                  const char *command)
 {
@@ -827,6 +838,11 @@ main (int    argc,
                                   on_deactivate_request, &state, NULL);
 
   ply_command_parser_add_command (state.command_parser,
+                                  "reactivate", "Tell boot daemon to 
reactivate",
+                                  (ply_command_handler_t)
+                                  on_reactivate_request, &state, NULL);
+
+  ply_command_parser_add_command (state.command_parser,
                                   "quit", "Tell boot daemon to quit",
                                   (ply_command_handler_t)
                                   on_quit_request, &state,
-- 
1.7.0



------------------------------

Message: 6
Date: Thu, 18 Mar 2010 20:53:39 +0000
From: Scott James Remnant <[email protected]>
Subject: [PATCH 12/20] [daemon] add reactivate command
To: [email protected]
Message-ID:
        
<fc1e80eabbb6bd221d1f017aaf4f036a30cec7e8.1268946935.git.sc...@ubuntu.com>
        

More for debugging and completeness than anything else, add a
"reactivate" command to the daemon that undoes the effects of
deactivate and continues the splash screen on its way.

Another possible use for this could be (for example) providing a
seamless shutdown experience.

A future commit will implement the client bits needed.
---
 src/main.c              |   35 +++++++++++++++++++++++++++++++++++
 src/ply-boot-protocol.h |    1 +
 src/ply-boot-server.c   |   20 ++++++++++++++++++--
 src/ply-boot-server.h   |    3 +++
 4 files changed, 57 insertions(+), 2 deletions(-)

diff --git a/src/main.c b/src/main.c
index 29408d3..6e95c4c 100644
--- a/src/main.c
+++ b/src/main.c
@@ -818,6 +818,40 @@ on_deactivate (state_t       *state,
 }
 
 static void
+on_reactivate (state_t *state)
+{
+  if (!state->is_inactive)
+    return;
+
+  if (state->terminal != NULL)
+    {
+      ply_terminal_watch_for_vt_changes (state->terminal);
+      ply_terminal_set_unbuffered_input (state->terminal);
+      ply_terminal_ignore_mode_changes (state->terminal, false);
+    }
+
+  if ((state->session != NULL) && state->should_be_attached)
+    {
+      ply_trace ("reactivating terminal session");
+      attach_to_running_session (state);
+    }
+
+  if (state->keyboard != NULL)
+    {
+      ply_trace ("activating keyboard");
+      ply_keyboard_watch_for_input (state->keyboard);
+    }
+
+  if (state->renderer != NULL)
+    {
+      ply_trace ("activating renderer");
+      ply_renderer_activate (state->renderer);
+    }
+
+  state->is_inactive = false;
+}
+
+static void
 on_quit (state_t       *state,
          bool           retain_splash,
          ply_trigger_t *quit_trigger)
@@ -873,6 +907,7 @@ start_boot_server (state_t *state)
                                 (ply_boot_server_system_initialized_handler_t) 
on_system_initialized,
                                 (ply_boot_server_error_handler_t) on_error,
                                 (ply_boot_server_deactivate_handler_t) 
on_deactivate,
+                                (ply_boot_server_reactivate_handler_t) 
on_reactivate,
                                 (ply_boot_server_quit_handler_t) on_quit,
                                 state);
 
diff --git a/src/ply-boot-protocol.h b/src/ply-boot-protocol.h
index 6be7218..594c25c 100644
--- a/src/ply-boot-protocol.h
+++ b/src/ply-boot-protocol.h
@@ -27,6 +27,7 @@
 #define PLY_BOOT_PROTOCOL_REQUEST_TYPE_UPDATE "U"
 #define PLY_BOOT_PROTOCOL_REQUEST_TYPE_SYSTEM_INITIALIZED "S"
 #define PLY_BOOT_PROTOCOL_REQUEST_TYPE_DEACTIVATE "D"
+#define PLY_BOOT_PROTOCOL_REQUEST_TYPE_REACTIVATE "d"
 #define PLY_BOOT_PROTOCOL_REQUEST_TYPE_QUIT "Q"
 #define PLY_BOOT_PROTOCOL_REQUEST_TYPE_PASSWORD "*"
 #define PLY_BOOT_PROTOCOL_REQUEST_TYPE_CACHED_PASSWORD "c"
diff --git a/src/ply-boot-server.c b/src/ply-boot-server.c
index 6cab887..bd24836 100644
--- a/src/ply-boot-server.c
+++ b/src/ply-boot-server.c
@@ -66,6 +66,7 @@ struct _ply_boot_server
   ply_boot_server_progress_pause_handler_t progress_pause_handler;
   ply_boot_server_progress_unpause_handler_t progress_unpause_handler;
   ply_boot_server_deactivate_handler_t deactivate_handler;
+  ply_boot_server_reactivate_handler_t reactivate_handler;
   ply_boot_server_quit_handler_t quit_handler;
   void *user_data;
 
@@ -85,8 +86,9 @@ ply_boot_server_new (ply_boot_server_update_handler_t  
update_handler,
                      ply_boot_server_hide_splash_handler_t hide_splash_handler,
                      ply_boot_server_newroot_handler_t newroot_handler,
                      ply_boot_server_system_initialized_handler_t 
initialized_handler,
-                     ply_boot_server_error_handler_t   error_handler,
-                     ply_boot_server_deactivate_handler_t    
deactivate_handler,
+                     ply_boot_server_error_handler_t error_handler,
+                     ply_boot_server_deactivate_handler_t deactivate_handler,
+                     ply_boot_server_reactivate_handler_t reactivate_handler,
                      ply_boot_server_quit_handler_t    quit_handler,
                      void                             *user_data)
 {
@@ -111,6 +113,7 @@ ply_boot_server_new (ply_boot_server_update_handler_t  
update_handler,
   server->show_splash_handler = show_splash_handler;
   server->hide_splash_handler = hide_splash_handler;
   server->deactivate_handler = deactivate_handler;
+  server->reactivate_handler = reactivate_handler;
   server->quit_handler = quit_handler;
   server->user_data = user_data;
 
@@ -388,6 +391,12 @@ ply_boot_connection_on_request (ply_boot_connection_t 
*connection)
       free (command);
       return;
     }
+  else if (strcmp (command, PLY_BOOT_PROTOCOL_REQUEST_TYPE_REACTIVATE) == 0)
+    {
+      ply_trace ("got reactivate request");
+      if (server->reactivate_handler != NULL)
+        server->reactivate_handler (server->user_data, server);
+    }
   else if (strcmp (command, PLY_BOOT_PROTOCOL_REQUEST_TYPE_QUIT) == 0)
     {
       bool retain_splash;
@@ -722,6 +731,12 @@ on_deactivate (ply_event_loop_t *loop)
 }
 
 static void
+on_reactivate (ply_event_loop_t *loop)
+{
+  printf ("got reactivate request\n");
+}
+
+static void
 on_quit (ply_event_loop_t *loop)
 {
   printf ("got quit request, quiting...\n");
@@ -814,6 +829,7 @@ main (int    argc,
                                 (ply_boot_server_system_initialized_handler_t) 
on_system_initialized,
                                 (ply_boot_server_error_handler_t) on_error,
                                 (ply_boot_server_deactivate_handler_t) 
on_deactivate,
+                                (ply_boot_server_reactivate_handler_t) 
on_reactivate,
                                 (ply_boot_server_quit_handler_t) on_quit,
                                 loop);
 
diff --git a/src/ply-boot-server.h b/src/ply-boot-server.h
index f2f815a..7ea8fc6 100644
--- a/src/ply-boot-server.h
+++ b/src/ply-boot-server.h
@@ -83,6 +83,8 @@ typedef void (* ply_boot_server_error_handler_t) (void        
      *user_data,
 typedef void (* ply_boot_server_deactivate_handler_t) (void              
*user_data,
                                                        ply_trigger_t     
*deactivate_trigger,
                                                        ply_boot_server_t 
*server);
+typedef void (* ply_boot_server_reactivate_handler_t) (void              
*user_data,
+                                                       ply_boot_server_t 
*server);
 typedef void (* ply_boot_server_quit_handler_t) (void              *user_data,
                                                  bool               
retain_splash,
                                                  ply_trigger_t     
*quit_trigger,
@@ -103,6 +105,7 @@ ply_boot_server_t *ply_boot_server_new 
(ply_boot_server_update_handler_t update_
                                         
ply_boot_server_system_initialized_handler_t initialized_handler,
                                         ply_boot_server_error_handler_t 
error_handler,
                                         ply_boot_server_deactivate_handler_t 
deactivate_handler,
+                                        ply_boot_server_reactivate_handler_t 
reactivate_handler,
                                         ply_boot_server_quit_handler_t 
quit_handler,
                                         void                        
*user_data);
 
-- 
1.7.0



------------------------------

Message: 7
Date: Thu, 18 Mar 2010 21:01:07 +0000
From: Scott James Remnant <[email protected]>
Subject: [PATCH 17/20] [throbgress] resume animations on
        display_normal
To: [email protected]
Message-ID:
        
<e935fa16efd1e271ca69761dc1f70a929438dd49.1268946935.git.sc...@ubuntu.com>
        

Change the display_normal() function so that rather than being a no-op
if we already saved the state as normal, it restarts any animations and
redraws the views.

The only thing we now do if the state is not previously the same is
hide any prompt.

This allows this to be used to reanimate the plugin on reactivate.
---
 src/plugins/splash/throbgress/plugin.c |   11 +++++------
 1 files changed, 5 insertions(+), 6 deletions(-)

diff --git a/src/plugins/splash/throbgress/plugin.c 
b/src/plugins/splash/throbgress/plugin.c
index 02b334d..03b08cb 100644
--- a/src/plugins/splash/throbgress/plugin.c
+++ b/src/plugins/splash/throbgress/plugin.c
@@ -820,12 +820,11 @@ display_normal (ply_boot_splash_plugin_t *plugin)
 {
   pause_views (plugin);
   if (plugin->state != PLY_BOOT_SPLASH_DISPLAY_NORMAL)
-    {
-      plugin->state = PLY_BOOT_SPLASH_DISPLAY_NORMAL;
-      hide_prompt (plugin);
-      start_animation (plugin);
-      redraw_views (plugin);
-    }
+    hide_prompt (plugin);
+
+  plugin->state = PLY_BOOT_SPLASH_DISPLAY_NORMAL;
+  start_animation (plugin);
+  redraw_views (plugin);
   unpause_views (plugin);
 }
 
-- 
1.7.0



------------------------------

Message: 8
Date: Thu, 18 Mar 2010 21:01:23 +0000
From: Scott James Remnant <[email protected]>
Subject: [PATCH 18/20] [two-step] resume animations on display_normal
To: [email protected]
Message-ID:
        
<cd505c8994aa14d6773f6a037b72bfc658fbeda3.1268946935.git.sc...@ubuntu.com>
        

Change the display_normal() function so that rather than being a no-op
if we already saved the state as normal, it restarts any animations and
redraws the views.

The only thing we now do if the state is not previously the same is
hide any prompt.

This allows this to be used to reanimate the plugin on reactivate.
---
 src/plugins/splash/two-step/plugin.c |   10 ++++------
 1 files changed, 4 insertions(+), 6 deletions(-)

diff --git a/src/plugins/splash/two-step/plugin.c 
b/src/plugins/splash/two-step/plugin.c
index 967eac9..27253d6 100644
--- a/src/plugins/splash/two-step/plugin.c
+++ b/src/plugins/splash/two-step/plugin.c
@@ -1045,13 +1045,11 @@ display_normal (ply_boot_splash_plugin_t *plugin)
 {
   pause_views (plugin);
   if (plugin->state != PLY_BOOT_SPLASH_DISPLAY_NORMAL)
-    {
-      plugin->state = PLY_BOOT_SPLASH_DISPLAY_NORMAL;
-      hide_prompt (plugin);
-      start_progress_animation (plugin);
+    hide_prompt (plugin);
 
-      redraw_views (plugin);
-    }
+  plugin->state = PLY_BOOT_SPLASH_DISPLAY_NORMAL;
+  start_progress_animation (plugin);
+  redraw_views (plugin);
   unpause_views (plugin);
 }
 
-- 
1.7.0



------------------------------

_______________________________________________
plymouth mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/plymouth


End of plymouth Digest, Vol 17, Issue 14
****************************************

Reply via email to