aboutsummaryrefslogtreecommitdiff
path: root/sway/config.c
diff options
context:
space:
mode:
authorBrian Ashworth <bosrsf04@gmail.com>2019-02-03 13:56:05 -0500
committerBrian Ashworth <bosrsf04@gmail.com>2019-02-03 14:01:29 -0500
commit7299b9a6ca3658852f2ff41b05f6aaa86ff90d81 (patch)
tree8e54c4ee9dd0ffceecf5a99f91a341fd1d714c5e /sway/config.c
parent8e60efe0bf771120818b675d54c87b091c68fd70 (diff)
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.
Diffstat (limited to 'sway/config.c')
-rw-r--r--sway/config.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/sway/config.c b/sway/config.c
index 54d29fc9..ee1c42df 100644
--- a/sway/config.c
+++ b/sway/config.c
@@ -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);
+ }
}
}
}