mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2025-12-15 08:56:26 -05:00
Implement absolute motion events for wayland
This commit is contained in:
parent
0813c1dd39
commit
272030652a
3 changed files with 38 additions and 21 deletions
|
|
@ -63,7 +63,7 @@ static bool wlr_wl_backend_init(struct wlr_backend_state* state) {
|
|||
state->remote_display_src = wl_event_loop_add_fd(loop, fd, events,
|
||||
dispatch_events, state);
|
||||
wl_event_source_check(state->remote_display_src);
|
||||
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
@ -102,6 +102,17 @@ bool wlr_backend_is_wl(struct wlr_backend *b) {
|
|||
return b->impl == &backend_impl;
|
||||
}
|
||||
|
||||
struct wlr_output *wlr_wl_output_for_surface(struct wlr_backend_state *backend,
|
||||
struct wl_surface *surface) {
|
||||
for (size_t i = 0; i < backend->outputs->length; ++i) {
|
||||
struct wlr_output *output = backend->outputs->items[i];
|
||||
if(output->state->surface == surface)
|
||||
return output;
|
||||
}
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
struct wlr_backend *wlr_wl_backend_create(struct wl_display *display) {
|
||||
wlr_log(L_INFO, "Creating wayland backend");
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue