aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sway/input/seat.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/sway/input/seat.c b/sway/input/seat.c
index 32b496ce..04b480d8 100644
--- a/sway/input/seat.c
+++ b/sway/input/seat.c
@@ -660,17 +660,16 @@ static void seat_apply_input_config(struct sway_seat *seat,
660 struct sway_seat_device *sway_device) { 660 struct sway_seat_device *sway_device) {
661 struct input_config *ic = 661 struct input_config *ic =
662 input_device_get_config(sway_device->input_device); 662 input_device_get_config(sway_device->input_device);
663 if (ic == NULL) {
664 return;
665 }
666 663
667 sway_log(SWAY_DEBUG, "Applying input config to %s", 664 sway_log(SWAY_DEBUG, "Applying input config to %s",
668 sway_device->input_device->identifier); 665 sway_device->input_device->identifier);
669 666
670 const char *mapped_to_output = ic->mapped_to_output; 667 const char *mapped_to_output = ic == NULL ? NULL : ic->mapped_to_output;
671 struct wlr_box *mapped_to_region = ic->mapped_to_region; 668 struct wlr_box *mapped_to_region = ic == NULL ? NULL : ic->mapped_to_region;
669 enum input_config_mapped_to mapped_to =
670 ic == NULL ? MAPPED_TO_DEFAULT : ic->mapped_to;
672 671
673 switch (ic->mapped_to) { 672 switch (mapped_to) {
674 case MAPPED_TO_DEFAULT: 673 case MAPPED_TO_DEFAULT:
675 mapped_to_output = sway_device->input_device->wlr_device->output_name; 674 mapped_to_output = sway_device->input_device->wlr_device->output_name;
676 if (mapped_to_output == NULL) { 675 if (mapped_to_output == NULL) {