diff options
author | Tony Crisci <tony@dubstepdish.com> | 2017-09-22 10:30:09 -0400 |
---|---|---|
committer | Tony Crisci <tony@dubstepdish.com> | 2017-09-22 10:30:09 -0400 |
commit | e38248f34c3eed879486347f0c0c5db3ceca4a68 (patch) | |
tree | 4f90033c0456d501a7f2b48a31bf666a6f86566e /examples/compositor.c | |
parent | 00cc20b0a8e344bfd872271249f6efa44772402a (diff) |
wlr-seat: implement cursor axis events
Axis events for the cursor are generated with the scroll wheel.
Diffstat (limited to 'examples/compositor.c')
-rw-r--r-- | examples/compositor.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/examples/compositor.c b/examples/compositor.c index 085cbb0e..ad3dd995 100644 --- a/examples/compositor.c +++ b/examples/compositor.c @@ -417,10 +417,11 @@ static void handle_cursor_motion_absolute(struct wl_listener *listener, } static void handle_cursor_axis(struct wl_listener *listener, void *data) { - //struct sample_state *sample = - //wl_container_of(listener, sample, cursor_axis); - //struct wlr_event_pointer_axis *event = data; - wlr_log(L_DEBUG, "TODO: handle cursor axis"); + struct sample_state *sample = + wl_container_of(listener, sample, cursor_axis); + struct wlr_event_pointer_axis *event = data; + wlr_seat_pointer_send_axis(sample->wl_seat, event->time_sec, + event->orientation, event->delta); } static void handle_cursor_button(struct wl_listener *listener, void *data) { |