copy config references for input and seat

This commit is contained in:
Tony Crisci 2018-01-17 09:49:02 -05:00
parent eb0f432a84
commit 9f54cd8935
6 changed files with 37 additions and 7 deletions

View file

@ -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;