diff options
author | Tony Crisci <tony@dubstepdish.com> | 2018-01-17 09:49:02 -0500 |
---|---|---|
committer | Tony Crisci <tony@dubstepdish.com> | 2018-01-17 09:49:02 -0500 |
commit | 9f54cd89359119897fed2747c373879c09ae8706 (patch) | |
tree | 024ecf284c38c5017068b82902d66ec4342f8291 /sway/config/seat.c | |
parent | eb0f432a840dbe860b8c20f7a16e0281f9026326 (diff) |
copy config references for input and seat
Diffstat (limited to 'sway/config/seat.c')
-rw-r--r-- | sway/config/seat.c | 11 |
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; |