diff options
author | emersion <contact@emersion.fr> | 2018-03-28 14:11:39 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-03-28 14:11:39 -0400 |
commit | 5dd022da1300185780ddf4b70014a6f8f306de85 (patch) | |
tree | 331f0e5f7b748387a338b678b625bf5a1ae7f693 /examples/support | |
parent | 52d621e0979c3b393753d1c67b2b0fd23212ca41 (diff) | |
parent | 3813121fefb1734ed2c2537759e6eead1c0d9a74 (diff) |
Merge pull request #765 from swaywm/transformed-events
Use libinput transformed events instead of width_mm/height_mm
Diffstat (limited to 'examples/support')
-rw-r--r-- | examples/support/shared.c | 12 | ||||
-rw-r--r-- | examples/support/shared.h | 8 |
2 files changed, 10 insertions, 10 deletions
diff --git a/examples/support/shared.c b/examples/support/shared.c index e6233206..02b324f5 100644 --- a/examples/support/shared.c +++ b/examples/support/shared.c @@ -108,8 +108,8 @@ static void pointer_motion_absolute_notify(struct wl_listener *listener, void *d struct wlr_event_pointer_motion_absolute *event = data; struct pointer_state *pstate = wl_container_of(listener, pstate, motion_absolute); if (pstate->compositor->pointer_motion_absolute_cb) { - pstate->compositor->pointer_motion_absolute_cb(pstate, - event->x_mm, event->y_mm); + pstate->compositor->pointer_motion_absolute_cb( + pstate, event->x, event->y); } } @@ -167,8 +167,8 @@ static void touch_down_notify(struct wl_listener *listener, void *data) { struct wlr_event_touch_down *event = data; struct touch_state *tstate = wl_container_of(listener, tstate, down); if (tstate->compositor->touch_down_cb) { - tstate->compositor->touch_down_cb(tstate, event->touch_id, - event->x_mm, event->y_mm, event->width_mm, event->height_mm); + tstate->compositor->touch_down_cb(tstate, + event->touch_id, event->x, event->y); } } @@ -176,8 +176,8 @@ static void touch_motion_notify(struct wl_listener *listener, void *data) { struct wlr_event_touch_motion *event = data; struct touch_state *tstate = wl_container_of(listener, tstate, motion); if (tstate->compositor->touch_motion_cb) { - tstate->compositor->touch_motion_cb(tstate, event->touch_id, - event->x_mm, event->y_mm, event->width_mm, event->height_mm); + tstate->compositor->touch_motion_cb(tstate, + event->touch_id, event->x, event->y); } } diff --git a/examples/support/shared.h b/examples/support/shared.h index d00e75b3..2079a9ef 100644 --- a/examples/support/shared.h +++ b/examples/support/shared.h @@ -102,10 +102,10 @@ struct compositor_state { enum wlr_axis_source source, enum wlr_axis_orientation orientation, double delta); - void (*touch_down_cb)(struct touch_state *s, int32_t touch_id, - double x, double y, double width, double height); - void (*touch_motion_cb)(struct touch_state *s, int32_t touch_id, - double x, double y, double width, double height); + void (*touch_down_cb)(struct touch_state *s, + int32_t touch_id, double x, double y); + void (*touch_motion_cb)(struct touch_state *s, + int32_t touch_id, double x, double y); void (*touch_up_cb)(struct touch_state *s, int32_t touch_id); void (*touch_cancel_cb)(struct touch_state *s, int32_t touch_id); void (*tool_axis_cb)(struct tablet_tool_state *s, |