aboutsummaryrefslogtreecommitdiff
path: root/sway/config/seat.c
diff options
context:
space:
mode:
authorDrew DeVault <sir@cmpwn.com>2018-01-21 11:17:07 -0500
committerGitHub <noreply@github.com>2018-01-21 11:17:07 -0500
commitc933781facbb664fedcd52ab19f35c392cd9e7b4 (patch)
tree95b0e63411e44958364321bbfe3bc00515625cc6 /sway/config/seat.c
parent3dd915876d459a2aeeb7a5864330f5bc30bc2f00 (diff)
parent9f54cd89359119897fed2747c373879c09ae8706 (diff)
Merge pull request #1570 from acrisci/config-references
Copy input config references
Diffstat (limited to 'sway/config/seat.c')
-rw-r--r--sway/config/seat.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/sway/config/seat.c b/sway/config/seat.c
index 03cc6d4e..bd8b45c8 100644
--- a/sway/config/seat.c
+++ b/sway/config/seat.c
@@ -99,6 +99,17 @@ void merge_seat_config(struct seat_config *dest, struct seat_config *source) {
}
}
+struct seat_config *copy_seat_config(struct seat_config *seat) {
+ struct seat_config *copy = new_seat_config(seat->name);
+ if (copy == NULL) {
+ return NULL;
+ }
+
+ merge_seat_config(copy, seat);
+
+ return copy;
+}
+
void free_seat_config(struct seat_config *seat) {
if (!seat) {
return;