summaryrefslogtreecommitdiff
path: root/sway/input/seat.c
diff options
context:
space:
mode:
authorTony Crisci <[email protected]>2018-01-17 09:49:02 -0500
committerTony Crisci <[email protected]>2018-01-17 09:49:02 -0500
commit9f54cd89359119897fed2747c373879c09ae8706 (patch)
tree024ecf284c38c5017068b82902d66ec4342f8291 /sway/input/seat.c
parenteb0f432a840dbe860b8c20f7a16e0281f9026326 (diff)
copy config references for input and seat
Diffstat (limited to 'sway/input/seat.c')
-rw-r--r--sway/input/seat.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/sway/input/seat.c b/sway/input/seat.c
index 268486ab..d134bc68 100644
--- a/sway/input/seat.c
+++ b/sway/input/seat.c
@@ -230,6 +230,7 @@ void sway_seat_set_focus(struct sway_seat *seat, swayc_t *container) {
void sway_seat_set_config(struct sway_seat *seat,
struct seat_config *seat_config) {
// clear configs
+ free_seat_config(seat->config);
seat->config = NULL;
struct sway_seat_device *seat_device = NULL;
@@ -242,11 +243,9 @@ void sway_seat_set_config(struct sway_seat *seat,
}
// add configs
- seat->config = seat_config;
+ seat->config = copy_seat_config(seat_config);
wl_list_for_each(seat_device, &seat->devices, link) {
- seat_device->attachment_config =
- seat_config_get_attachment(seat_config,
- seat_device->input_device->identifier);
+ sway_seat_configure_device(seat, seat_device->input_device);
}
}