forked from rpms/plymouth
220 lines
5.9 KiB
Diff
220 lines
5.9 KiB
Diff
diff -ur plymouth-0.6.0/src/plugins/splash/fade-in/plugin.c new/src/plugins/splash/fade-in/plugin.c
|
|
--- plymouth-0.6.0/src/plugins/splash/fade-in/plugin.c 2008-10-30 15:42:04.000000000 -0400
|
|
+++ new/src/plugins/splash/fade-in/plugin.c 2008-10-30 15:39:12.000000000 -0400
|
|
@@ -81,6 +81,8 @@
|
|
|
|
double start_time;
|
|
double now;
|
|
+
|
|
+ uint32_t is_animating : 1;
|
|
};
|
|
|
|
ply_boot_splash_plugin_t *
|
|
@@ -303,6 +305,9 @@
|
|
assert (plugin != NULL);
|
|
assert (plugin->loop != NULL);
|
|
|
|
+ if (plugin->is_animating)
|
|
+ return;
|
|
+
|
|
ply_event_loop_watch_for_timeout (plugin->loop,
|
|
1.0 / FRAMES_PER_SECOND,
|
|
(ply_event_loop_timeout_handler_t)
|
|
@@ -310,6 +315,8 @@
|
|
|
|
plugin->start_time = ply_get_timestamp ();
|
|
draw_background (plugin, NULL);
|
|
+
|
|
+ plugin->is_animating = true;
|
|
}
|
|
|
|
static void
|
|
@@ -320,6 +327,11 @@
|
|
assert (plugin != NULL);
|
|
assert (plugin->loop != NULL);
|
|
|
|
+ if (!plugin->is_animating)
|
|
+ return;
|
|
+
|
|
+ plugin->is_animating = false;
|
|
+
|
|
for (i = 0; i < 10; i++)
|
|
{
|
|
ply_frame_buffer_fill_with_hex_color_at_opacity (plugin->frame_buffer,
|
|
diff -ur plymouth-0.6.0/src/plugins/splash/pulser/plugin.c new/src/plugins/splash/pulser/plugin.c
|
|
--- plymouth-0.6.0/src/plugins/splash/pulser/plugin.c 2008-10-16 15:59:36.000000000 -0400
|
|
+++ new/src/plugins/splash/pulser/plugin.c 2008-10-30 15:40:23.000000000 -0400
|
|
@@ -67,6 +67,7 @@
|
|
ply_text_pulser_t *pulser;
|
|
|
|
uint32_t keyboard_input_is_hidden : 1;
|
|
+ uint32_t is_animating : 1;
|
|
};
|
|
void hide_splash_screen (ply_boot_splash_plugin_t *plugin,
|
|
ply_event_loop_t *loop);
|
|
@@ -119,6 +120,9 @@
|
|
assert (plugin != NULL);
|
|
assert (plugin->loop != NULL);
|
|
|
|
+ if (plugin->is_animating)
|
|
+ return;
|
|
+
|
|
ply_window_set_color_hex_value (plugin->window,
|
|
PLY_WINDOW_COLOR_BROWN,
|
|
PLYMOUTH_BACKGROUND_END_COLOR);
|
|
@@ -142,6 +146,8 @@
|
|
plugin->window,
|
|
window_width / 2.0 - width / 2.0,
|
|
window_height / 2.0 - height / 2.0);
|
|
+
|
|
+ plugin->is_animating = true;
|
|
}
|
|
|
|
static void
|
|
@@ -150,6 +156,11 @@
|
|
assert (plugin != NULL);
|
|
assert (plugin->loop != NULL);
|
|
|
|
+ if (!plugin->is_animating)
|
|
+ return;
|
|
+
|
|
+ plugin->is_animating = false;
|
|
+
|
|
ply_text_pulser_stop (plugin->pulser);
|
|
}
|
|
|
|
diff -ur plymouth-0.6.0/src/plugins/splash/solar/plugin.c new/src/plugins/splash/solar/plugin.c
|
|
--- plymouth-0.6.0/src/plugins/splash/solar/plugin.c 2008-10-30 15:42:04.000000000 -0400
|
|
+++ new/src/plugins/splash/solar/plugin.c 2008-10-30 15:39:12.000000000 -0400
|
|
@@ -187,6 +187,7 @@
|
|
|
|
uint32_t root_is_mounted : 1;
|
|
uint32_t is_visible : 1;
|
|
+ uint32_t is_animating : 1;
|
|
};
|
|
|
|
static void detach_from_event_loop (ply_boot_splash_plugin_t *plugin);
|
|
@@ -759,6 +760,9 @@
|
|
assert (plugin != NULL);
|
|
assert (plugin->loop != NULL);
|
|
|
|
+ if (plugin->is_animating)
|
|
+ return;
|
|
+
|
|
ply_frame_buffer_get_size (plugin->frame_buffer, &area);
|
|
|
|
plugin->now = ply_get_timestamp ();
|
|
@@ -766,6 +770,7 @@
|
|
on_timeout (plugin);
|
|
ply_window_draw_area (plugin->window, area.x, area.y, area.width, area.height);
|
|
|
|
+ plugin->is_animating = true;
|
|
}
|
|
|
|
static void
|
|
@@ -778,6 +783,11 @@
|
|
assert (plugin != NULL);
|
|
assert (plugin->loop != NULL);
|
|
|
|
+ if (!plugin->is_animating)
|
|
+ return;
|
|
+
|
|
+ plugin->is_animating = false;
|
|
+
|
|
if (plugin->loop != NULL)
|
|
{
|
|
ply_event_loop_stop_watching_for_timeout (plugin->loop,
|
|
@@ -796,7 +806,6 @@
|
|
free_sprite (sprite);
|
|
}
|
|
ply_list_remove_all_nodes (plugin->sprites);
|
|
-
|
|
}
|
|
|
|
static void
|
|
diff -ur plymouth-0.6.0/src/plugins/splash/spinfinity/plugin.c new/src/plugins/splash/spinfinity/plugin.c
|
|
--- plymouth-0.6.0/src/plugins/splash/spinfinity/plugin.c 2008-10-21 09:09:39.000000000 -0400
|
|
+++ new/src/plugins/splash/spinfinity/plugin.c 2008-10-30 15:38:20.000000000 -0400
|
|
@@ -86,6 +86,7 @@
|
|
|
|
uint32_t root_is_mounted : 1;
|
|
uint32_t is_visible : 1;
|
|
+ uint32_t is_animating : 1;
|
|
};
|
|
|
|
static void detach_from_event_loop (ply_boot_splash_plugin_t *plugin);
|
|
@@ -183,6 +184,9 @@
|
|
assert (plugin != NULL);
|
|
assert (plugin->loop != NULL);
|
|
|
|
+ if (plugin->is_animating)
|
|
+ return;
|
|
+
|
|
draw_background (plugin, NULL);
|
|
draw_logo (plugin);
|
|
|
|
@@ -198,6 +202,8 @@
|
|
ply_progress_bar_show (plugin->progress_bar,
|
|
plugin->window,
|
|
0, area.height - ply_progress_bar_get_height (plugin->progress_bar));
|
|
+
|
|
+ plugin->is_animating = true;
|
|
}
|
|
|
|
static void
|
|
@@ -209,6 +215,11 @@
|
|
assert (plugin != NULL);
|
|
assert (plugin->loop != NULL);
|
|
|
|
+ if (!plugin->is_animating)
|
|
+ return;
|
|
+
|
|
+ plugin->is_animating = false;
|
|
+
|
|
ply_progress_bar_hide (plugin->progress_bar);
|
|
ply_throbber_stop (plugin->throbber, trigger);
|
|
|
|
diff -ur plymouth-0.6.0/src/plugins/splash/text/plugin.c new/src/plugins/splash/text/plugin.c
|
|
--- plymouth-0.6.0/src/plugins/splash/text/plugin.c 2008-10-16 15:59:36.000000000 -0400
|
|
+++ new/src/plugins/splash/text/plugin.c 2008-10-30 15:41:23.000000000 -0400
|
|
@@ -68,6 +68,7 @@
|
|
ply_text_progress_bar_t *progress_bar;
|
|
|
|
uint32_t keyboard_input_is_hidden : 1;
|
|
+ uint32_t is_animating : 1;
|
|
};
|
|
void hide_splash_screen (ply_boot_splash_plugin_t *plugin,
|
|
ply_event_loop_t *loop);
|
|
@@ -120,6 +121,9 @@
|
|
assert (plugin != NULL);
|
|
assert (plugin->loop != NULL);
|
|
|
|
+ if (plugin->is_animating)
|
|
+ return;
|
|
+
|
|
ply_window_set_color_hex_value (plugin->window,
|
|
PLY_WINDOW_COLOR_BLACK,
|
|
0x000000);
|
|
@@ -147,6 +151,8 @@
|
|
|
|
ply_text_progress_bar_show (plugin->progress_bar,
|
|
plugin->window);
|
|
+
|
|
+ plugin->is_animating = true;
|
|
}
|
|
|
|
static void
|
|
@@ -155,6 +161,12 @@
|
|
assert (plugin != NULL);
|
|
assert (plugin->loop != NULL);
|
|
|
|
+ if (!plugin->is_animating)
|
|
+ return;
|
|
+
|
|
+ plugin->is_animating = false;
|
|
+
|
|
+
|
|
ply_text_progress_bar_hide (plugin->progress_bar);
|
|
}
|
|
|