From: "Jasper St. Pierre" <[email protected]> We eventually want to send a new notify event on hitbox leave, which signifies the dawn of a new barrier event ID, so it's convenient if we can put the code here.
Signed-off-by: Jasper St. Pierre <[email protected]> --- Xi/xibarriers.c | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/Xi/xibarriers.c b/Xi/xibarriers.c index 95a62ae..45e97cf 100644 --- a/Xi/xibarriers.c +++ b/Xi/xibarriers.c @@ -418,8 +418,16 @@ input_constrain_cursor(DeviceIntPtr dev, ScreenPtr screen, xorg_list_for_each_entry(c, &cs->barriers, entry) { c->seen = FALSE; - if (c->hit && !barrier_inside_hit_box(&c->barrier, x, y)) - c->hit = FALSE; + if (!c->hit) + continue; + + if (barrier_inside_hit_box(&c->barrier, x, y)) + continue; + + c->hit = FALSE; + /* If we've left the hit box, this is the + * start of a new event ID. */ + c->barrier_event_id++; } out: @@ -486,7 +494,7 @@ CreatePointerBarrierClient(ClientPtr client, } ret->id = stuff->barrier; - ret->barrier_event_id = 0; + ret->barrier_event_id = 1; ret->release_event_id = 0; ret->hit = FALSE; ret->seen = FALSE; -- 1.8.0.1 _______________________________________________ [email protected]: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
