pointer: store the output instead of its name

In cases where the value is actually valid, the input device lives
just as long as the output, so it's easier to provide the output itself
instead for making a compositor find it by the name.
This commit is contained in:
Kirill Primak 2023-06-03 20:10:22 +03:00
parent b61d5922f1
commit 4cbc8385ce
4 changed files with 3 additions and 5 deletions

View file

@ -598,7 +598,7 @@ 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.output_name = strdup(wlr_output->name);
output->pointer.output = wlr_output;
wlr_touch_init(&output->touch, &x11_touch_impl, "x11-touch");
output->touch.output_name = strdup(wlr_output->name);