<div dir="ltr"><br><div class="gmail_extra"><br><br><div class="gmail_quote">On Mon, Mar 4, 2013 at 7:14 PM, Peter Hutterer <span dir="ltr"><<a href="mailto:peter.hutterer@who-t.net" target="_blank">peter.hutterer@who-t.net</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">dtime to the previous event is 0 on the first BarrierHit event.<br>
<br>
Signed-off-by: Peter Hutterer <<a href="mailto:peter.hutterer@who-t.net">peter.hutterer@who-t.net</a>><br>
---<br>
changes to v1:<br>
- check pbd->hit to see if we're the start of a new sequence instead of a<br>
timestamp of 0.<br>
<br>
Xi/xibarriers.c | 5 ++++-<br>
1 file changed, 4 insertions(+), 1 deletion(-)<br>
<br>
diff --git a/Xi/xibarriers.c b/Xi/xibarriers.c<br>
index a225cbc..fccab86 100644<br>
--- a/Xi/xibarriers.c<br>
+++ b/Xi/xibarriers.c<br>
@@ -435,6 +435,7 @@ input_constrain_cursor(DeviceIntPtr dev, ScreenPtr screen,<br>
dir = barrier_get_direction(current_x, current_y, x, y);<br>
<br>
while (dir != 0) {<br>
+ int new_sequence;<br>
struct PointerBarrierDevice *pbd;<br>
<br>
c = barrier_find_nearest(cs, master, dir, current_x, current_y, x, y);<br>
@@ -444,6 +445,8 @@ input_constrain_cursor(DeviceIntPtr dev, ScreenPtr screen,<br>
nearest = &c->barrier;<br>
<br>
pbd = GetBarrierDevice(c, master->id);<br>
+ new_sequence = !pbd->hit;<br>
+<br>
pbd->seen = TRUE;<br>
pbd->hit = TRUE;<br>
<br>
@@ -466,7 +469,7 @@ input_constrain_cursor(DeviceIntPtr dev, ScreenPtr screen,<br>
ev.event_id = pbd->barrier_event_id;<br>
ev.barrierid = c->id;<br>
<br>
- ev.dt = ms - pbd->last_timestamp;<br>
+ ev.dt = new_sequence ? 0 : ms - pbd->last_timestamp;<br>
ev.window = c->window;<br>
pbd->last_timestamp = ms;<br>
<span class=""><font color="#888888"><br>
--<br>
1.8.1.4<br>
<br>
</font></span></blockquote></div><br>Reviewed-by: Jasper St. Pierre <<a href="mailto:jstpierre@mecheye.net">jstpierre@mecheye.net</a>><br clear="all"><br>-- <br> Jasper<br>
</div></div>