diff options
Diffstat (limited to 'src/grail-event.c')
| -rw-r--r-- | src/grail-event.c | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/src/grail-event.c b/src/grail-event.c index 9c0e437..504ed10 100644 --- a/src/grail-event.c +++ b/src/grail-event.c | |||
| @@ -62,15 +62,15 @@ int gin_add_contact_props(const struct gesture_inserter *gin, | |||
| 62 | if (ntouch > 5) | 62 | if (ntouch > 5) |
| 63 | ntouch = 5; | 63 | ntouch = 5; |
| 64 | compute_bbox(&min, &max, frame); | 64 | compute_bbox(&min, &max, frame); |
| 65 | prop[n++] = gin_prop_x(gin, min.x); | 65 | prop[n++] = min.x; |
| 66 | prop[n++] = gin_prop_y(gin, min.y); | 66 | prop[n++] = min.y; |
| 67 | prop[n++] = gin_prop_x(gin, max.x); | 67 | prop[n++] = max.x; |
| 68 | prop[n++] = gin_prop_y(gin, max.y); | 68 | prop[n++] = max.y; |
| 69 | for (i = 0; i < ntouch; i++) { | 69 | for (i = 0; i < ntouch; i++) { |
| 70 | const struct utouch_contact *ct = frame->active[i]; | 70 | const struct utouch_contact *ct = frame->active[i]; |
| 71 | prop[n++] = ct->id; | 71 | prop[n++] = ct->id; |
| 72 | prop[n++] = gin_prop_x(gin, ct->x); | 72 | prop[n++] = ct->x; |
| 73 | prop[n++] = gin_prop_y(gin, ct->y); | 73 | prop[n++] = ct->y; |
| 74 | } | 74 | } |
| 75 | return n; | 75 | return n; |
| 76 | } | 76 | } |
| @@ -86,8 +86,8 @@ int gin_get_clients(struct grail *ge, | |||
| 86 | if (!ge->get_clients) | 86 | if (!ge->get_clients) |
| 87 | return 0; | 87 | return 0; |
| 88 | grail_mask_foreach(i, span, bspan) { | 88 | grail_mask_foreach(i, span, bspan) { |
| 89 | pos[npos].x = gin_prop_x(ge->gin, frame->slots[i]->x); | 89 | pos[npos].x = frame->slots[i]->x; |
| 90 | pos[npos].y = gin_prop_y(ge->gin, frame->slots[i]->y); | 90 | pos[npos].y = frame->slots[i]->y; |
| 91 | npos++; | 91 | npos++; |
| 92 | } | 92 | } |
| 93 | return ge->get_clients(ge, info, maxinfo, pos, npos, types, btypes); | 93 | return ge->get_clients(ge, info, maxinfo, pos, npos, types, btypes); |
| @@ -109,8 +109,8 @@ void gin_send_event(struct grail *ge, struct slot_state *s, | |||
| 109 | gev.ntouch = ev->ntouch; | 109 | gev.ntouch = ev->ntouch; |
| 110 | gev.nprop = ev->nprop; | 110 | gev.nprop = ev->nprop; |
| 111 | gev.time = ev->time; | 111 | gev.time = ev->time; |
| 112 | gev.pos.x = gin_prop_x(gin, ev->pos.x); | 112 | gev.pos.x = ev->pos.x; |
| 113 | gev.pos.y = gin_prop_y(gin, ev->pos.y); | 113 | gev.pos.y = ev->pos.y; |
| 114 | memcpy(gev.prop, ev->prop, ev->nprop * sizeof(grail_prop_t)); | 114 | memcpy(gev.prop, ev->prop, ev->nprop * sizeof(grail_prop_t)); |
| 115 | for (i = 0; i < s->nclient; i++) { | 115 | for (i = 0; i < s->nclient; i++) { |
| 116 | gev.client_id = s->client_id[i]; | 116 | gev.client_id = s->client_id[i]; |
| @@ -131,12 +131,12 @@ int grail_get_contacts(const struct grail *ge, | |||
| 131 | const struct utouch_contact *ct = frame->active[i]; | 131 | const struct utouch_contact *ct = frame->active[i]; |
| 132 | t->id = ct->id; | 132 | t->id = ct->id; |
| 133 | t->tool_type = ct->tool_type; | 133 | t->tool_type = ct->tool_type; |
| 134 | t->pos.x = gin_prop_x(gin, ct->x); | 134 | t->pos.x = ct->x; |
| 135 | t->pos.y = gin_prop_y(gin, ct->y); | 135 | t->pos.y = ct->y; |
| 136 | t->touch_major = gin->scale_r * ct->touch_major; | 136 | t->touch_major = ct->touch_major; |
| 137 | t->touch_minor = gin->scale_r * ct->touch_minor; | 137 | t->touch_minor = ct->touch_minor; |
| 138 | t->width_major = gin->scale_r * ct->width_major; | 138 | t->width_major = ct->width_major; |
| 139 | t->width_minor = gin->scale_r * ct->width_minor; | 139 | t->width_minor = ct->width_minor; |
| 140 | t->angle = ct->orientation; | 140 | t->angle = ct->orientation; |
| 141 | t->pressure = ct->pressure; | 141 | t->pressure = ct->pressure; |
| 142 | } | 142 | } |
