aboutsummaryrefslogtreecommitdiff
path: root/sway/config/input.c
diff options
context:
space:
mode:
Diffstat (limited to 'sway/config/input.c')
-rw-r--r--sway/config/input.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/sway/config/input.c b/sway/config/input.c
index 96181302..c4f6211d 100644
--- a/sway/config/input.c
+++ b/sway/config/input.c
@@ -90,6 +90,16 @@ void merge_input_config(struct input_config *dst, struct input_config *src) {
}
}
+struct input_config *copy_input_config(struct input_config *ic) {
+ struct input_config *copy = calloc(1, sizeof(struct input_config));
+ if (copy == NULL) {
+ wlr_log(L_ERROR, "could not allocate input config");
+ return NULL;
+ }
+ merge_input_config(copy, ic);
+ return copy;
+}
+
void free_input_config(struct input_config *ic) {
if (!ic) {
return;