diff options
author | Simon Zeni <simon@bl4ckb0ne.ca> | 2022-03-08 16:45:03 -0500 |
---|---|---|
committer | Simon Zeni <simon@bl4ckb0ne.ca> | 2022-03-17 13:44:18 -0400 |
commit | a92e5f8d4634a5d24c2fbab4a7fe0256558a96e6 (patch) | |
tree | a07b6ace0b7d1caabe69eb47e908d9df0baf4653 /backend | |
parent | 2001441a370f673e8a46a1c172c5fc48df106750 (diff) |
types/wlr_input_device: move output_name field to wlr_pointer and wlr_touch
Diffstat (limited to 'backend')
-rw-r--r-- | backend/wayland/pointer.c | 3 | ||||
-rw-r--r-- | backend/wayland/seat.c | 7 | ||||
-rw-r--r-- | backend/x11/output.c | 4 |
3 files changed, 10 insertions, 4 deletions
diff --git a/backend/wayland/pointer.c b/backend/wayland/pointer.c index 9d3131b9..2dc5d752 100644 --- a/backend/wayland/pointer.c +++ b/backend/wayland/pointer.c @@ -440,8 +440,7 @@ void create_pointer(struct wlr_wl_seat *seat, struct wlr_wl_output *output) { snprintf(name, sizeof(name), "wayland-pointer-%s", seat->name); wlr_pointer_init(&pointer->wlr_pointer, &wl_pointer_impl, name); - /* TODO: move output_name to pointer/touch */ - pointer->wlr_pointer.base.output_name = strdup(output->wlr_output.name); + pointer->wlr_pointer.output_name = strdup(output->wlr_output.name); pointer->seat = seat; pointer->output = output; diff --git a/backend/wayland/seat.c b/backend/wayland/seat.c index 7d16d7d4..33a7383c 100644 --- a/backend/wayland/seat.c +++ b/backend/wayland/seat.c @@ -217,6 +217,13 @@ static void init_seat_touch(struct wlr_wl_seat *seat) { wlr_touch_init(&seat->wlr_touch, &touch_impl, name); + struct wlr_wl_output *output; + wl_list_for_each(output, &seat->backend->outputs, link) { + /* Multi-output touch not supproted */ + seat->wlr_touch.output_name = strdup(output->wlr_output.name); + break; + } + wl_touch_add_listener(seat->wl_touch, &touch_listener, seat); wlr_signal_emit_safe(&seat->backend->backend.events.new_input, &seat->wlr_touch.base); diff --git a/backend/x11/output.c b/backend/x11/output.c index 1b51b629..86e1dfd8 100644 --- a/backend/x11/output.c +++ b/backend/x11/output.c @@ -574,10 +574,10 @@ struct wlr_output *wlr_x11_output_create(struct wlr_backend *backend) { wlr_output_update_enabled(wlr_output, true); wlr_pointer_init(&output->pointer, &x11_pointer_impl, "x11-pointer"); - output->pointer.base.output_name = strdup(wlr_output->name); + output->pointer.output_name = strdup(wlr_output->name); wlr_touch_init(&output->touch, &x11_touch_impl, "x11-touch"); - output->touch.base.output_name = strdup(wlr_output->name); + output->touch.output_name = strdup(wlr_output->name); wl_list_init(&output->touchpoints); wlr_signal_emit_safe(&x11->backend.events.new_output, wlr_output); |