From a87f34c1773b65c65ad93150607ac45ddbb726c1 Mon Sep 17 00:00:00 2001 From: Emmanuele Bassi Date: Wed, 24 Sep 2008 10:12:23 +0000 Subject: [PATCH] 2008-09-24 Emmanuele Bassi Bug 1130 - CLUTTER_MOTION is not emitted when time goes backwards. * clutter/clutter-main.c (clutter_do_event): Check for time rollbacks inside the motion event throttling. (Pierce Liu) --- ChangeLog | 7 +++++++ clutter/clutter-main.c | 11 ++++++++++- 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index ee714a4d0..57ce45665 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2008-09-24 Emmanuele Bassi + + Bug 1130 - CLUTTER_MOTION is not emitted when time goes backwards. + + * clutter/clutter-main.c (clutter_do_event): Check for time + rollbacks inside the motion event throttling. (Pierce Liu) + 2008-09-23 Emmanuele Bassi * clutter/clutter-timeout-pool.c: Reword previous commit. diff --git a/clutter/clutter-main.c b/clutter/clutter-main.c index a6e032855..c73a78b33 100644 --- a/clutter/clutter-main.c +++ b/clutter/clutter-main.c @@ -1903,7 +1903,16 @@ clutter_do_event (ClutterEvent *event) delta, event->any.time); - if (event->any.time < (local_motion_time + delta)) + /* we need to guard against roll-overs and the + * case where the time is rolled backwards and + * the backend is not ensuring a monotonic clock + * for the events. + * + * see: + * http://bugzilla.openedhand.com/show_bug.cgi?id=1130 + */ + if (event->any.time >= local_motion_time && + event->any.time < (local_motion_time + delta)) break; else local_motion_time = event->any.time;