diff options
author | 2018-01-17 09:49:02 -0500 | |
---|---|---|
committer | 2018-01-17 09:49:02 -0500 | |
commit | 9f54cd89359119897fed2747c373879c09ae8706 (patch) | |
tree | 024ecf284c38c5017068b82902d66ec4342f8291 /sway/config/input.c | |
parent | Merge pull request #1566 from acrisci/render-loop (diff) | |
download | sway-9f54cd89359119897fed2747c373879c09ae8706.tar.gz sway-9f54cd89359119897fed2747c373879c09ae8706.tar.zst sway-9f54cd89359119897fed2747c373879c09ae8706.zip |
copy config references for input and seat
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; |