mirror of
https://github.com/swaywm/sway.git
synced 2024-12-29 16:36:26 +01:00
input: seat: Fix seat device list not initialised before use
When being created, non first seats would get through the list of devices
without the list being first initialised -> segfault.
Issue introduced with ab0248a545
Fixes #4750: Crash when reloading Sway with multiple seats configured
This commit is contained in:
parent
939c7b2d52
commit
3334d11adc
1 changed files with 2 additions and 1 deletions
|
@ -494,6 +494,8 @@ struct sway_seat *seat_create(const char *seat_name) {
|
||||||
// init the focus stack
|
// init the focus stack
|
||||||
wl_list_init(&seat->focus_stack);
|
wl_list_init(&seat->focus_stack);
|
||||||
|
|
||||||
|
wl_list_init(&seat->devices);
|
||||||
|
|
||||||
root_for_each_workspace(collect_focus_workspace_iter, seat);
|
root_for_each_workspace(collect_focus_workspace_iter, seat);
|
||||||
root_for_each_container(collect_focus_container_iter, seat);
|
root_for_each_container(collect_focus_container_iter, seat);
|
||||||
|
|
||||||
|
@ -526,7 +528,6 @@ struct sway_seat *seat_create(const char *seat_name) {
|
||||||
seat->request_set_primary_selection.notify =
|
seat->request_set_primary_selection.notify =
|
||||||
handle_request_set_primary_selection;
|
handle_request_set_primary_selection;
|
||||||
|
|
||||||
wl_list_init(&seat->devices);
|
|
||||||
wl_list_init(&seat->keyboard_groups);
|
wl_list_init(&seat->keyboard_groups);
|
||||||
|
|
||||||
wl_list_insert(&server.input->seats, &seat->link);
|
wl_list_insert(&server.input->seats, &seat->link);
|
||||||
|
|
Loading…
Reference in a new issue