mirror of
https://github.com/swaywm/sway.git
synced 2025-11-25 06:59:48 -05:00
copy config references for input and seat
This commit is contained in:
parent
eb0f432a84
commit
9f54cd8935
6 changed files with 37 additions and 7 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue