input: Run touch binding before calling touch grab

We don't want to send events if the binding is going to handle the touch
event.  Also, this restricts touch bindings to only trigger on touch down.
For gesture bindings we want something similar to the motion signal we
have for the pointer.
This commit is contained in:
Kristian Høgsberg 2014-02-05 14:25:18 -08:00
parent d2a0213ee4
commit c896401209

View File

@ -1482,6 +1482,9 @@ notify_touch(struct weston_seat *seat, uint32_t time, int touch_id,
return; return;
} }
weston_compositor_run_touch_binding(ec, seat,
time, touch_type);
grab->interface->down(grab, time, touch_id, sx, sy); grab->interface->down(grab, time, touch_id, sx, sy);
if (touch->num_tp == 1) { if (touch->num_tp == 1) {
touch->grab_serial = touch->grab_serial =
@ -1518,8 +1521,6 @@ notify_touch(struct weston_seat *seat, uint32_t time, int touch_id,
weston_touch_set_focus(seat, NULL); weston_touch_set_focus(seat, NULL);
break; break;
} }
weston_compositor_run_touch_binding(ec, seat, time, touch_type);
} }
static void static void