mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2025-10-31 22:25:21 -04:00
input-device: remove wlr_input_device.link
This field's ownership is unclear: it's in wlr_input_device, but it's not managed by the common code, it's up to each individual backend to use it and clean it up. Since this is a backend implementation detail, move it to the backend-specific structs.
This commit is contained in:
parent
c9ba9e82b6
commit
1d9c1bcea6
11 changed files with 44 additions and 44 deletions
|
|
@ -12,8 +12,10 @@
|
|||
#include "util/signal.h"
|
||||
|
||||
static void input_device_destroy(struct wlr_input_device *wlr_dev) {
|
||||
wl_list_remove(&wlr_dev->link);
|
||||
free(wlr_dev);
|
||||
struct wlr_headless_input_device *dev =
|
||||
wl_container_of(wlr_dev, dev, wlr_input_device);
|
||||
wl_list_remove(&dev->link);
|
||||
free(dev);
|
||||
}
|
||||
|
||||
static const struct wlr_input_device_impl input_device_impl = {
|
||||
|
|
@ -93,7 +95,7 @@ struct wlr_input_device *wlr_headless_add_input_device(
|
|||
wlr_switch_init(wlr_device->switch_device, NULL);
|
||||
}
|
||||
|
||||
wl_list_insert(&backend->input_devices, &wlr_device->link);
|
||||
wl_list_insert(&backend->input_devices, &device->link);
|
||||
|
||||
if (backend->started) {
|
||||
wlr_signal_emit_safe(&backend->backend.events.new_input, wlr_device);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue