aboutsummaryrefslogtreecommitdiff
path: root/backend/x11/output.c
diff options
context:
space:
mode:
authorSimon Zeni <simon@bl4ckb0ne.ca>2022-02-01 11:51:50 -0500
committerKirill Primak <vyivel@eclair.cafe>2022-02-21 17:11:32 +0000
commitedfb332b24a2a1e014de10eba1c5bf2b84538d2f (patch)
tree825be950a750cbb672f7e5033b54d02b42745c3d /backend/x11/output.c
parent7dfee50350180e38c7c02b79c5a3ee454dc552fd (diff)
types/wlr_touch: add base wlr_input_device
wlr_touch now owns its wlr_input_device. It will be initialized when the tablet tool is initialized, and finished when the touch is destroyed.
Diffstat (limited to 'backend/x11/output.c')
-rw-r--r--backend/x11/output.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/backend/x11/output.c b/backend/x11/output.c
index 19eb5d55..0900a60a 100644
--- a/backend/x11/output.c
+++ b/backend/x11/output.c
@@ -77,7 +77,7 @@ static void output_destroy(struct wlr_output *wlr_output) {
pixman_region32_fini(&output->exposed);
wlr_pointer_destroy(&output->pointer);
- wlr_input_device_destroy(&output->touch_dev);
+ wlr_touch_destroy(&output->touch);
struct wlr_x11_buffer *buffer, *buffer_tmp;
wl_list_for_each_safe(buffer, buffer_tmp, &output->buffers, link) {
@@ -576,16 +576,13 @@ struct wlr_output *wlr_x11_output_create(struct wlr_backend *backend) {
wlr_pointer_init(&output->pointer, &pointer_impl, "x11-pointer");
output->pointer.base.output_name = strdup(wlr_output->name);
- wlr_input_device_init(&output->touch_dev, WLR_INPUT_DEVICE_TOUCH,
- &input_device_impl, "X11 touch");
- wlr_touch_init(&output->touch, &touch_impl);
- output->touch_dev.touch = &output->touch;
- output->touch_dev.output_name = strdup(wlr_output->name);
+ wlr_touch_init(&output->touch, &touch_impl, "x11-touch");
+ output->touch.base.output_name = strdup(wlr_output->name);
wl_list_init(&output->touchpoints);
wlr_signal_emit_safe(&x11->backend.events.new_output, wlr_output);
wlr_signal_emit_safe(&x11->backend.events.new_input, &output->pointer.base);
- wlr_signal_emit_safe(&x11->backend.events.new_input, &output->touch_dev);
+ wlr_signal_emit_safe(&x11->backend.events.new_input, &output->touch.base);
// Start the rendering loop by requesting the compositor to render a frame
wlr_output_schedule_frame(wlr_output);