diff options
author | Ronan Pigott <rpigott@berkeley.edu> | 2020-10-15 15:52:55 -0600 |
---|---|---|
committer | Simon Ser <contact@emersion.fr> | 2020-10-16 18:34:09 +0200 |
commit | 5bcbc0b4a95c8b9fe0f74fee9de59a8afbe401a6 (patch) | |
tree | 181f8885b2f1df77bfb8dc33788ce26a9002304e /sway/input | |
parent | swaybar: don't expand separator_block_width if separator is false (diff) | |
download | sway-5bcbc0b4a95c8b9fe0f74fee9de59a8afbe401a6.tar.gz sway-5bcbc0b4a95c8b9fe0f74fee9de59a8afbe401a6.tar.zst sway-5bcbc0b4a95c8b9fe0f74fee9de59a8afbe401a6.zip |
seat: use default output mapping if there is no input config
Diffstat (limited to 'sway/input')
-rw-r--r-- | sway/input/seat.c | 11 |
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) { |