mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2026-04-19 06:47:02 -04:00
input-device: add addons
This commit is contained in:
parent
5f264a7d6c
commit
ebc65649fa
2 changed files with 6 additions and 0 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue