From 51cd3c07264e1c4967c5baea3f6629ac01334e97 Mon Sep 17 00:00:00 2001 From: Simon Zeni Date: Wed, 2 Mar 2022 13:57:28 -0500 Subject: interface/wlr_pointer: rework destroy sequence The destroy callback in wlr_pointer_impl has been removed. The function `wlr_pointer_finish` has been introduced to clean up the resources owned by a wlr_pointer. `wlr_input_device_destroy` no longer destroys the wlr_pointer, attempting to destroy a wlr_pointer will result in a no-op. The field `name` has been added to the wlr_pointer_impl to be able to identify a given wlr_pointer device. --- backend/x11/input_device.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'backend/x11/input_device.c') diff --git a/backend/x11/input_device.c b/backend/x11/input_device.c index 3bbbe594..9182ba8e 100644 --- a/backend/x11/input_device.c +++ b/backend/x11/input_device.c @@ -289,12 +289,8 @@ const struct wlr_keyboard_impl x11_keyboard_impl = { .name = "x11-keyboard", }; -static void pointer_destroy(struct wlr_pointer *wlr_pointer) { - // Don't free the pointer, it's on the stack -} - const struct wlr_pointer_impl x11_pointer_impl = { - .destroy = pointer_destroy, + .name = "x11-pointer", }; static void touch_destroy(struct wlr_touch *wlr_touch) { -- cgit v1.2.3