Blob Blame History Raw
commit 48a6bfa3bbed72d052324daa44e50bfb41b68efb
Author: Kristian Høgsberg <krh@redhat.com>
Date:   Mon Jun 16 16:37:23 2008 -0400

    Factor out background drawing code in throbber helper.

diff --git a/src/libplybootsplash/ply-throbber.c b/src/libplybootsplash/ply-throbber.c
index 2349864..0dd6dc5 100644
--- a/src/libplybootsplash/ply-throbber.c
+++ b/src/libplybootsplash/ply-throbber.c
@@ -122,6 +122,14 @@ ply_throbber_free (ply_throbber_t *throbber)
 }
 
 static void
+draw_background (ply_throbber_t *throbber)
+{
+  ply_frame_buffer_fill_with_gradient (throbber->frame_buffer, &throbber->frame_area,
+                                       PLYMOUTH_BACKGROUND_START_COLOR,
+                                       PLYMOUTH_BACKGROUND_END_COLOR);
+}
+
+static void
 animate_at_time (ply_throbber_t *throbber,
                  double      time)
 {
@@ -141,9 +149,7 @@ animate_at_time (ply_throbber_t *throbber,
 
   ply_frame_buffer_pause_updates (throbber->frame_buffer);
   if (throbber->frame_area.width > 0)
-    ply_frame_buffer_fill_with_gradient (throbber->frame_buffer, &throbber->frame_area,
-                                         PLYMOUTH_BACKGROUND_START_COLOR,
-                                         PLYMOUTH_BACKGROUND_END_COLOR);
+    draw_background (throbber);
 
   frames = (ply_image_t * const *) ply_array_get_elements (throbber->frames);
 
@@ -305,8 +311,8 @@ void
 ply_throbber_stop (ply_throbber_t *throbber)
 {
   if (throbber->frame_area.width > 0)
-    ply_frame_buffer_fill_with_hex_color (throbber->frame_buffer, &throbber->frame_area,
-                                          PLYMOUTH_BACKGROUND_COLOR);
+    draw_background (throbber);
+
   throbber->frame_buffer = NULL;
   throbber->window = NULL;
 

commit 34862aa8d3711c207f62b125fd37ceb5597451d9
Author: Kristian Høgsberg <krh@redhat.com>
Date:   Mon Jun 16 17:14:58 2008 -0400

    Don't go to text mode on exit.

diff --git a/src/libplybootsplash/ply-window.c b/src/libplybootsplash/ply-window.c
index e0d90c0..62dd73c 100644
--- a/src/libplybootsplash/ply-window.c
+++ b/src/libplybootsplash/ply-window.c
@@ -338,8 +338,6 @@ ply_window_open (ply_window_t *window)
 void
 ply_window_close (ply_window_t *window)
 {
-  ply_window_set_mode (window, PLY_WINDOW_MODE_TEXT);
-
   if (ply_frame_buffer_device_is_open (window->frame_buffer))
     ply_frame_buffer_close (window->frame_buffer);
 
@@ -408,7 +406,6 @@ ply_window_free (ply_window_t *window)
                                            ply_window_detach_from_event_loop,
                                            window);
 
-  ply_window_set_mode (window, PLY_WINDOW_MODE_TEXT);
   ply_window_close (window);
 
   ply_buffer_free (window->keyboard_input_buffer);
diff --git a/src/splash-plugins/spinfinity/plugin.c b/src/splash-plugins/spinfinity/plugin.c
index fe8f644..454071b 100644
--- a/src/splash-plugins/spinfinity/plugin.c
+++ b/src/splash-plugins/spinfinity/plugin.c
@@ -243,8 +243,6 @@ static void
 detach_from_event_loop (ply_boot_splash_plugin_t *plugin)
 {
   plugin->loop = NULL;
-
-  ply_window_set_mode (plugin->window, PLY_WINDOW_MODE_TEXT);
 }
 
 void
@@ -384,9 +382,9 @@ hide_splash_screen (ply_boot_splash_plugin_t *plugin,
 
   plugin->frame_buffer = NULL;
 
-  ply_window_set_mode (plugin->window, PLY_WINDOW_MODE_TEXT);
   plugin->window = NULL;
 }
+
 static void
 draw_password_entry (ply_boot_splash_plugin_t *plugin)
 {