mirror of
https://github.com/swaywm/sway.git
synced 2026-04-25 06:46:24 -04:00
seat_cmd_cursor: do not create non-existing seat
If a seat does not exist in seat_cmd_cursor, do not create it. A seat without any attachments is useless since it will have no capabilities. This changes `input_manager_get_seat` to have an additional argument that dictates whether or not to create the seat if it does not exist.
This commit is contained in:
parent
8e60efe0bf
commit
7299b9a6ca
4 changed files with 13 additions and 9 deletions
|
|
@ -149,8 +149,10 @@ static void destroy_removed_seats(struct sway_config *old_config,
|
|||
/* Also destroy seats that aren't present in new config */
|
||||
if (new_config && list_seq_find(new_config->seat_configs,
|
||||
seat_name_cmp, seat_config->name) < 0) {
|
||||
seat = input_manager_get_seat(seat_config->name);
|
||||
seat_destroy(seat);
|
||||
seat = input_manager_get_seat(seat_config->name, false);
|
||||
if (seat) {
|
||||
seat_destroy(seat);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue