aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoremersion <contact@emersion.fr>2019-01-26 11:18:47 +0100
committeremersion <contact@emersion.fr>2019-01-26 11:18:47 +0100
commitb45fc24b1893484c02420fbb33d7ebb69bbf1eae (patch)
tree4dfa6b78b8bc908fe891b3bbdb4b6c922db691cd
parent5de26ad8ed962bc7cc753a623f247f7dc4c76a39 (diff)
backend/wayland: handle wl_pointer.axis_stop
-rw-r--r--backend/wayland/wl_seat.c16
1 files changed, 15 insertions, 1 deletions
diff --git a/backend/wayland/wl_seat.c b/backend/wayland/wl_seat.c
index 7efa6eb4..1229a0ac 100644
--- a/backend/wayland/wl_seat.c
+++ b/backend/wayland/wl_seat.c
@@ -149,7 +149,21 @@ static void pointer_handle_axis_source(void *data,
static void pointer_handle_axis_stop(void *data, struct wl_pointer *wl_pointer,
uint32_t time, uint32_t axis) {
- // This space is intentionally left blank
+ struct wlr_wl_backend *backend = data;
+ struct wlr_wl_pointer *pointer = backend->current_pointer;
+ if (pointer == NULL) {
+ return;
+ }
+
+ struct wlr_event_pointer_axis event = {
+ .device = &pointer->input_device->wlr_input_device,
+ .delta = 0,
+ .delta_discrete = 0,
+ .orientation = axis,
+ .time_msec = time,
+ .source = pointer->axis_source,
+ };
+ wlr_signal_emit_safe(&pointer->wlr_pointer.events.axis, &event);
}
static void pointer_handle_axis_discrete(void *data,