mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2025-10-29 05:40:12 -04:00
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
This commit is contained in:
parent
209210d307
commit
5de26ad8ed
14 changed files with 96 additions and 21 deletions
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue