sway

i3-compatible Wayland compositor
git clone https://git.awy.one/sway
Log | Files | Refs | README | LICENSE

commit 5bcbc0b4a95c8b9fe0f74fee9de59a8afbe401a6
parent d6ac30753ded44c5f1921a3bbccb5856d5ef6539
Author: Ronan Pigott <rpigott@berkeley.edu>
Date:   Thu, 15 Oct 2020 15:52:55 -0600

seat: use default output mapping if there is no input config

Diffstat:
Msway/input/seat.c | 11+++++------
1 file changed, 5 insertions(+), 6 deletions(-)

diff --git a/sway/input/seat.c b/sway/input/seat.c @@ -660,17 +660,16 @@ static void seat_apply_input_config(struct sway_seat *seat, struct sway_seat_device *sway_device) { struct input_config *ic = input_device_get_config(sway_device->input_device); - if (ic == NULL) { - return; - } sway_log(SWAY_DEBUG, "Applying input config to %s", sway_device->input_device->identifier); - const char *mapped_to_output = ic->mapped_to_output; - struct wlr_box *mapped_to_region = ic->mapped_to_region; + const char *mapped_to_output = ic == NULL ? NULL : ic->mapped_to_output; + struct wlr_box *mapped_to_region = ic == NULL ? NULL : ic->mapped_to_region; + enum input_config_mapped_to mapped_to = + ic == NULL ? MAPPED_TO_DEFAULT : ic->mapped_to; - switch (ic->mapped_to) { + switch (mapped_to) { case MAPPED_TO_DEFAULT: mapped_to_output = sway_device->input_device->wlr_device->output_name; if (mapped_to_output == NULL) {