input-device: add addons

This commit is contained in:
Kirill Primak 2023-01-18 02:07:57 +03:00
parent 5f264a7d6c
commit ebc65649fa
2 changed files with 6 additions and 0 deletions

View file

@ -2,6 +2,7 @@
#include <stdlib.h>
#include <string.h>
#include <wlr/util/addon.h>
#include "interfaces/wlr_input_device.h"
void wlr_input_device_init(struct wlr_input_device *dev,
@ -12,6 +13,7 @@ void wlr_input_device_init(struct wlr_input_device *dev,
dev->vendor = 0;
dev->product = 0;
wlr_addon_set_init(&dev->addons);
wl_signal_init(&dev->events.destroy);
}
@ -22,6 +24,7 @@ void wlr_input_device_finish(struct wlr_input_device *wlr_device) {
wl_signal_emit_mutable(&wlr_device->events.destroy, wlr_device);
wlr_addon_set_finish(&wlr_device->addons);
wl_list_remove(&wlr_device->events.destroy.listener_list);
free(wlr_device->name);