touch
struct touch_state *touch = &input->touch;
if (touch->sync & SYNC_PRESSURE)
wsmouse_evq_put(evq, ABS_Z_EV, touch->pressure);
if (touch->sync & SYNC_CONTACTS)
wsmouse_evq_put(evq, ABS_W_EV, touch->contacts);
if ((touch->sync & SYNC_TOUCH_WIDTH)
wsmouse_evq_put(evq, WSCONS_EVENT_TOUCH_WIDTH, touch->width);
t_sync = (input->touch.sync & SYNC_CONTACTS);
printf(" t:%d", input->touch.contacts);
input->touch.sync = 0;
input->touch.prev_contacts = input->touch.contacts;
if (input->touch.sync)
if (input->touch.sync)
input->touch.min_pressure = input->filter.pressure_hi;
input->touch.min_pressure = val;
memset(&input->touch, 0, sizeof(struct touch_state));
input->touch.min_pressure = input->filter.pressure_hi;
int limit = imax(input->touch.min_pressure, 1);
struct touch_state *touch = &input->touch;
if (pressure == 0 || pressure != touch->pressure) {
touch->pressure = pressure;
touch->sync |= SYNC_PRESSURE;
if (contacts != touch->contacts) {
touch->contacts = contacts;
touch->sync |= SYNC_CONTACTS;
wsmouse_touch(sc, value, input->touch.contacts);
if (value != input->touch.contacts) {
input->touch.contacts = value;
input->touch.sync |= SYNC_CONTACTS;
if (value != input->touch.width) {
input->touch.width = value;
input->touch.sync |= SYNC_TOUCH_WIDTH;
struct touch_state *touch = &input->touch;
if (touch->pressure == 0) {
if (touch->prev_contacts == 0)
touch->sync &= ~SYNC_PRESSURE;
if (touch->sync & SYNC_CONTACTS)
if ((touch->sync & SYNC_PRESSURE) && touch->min_pressure) {
if (touch->pressure >= input->filter.pressure_hi)
touch->min_pressure = input->filter.pressure_lo;
else if (touch->pressure < input->filter.pressure_lo)
touch->min_pressure = input->filter.pressure_hi;
struct touch_state touch;
tp->contacts = input->touch.contacts;
input->touch.width >= tp->params.f2width)
input->touch.pressure >= tp->params.f2pressure)))
|| (input->touch.sync & SYNC_CONTACTS)
|| (input->touch.contacts > 1)) {
if ((input->touch.sync & SYNC_CONTACTS)
input->touch.sync = 0;
touch(mp);
touch(mp);
touch(mp);
touch(dot);
touch(mp);
touch(mp);
touch(mp);
touch(mp);
touch(mp);
touch(mp);
void touch(struct message *);
sk_touch_poll(struct sk_usbhid **skv, size_t nsk, int *touch, size_t *idx)
if ((r = fido_dev_get_touch_status(skv[i]->dev, touch,
} else if (*touch) {
*touch = 0;
int touch, ms_remain;
if (sk_touch_poll(skv, skvcnt, &touch, &idx) == -1) {
if (touch) {
if (touch(*qq) == 0) {
if (touch(*qq) == 0) {
static int touch(struct queue *);