[evince/wip/gpoo/fix-animation] libview: Fix missing last frame of an animation
- From: Germán Poo-Caamaño <gpoo src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evince/wip/gpoo/fix-animation] libview: Fix missing last frame of an animation
- Date: Fri, 15 Jul 2022 20:53:08 +0000 (UTC)
commit 38167383863b2b37bd751e80f9deffb85afadfa0
Author: Romain <romain deoux gmail com>
Date: Wed Apr 13 20:13:43 2022 +0000
libview: Fix missing last frame of an animation
Fixes #1821
libview/ev-view-presentation.c | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
---
diff --git a/libview/ev-view-presentation.c b/libview/ev-view-presentation.c
index f21e83378..759812462 100644
--- a/libview/ev-view-presentation.c
+++ b/libview/ev-view-presentation.c
@@ -84,6 +84,7 @@ struct _EvViewPresentation
/* Animations */
gboolean enable_animations;
+ gboolean animation_finished;
EvTransitionAnimation *animation;
/* Links */
@@ -265,7 +266,7 @@ ev_view_presentation_animation_cancel (EvViewPresentation *pview)
static void
ev_view_presentation_transition_animation_finish (EvViewPresentation *pview)
{
- ev_view_presentation_animation_cancel (pview);
+ pview->animation_finished = TRUE;
ev_view_presentation_transition_start (pview);
gtk_widget_queue_draw (GTK_WIDGET (pview));
}
@@ -1100,6 +1101,11 @@ ev_view_presentation_draw (GtkWidget *widget,
cairo_restore (cr);
}
+ if (pview->animation_finished) {
+ ev_view_presentation_animation_cancel (pview);
+ pview->animation_finished = FALSE;
+ }
+
return TRUE;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]