mirror of
https://github.com/swaywm/sway.git
synced 2025-11-15 06:59:50 -05:00
Merge pull request #1570 from acrisci/config-references
Copy input config references
This commit is contained in:
commit
c933781fac
6 changed files with 37 additions and 7 deletions
|
|
@ -242,6 +242,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;
|
||||
|
|
@ -254,11 +255,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);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue