From 743d34538333e4111a71fad32668335dff9a4822 Mon Sep 17 00:00:00 2001 From: Brian Ashworth Date: Sun, 3 Feb 2019 14:00:37 -0500 Subject: Merge pull request #3563 from vilhalmer/fix-wildcard-seat-constrain-crashes-during-reconfig Fix wildcard seat constrain crashes during reconfig --- sway/input/cursor.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'sway/input') diff --git a/sway/input/cursor.c b/sway/input/cursor.c index c38d8d3a..01aae79d 100644 --- a/sway/input/cursor.c +++ b/sway/input/cursor.c @@ -1459,7 +1459,11 @@ void handle_pointer_constraint(struct wl_listener *listener, void *data) { void sway_cursor_constrain(struct sway_cursor *cursor, struct wlr_pointer_constraint_v1 *constraint) { struct seat_config *config = seat_get_config(cursor->seat); - if (config->allow_constrain == CONSTRAIN_DISABLE) { + if (!config) { + config = seat_get_config_by_name("*"); + } + + if (!config || config->allow_constrain == CONSTRAIN_DISABLE) { return; } -- cgit v1.2.3-54-g00ecf