diff options
Diffstat (limited to 'sway/config/input.c')
-rw-r--r-- | sway/config/input.c | 10 |
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) { | |||
90 | } | 90 | } |
91 | } | 91 | } |
92 | 92 | ||
93 | struct input_config *copy_input_config(struct input_config *ic) { | ||
94 | struct input_config *copy = calloc(1, sizeof(struct input_config)); | ||
95 | if (copy == NULL) { | ||
96 | wlr_log(L_ERROR, "could not allocate input config"); | ||
97 | return NULL; | ||
98 | } | ||
99 | merge_input_config(copy, ic); | ||
100 | return copy; | ||
101 | } | ||
102 | |||
93 | void free_input_config(struct input_config *ic) { | 103 | void free_input_config(struct input_config *ic) { |
94 | if (!ic) { | 104 | if (!ic) { |
95 | return; | 105 | return; |