diff options
| author | Ray Strode <rstrode@redhat.com> | 2008-05-28 14:19:51 -0400 |
|---|---|---|
| committer | Ray Strode <rstrode@redhat.com> | 2008-05-28 14:19:51 -0400 |
| commit | f288f865390288d7208059d0d46ff56a6154ec67 (patch) | |
| tree | f06804b8fa13cbbbf24ee9c7d312d0d41a293470 /src | |
| parent | cad6ba8b75821d3d7eb19eda24ed1ffcda6d7d2e (diff) | |
| download | plymouth-f288f865390288d7208059d0d46ff56a6154ec67.tar.gz plymouth-f288f865390288d7208059d0d46ff56a6154ec67.tar.xz plymouth-f288f865390288d7208059d0d46ff56a6154ec67.zip | |
Make throbber continue to work after stop and start
Diffstat (limited to 'src')
| -rw-r--r-- | src/splash-plugins/spinfinity/throbber.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/splash-plugins/spinfinity/throbber.c b/src/splash-plugins/spinfinity/throbber.c index 3d5f7a5..af34835 100644 --- a/src/splash-plugins/spinfinity/throbber.c +++ b/src/splash-plugins/spinfinity/throbber.c @@ -261,10 +261,12 @@ throbber_start (throbber_t *throbber, { assert (throbber != NULL); assert (throbber->loop == NULL); - assert (ply_array_get_size (throbber->frames) == 0); - if (!throbber_add_frames (throbber)) - return false; + if (ply_array_get_size (throbber->frames) == 0) + { + if (!throbber_add_frames (throbber)) + return false; + } throbber->loop = loop; throbber->frame_buffer = frame_buffer; @@ -288,12 +290,14 @@ throbber_stop (throbber_t *throbber) if (throbber->frame_area.width > 0) ply_frame_buffer_fill_with_color (throbber->frame_buffer, &throbber->frame_area, 0.0, 0.43, .71, 1.0); + throbber->frame_buffer = NULL; if (throbber->loop != NULL) { ply_event_loop_stop_watching_for_timeout (throbber->loop, (ply_event_loop_timeout_handler_t) on_timeout, throbber); + throbber->loop = NULL; } } |
