diff options
author | emersion <contact@emersion.fr> | 2019-01-26 11:04:05 +0100 |
---|---|---|
committer | emersion <contact@emersion.fr> | 2019-01-26 11:04:05 +0100 |
commit | 5de26ad8ed962bc7cc753a623f247f7dc4c76a39 (patch) | |
tree | be7c5198f68e28f071ab93bd7aea6610db9c1c5e /backend/x11 | |
parent | 209210d30780ec64995594b77fde3d718b655542 (diff) |
pointer: add a frame event
Frame events group logically connected pointer events. It makes sense to make
the backend responsible for sending frame events, since once the events are
split (ie. once the frame events are stripped) it's not easy to figure out
which events belongs to which frame again.
This is also how Weston handles frame events.
Fixes https://github.com/swaywm/wlroots/issues/1468
Diffstat (limited to 'backend/x11')
-rw-r--r-- | backend/x11/input_device.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/backend/x11/input_device.c b/backend/x11/input_device.c index 915d9958..3a21f69c 100644 --- a/backend/x11/input_device.c +++ b/backend/x11/input_device.c @@ -50,6 +50,7 @@ static void send_axis_event(struct wlr_x11_output *output, int32_t delta, .delta_discrete = delta, }; wlr_signal_emit_safe(&output->pointer.events.axis, &ev); + wlr_signal_emit_safe(&output->pointer.events.frame, &output->pointer); } static void send_pointer_position_event(struct wlr_x11_output *output, @@ -61,6 +62,7 @@ static void send_pointer_position_event(struct wlr_x11_output *output, .y = (double)y / output->wlr_output.height, }; wlr_signal_emit_safe(&output->pointer.events.motion_absolute, &ev); + wlr_signal_emit_safe(&output->pointer.events.frame, &output->pointer); } void handle_x11_xinput_event(struct wlr_x11_backend *x11, |