aboutsummaryrefslogtreecommitdiff
path: root/backend/x11/output.c
diff options
context:
space:
mode:
authorSimon Zeni <simon@bl4ckb0ne.ca>2022-01-31 10:20:01 -0500
committerKirill Primak <vyivel@eclair.cafe>2022-02-21 17:11:32 +0000
commitd5480efc7a03641600df411dea93308e5edc8b27 (patch)
tree377e16476b41a7740a3cb88b5e3338da95eac6a3 /backend/x11/output.c
parenta1978b1299952586a2fd016aab682c7fdbe735ee (diff)
types/wlr_pointer: add base wlr_input_device
wlr_pointer owns its wlr_input_device. It will be initialized when the pointer is initialized, and finished when the pointer 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 d500795f..19eb5d55 100644
--- a/backend/x11/output.c
+++ b/backend/x11/output.c
@@ -76,7 +76,7 @@ static void output_destroy(struct wlr_output *wlr_output) {
pixman_region32_fini(&output->exposed);
- wlr_input_device_destroy(&output->pointer_dev);
+ wlr_pointer_destroy(&output->pointer);
wlr_input_device_destroy(&output->touch_dev);
struct wlr_x11_buffer *buffer, *buffer_tmp;
@@ -573,11 +573,8 @@ struct wlr_output *wlr_x11_output_create(struct wlr_backend *backend) {
wlr_output_update_enabled(wlr_output, true);
- wlr_input_device_init(&output->pointer_dev, WLR_INPUT_DEVICE_POINTER,
- &input_device_impl, "X11 pointer");
- wlr_pointer_init(&output->pointer, &pointer_impl);
- output->pointer_dev.pointer = &output->pointer;
- output->pointer_dev.output_name = strdup(wlr_output->name);
+ 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");
@@ -587,7 +584,7 @@ struct wlr_output *wlr_x11_output_create(struct wlr_backend *backend) {
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_dev);
+ wlr_signal_emit_safe(&x11->backend.events.new_input, &output->pointer.base);
wlr_signal_emit_safe(&x11->backend.events.new_input, &output->touch_dev);
// Start the rendering loop by requesting the compositor to render a frame