diff options
author | Tudor Brindus <me@tbrindus.ca> | 2020-04-20 17:52:52 -0400 |
---|---|---|
committer | Simon Ser <contact@emersion.fr> | 2020-04-24 18:51:22 +0200 |
commit | 3de1a3958eb43521fe5d8e3773b9a1141efb18cb (patch) | |
tree | 03d229aea457c85ef6940939489d6ab6488ce40c /sway/input | |
parent | 65302093cfef884bb0a0f86d19e842255186423c (diff) | |
download | sway-3de1a3958eb43521fe5d8e3773b9a1141efb18cb.tar.xz |
config/output: reconfigure input devices on new output
Some input rules, like `map_to_output`, are dependent on a specific
screen being present. This currently does not work for hotplugged
outputs, or outputs that are processed after the input device is
initially probed.
This commit fixes both cases, by reconfiguring inputs on each output
addition.
Fixes #5231.
Diffstat (limited to 'sway/input')
-rw-r--r-- | sway/input/seat.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/sway/input/seat.c b/sway/input/seat.c index b0e39612..36593806 100644 --- a/sway/input/seat.c +++ b/sway/input/seat.c @@ -652,6 +652,8 @@ static void seat_apply_input_config(struct sway_seat *seat, } struct sway_output *output = output_by_name_or_id(mapped_to_output); if (!output) { + sway_log(SWAY_DEBUG, "Requested output %s for device %s isn't present", + mapped_to_output, sway_device->input_device->identifier); return; } wlr_cursor_map_input_to_output(seat->cursor->cursor, @@ -701,7 +703,7 @@ static void seat_configure_keyboard(struct sway_seat *seat, } static void seat_configure_switch(struct sway_seat *seat, - struct sway_seat_device *seat_device) { + struct sway_seat_device *seat_device) { if (!seat_device->switch_device) { sway_switch_create(seat, seat_device); } |