Commit c24d9bf1 authored by Adel Gadllah's avatar Adel Gadllah

meta-window-actor: Fix offset calculation in queue_send_frame_messages_timeout

The current time offset calculation is wrong. It is supposed to calculate
the offset between the current time and the
"time where it message should be sent" (last_time + interval).

Fix the math to actually do that.
parent a6bf340f
......@@ -1007,7 +1007,7 @@ queue_send_frame_messages_timeout (MetaWindowActor *self)
interval = (int)(1000000 / refresh_rate) * 6;
offset = MAX (0, current_time - priv->frame_drawn_time + interval) / 1000;
offset = MAX (0, priv->frame_drawn_time + interval - current_time) / 1000;
/* The clutter master clock source has already been added with META_PRIORITY_REDRAW,
* so the timer will run *after* the clutter frame handling, if a frame is ready
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment