From 0f3b38365d07bb3e65b5ce2ec265453115276d1d Mon Sep 17 00:00:00 2001 From: Simon Zeni Date: Mon, 31 Jan 2022 10:53:58 -0500 Subject: types/wlr_switch: add base wlr_input_device wlr_switch owns its wlr_input_device. It will be initialized when the switch is initialized, and finished when the switch is destroyed. --- include/wlr/interfaces/wlr_switch.h | 2 +- include/wlr/types/wlr_switch.h | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) (limited to 'include/wlr') diff --git a/include/wlr/interfaces/wlr_switch.h b/include/wlr/interfaces/wlr_switch.h index 83a1365b..cce55f98 100644 --- a/include/wlr/interfaces/wlr_switch.h +++ b/include/wlr/interfaces/wlr_switch.h @@ -16,7 +16,7 @@ struct wlr_switch_impl { }; void wlr_switch_init(struct wlr_switch *switch_device, - struct wlr_switch_impl *impl); + struct wlr_switch_impl *impl, const char *name); void wlr_switch_destroy(struct wlr_switch *switch_device); #endif diff --git a/include/wlr/types/wlr_switch.h b/include/wlr/types/wlr_switch.h index 93db04c5..a0b9562f 100644 --- a/include/wlr/types/wlr_switch.h +++ b/include/wlr/types/wlr_switch.h @@ -16,6 +16,8 @@ struct wlr_switch_impl; struct wlr_switch { + struct wlr_input_device base; + struct wlr_switch_impl *impl; struct { -- cgit v1.2.3