From 130c3bcf6361a76a889790e1907b78c607053659 Mon Sep 17 00:00:00 2001 From: Simon Zeni Date: Fri, 11 Feb 2022 09:06:26 -0500 Subject: types/wlr_input_device: call the specialized input device destroy function on destroy In case the `wlr_input_device` is not owned by a specialized input device, the function will finish the wlr_input_device and call it's implementation destroy function if an implementation has been supplied, or simply free it. --- include/wlr/interfaces/wlr_input_device.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'include/wlr') diff --git a/include/wlr/interfaces/wlr_input_device.h b/include/wlr/interfaces/wlr_input_device.h index de527393..ab314807 100644 --- a/include/wlr/interfaces/wlr_input_device.h +++ b/include/wlr/interfaces/wlr_input_device.h @@ -25,6 +25,12 @@ void wlr_input_device_init(struct wlr_input_device *wlr_device, */ void wlr_input_device_finish(struct wlr_input_device *wlr_device); +/** + * Calls the specialized input device destroy function. + * If the wlr_input_device is not owned by a specialized input device, the + * function will finish the wlr_input_device, and either call its implementation + * destroy function if one has been given, or free the wlr_input_device. + */ void wlr_input_device_destroy(struct wlr_input_device *dev); #endif -- cgit v1.2.3