diff options
author | Simon Zeni <simon@bl4ckb0ne.ca> | 2022-03-02 14:17:31 -0500 |
---|---|---|
committer | Kirill Primak <vyivel@eclair.cafe> | 2022-03-07 16:37:41 +0000 |
commit | 0d2be496a899a0c6736dc504ba482e647bd3aa03 (patch) | |
tree | 52dc80ee5ea11fd3454280f8d32d1d0e276ba680 /include/wlr | |
parent | 51cd3c07264e1c4967c5baea3f6629ac01334e97 (diff) |
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.
Diffstat (limited to 'include/wlr')
-rw-r--r-- | include/wlr/interfaces/wlr_switch.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/include/wlr/interfaces/wlr_switch.h b/include/wlr/interfaces/wlr_switch.h index fbf5e6cb..793ed25c 100644 --- a/include/wlr/interfaces/wlr_switch.h +++ b/include/wlr/interfaces/wlr_switch.h @@ -12,11 +12,11 @@ #include <wlr/types/wlr_switch.h> struct wlr_switch_impl { - void (*destroy)(struct wlr_switch *switch_device); + const char *name; }; void wlr_switch_init(struct wlr_switch *switch_device, const struct wlr_switch_impl *impl, const char *name); -void wlr_switch_destroy(struct wlr_switch *switch_device); +void wlr_switch_finish(struct wlr_switch *switch_device); #endif |