mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2025-10-29 05:40:12 -04:00
interface/wlr_switch: rework destroy sequence
The destroy callback in wlr_switch_impl has been removed. The function `wlr_switch_finish` has been introduced to clean up the resources owned by a wlr_switch. `wlr_input_device_destroy` no longer destroys the wlr_switch, attempting to destroy a wlr_switch will result in a no-op. The field `name` has been added to the wlr_switch_impl to be able to identify a given wlr_switch device.
This commit is contained in:
parent
51cd3c0726
commit
0d2be496a8
6 changed files with 10 additions and 19 deletions
|
|
@ -21,7 +21,7 @@ void destroy_libinput_input_device(struct wlr_libinput_input_device *dev) {
|
|||
wlr_pointer_finish(&dev->pointer);
|
||||
}
|
||||
if (dev->switch_device.impl) {
|
||||
wlr_switch_destroy(&dev->switch_device);
|
||||
wlr_switch_finish(&dev->switch_device);
|
||||
}
|
||||
if (dev->touch.impl) {
|
||||
wlr_touch_destroy(&dev->touch);
|
||||
|
|
|
|||
|
|
@ -4,12 +4,8 @@
|
|||
#include "backend/libinput.h"
|
||||
#include "util/signal.h"
|
||||
|
||||
static void switch_destroy(struct wlr_switch *wlr_switch) {
|
||||
/* wlr_switch belongs to the wlr_libinput_input_device */
|
||||
}
|
||||
|
||||
const struct wlr_switch_impl libinput_switch_impl = {
|
||||
.destroy = switch_destroy,
|
||||
.name = "libinput-switch",
|
||||
};
|
||||
|
||||
void init_device_switch(struct wlr_libinput_input_device *dev) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue