Accepting request 644892 from home:michalsrb:bug1110199:Base:System
- plymouth-throbber-Don-t-skip-last-frame-when-waiting-for-end.patch * Make sure plymouthd stops throbber animation at the first opportunity after receiving quit command, instead of looping multiple times. (boo#1110199) OBS-URL: https://build.opensuse.org/request/show/644892 OBS-URL: https://build.opensuse.org/package/show/Base:System/plymouth?expand=0&rev=205
This commit is contained in:
parent
4778a9bf16
commit
d27b9a66a2
@ -0,0 +1,49 @@
|
|||||||
|
From 121783eff1759f6089863ec4d3e722e94fe73cdb Mon Sep 17 00:00:00 2001
|
||||||
|
From: Michal Srb <msrb@suse.com>
|
||||||
|
Date: Tue, 23 Oct 2018 09:10:25 +0200
|
||||||
|
Subject: [PATCH] throbber: Don't skip last frame when waiting for end.
|
||||||
|
|
||||||
|
If the stop_trigger is set and we are waiting for the last frame to stop the
|
||||||
|
animation, make sure we don't accidentally skip the last frame. It could
|
||||||
|
happen if the machine is busy and can't keep up with the frames or when the
|
||||||
|
animation has more than 60 frames (30FPS * 2 seconds).
|
||||||
|
---
|
||||||
|
src/libply-splash-graphics/ply-throbber.c | 11 ++++++++++-
|
||||||
|
1 file changed, 10 insertions(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/src/libply-splash-graphics/ply-throbber.c b/src/libply-splash-graphics/ply-throbber.c
|
||||||
|
index f18feb6..a4311fd 100644
|
||||||
|
--- a/src/libply-splash-graphics/ply-throbber.c
|
||||||
|
+++ b/src/libply-splash-graphics/ply-throbber.c
|
||||||
|
@@ -144,6 +144,7 @@ animate_at_time (ply_throbber_t *throbber,
|
||||||
|
ply_pixel_buffer_t *const *frames;
|
||||||
|
bool should_continue;
|
||||||
|
double percent_in_sequence;
|
||||||
|
+ int last_frame_number;
|
||||||
|
|
||||||
|
number_of_frames = ply_array_get_size (throbber->frames);
|
||||||
|
|
||||||
|
@@ -152,11 +153,19 @@ animate_at_time (ply_throbber_t *throbber,
|
||||||
|
|
||||||
|
should_continue = true;
|
||||||
|
percent_in_sequence = fmod (time, THROBBER_DURATION) / THROBBER_DURATION;
|
||||||
|
+ last_frame_number = throbber->frame_number;
|
||||||
|
throbber->frame_number = (int) (number_of_frames * percent_in_sequence);
|
||||||
|
|
||||||
|
- if (throbber->stop_trigger != NULL)
|
||||||
|
+ if (throbber->stop_trigger != NULL) {
|
||||||
|
+ /* If we are trying to stop, make sure we don't skip the last
|
||||||
|
+ * frame and loop around. Clamp it to the last frame.
|
||||||
|
+ */
|
||||||
|
+ if (last_frame_number > throbber->frame_number)
|
||||||
|
+ throbber->frame_number = number_of_frames - 1;
|
||||||
|
+
|
||||||
|
if (throbber->frame_number == number_of_frames - 1)
|
||||||
|
should_continue = false;
|
||||||
|
+ }
|
||||||
|
|
||||||
|
frames = (ply_pixel_buffer_t *const *) ply_array_get_pointer_elements (throbber->frames);
|
||||||
|
ply_pixel_buffer_get_size (frames[throbber->frame_number], &throbber->frame_area);
|
||||||
|
--
|
||||||
|
2.16.4
|
||||||
|
|
@ -1,3 +1,11 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Tue Oct 23 07:15:48 UTC 2018 - msrb@suse.com
|
||||||
|
|
||||||
|
- plymouth-throbber-Don-t-skip-last-frame-when-waiting-for-end.patch
|
||||||
|
* Make sure plymouthd stops throbber animation at the first
|
||||||
|
opportunity after receiving quit command, instead of looping
|
||||||
|
multiple times. (boo#1110199)
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Thu Oct 18 11:57:15 UTC 2018 - qzhao@suse.com
|
Thu Oct 18 11:57:15 UTC 2018 - qzhao@suse.com
|
||||||
|
|
||||||
|
@ -47,6 +47,8 @@ Patch5: 0001-Add-label-ft-plugin.patch
|
|||||||
Patch6: 0002-Install-label-ft-plugin-into-initrd-if-available.patch
|
Patch6: 0002-Install-label-ft-plugin-into-initrd-if-available.patch
|
||||||
# PATCH-FIX-UPSTREAM 0003-fix_null_deref.patch boo#959986 fvogt@suse.com -- add ability to output text in initrd needed for encryption.
|
# PATCH-FIX-UPSTREAM 0003-fix_null_deref.patch boo#959986 fvogt@suse.com -- add ability to output text in initrd needed for encryption.
|
||||||
Patch7: 0003-fix_null_deref.patch
|
Patch7: 0003-fix_null_deref.patch
|
||||||
|
# PATCH-FIX-UPSTREAM plymouth-throbber-Don-t-skip-last-frame-when-waiting-for-end.patch boo#1110199 msrb@suse.com -- Do not skip last frame when waiting for end of throbber animation. Prevents unvanted looping after being told to quit.
|
||||||
|
Patch8: plymouth-throbber-Don-t-skip-last-frame-when-waiting-for-end.patch
|
||||||
|
|
||||||
BuildRequires: automake
|
BuildRequires: automake
|
||||||
BuildRequires: docbook-xsl-stylesheets
|
BuildRequires: docbook-xsl-stylesheets
|
||||||
|
Loading…
Reference in New Issue
Block a user