diff options
author | Robert Günzler <r@gnzler.io> | 2019-01-09 01:52:19 +0100 |
---|---|---|
committer | Robert Günzler <r@gnzler.io> | 2019-01-09 02:33:30 +0100 |
commit | 145ac2c571aad7dd8417bb9cf04407e607be0083 (patch) | |
tree | 8918fc4f912c88edaa71ef6cab280aed5f8b2927 | |
parent | d87cded568c718aa088b9ded0abf366be5b3743e (diff) |
cursor: allow mapping to all outputs
Running `input "<input>" map_to_output *` resets the mapping to all outputs
-rw-r--r-- | sway/input/seat.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/sway/input/seat.c b/sway/input/seat.c index 9422713d..e8b2cdcf 100644 --- a/sway/input/seat.c +++ b/sway/input/seat.c @@ -428,6 +428,12 @@ static void seat_apply_input_config(struct sway_seat *seat, if (mapped_to_output != NULL) { wlr_log(WLR_DEBUG, "Mapping input device %s to output %s", sway_device->input_device->identifier, mapped_to_output); + if (strcmp("*", mapped_to_output) == 0) { + wlr_cursor_map_input_to_output(seat->cursor->cursor, + sway_device->input_device->wlr_device, NULL); + wlr_log(WLR_DEBUG, "Reset output mapping"); + return; + } struct sway_output *output = output_by_name_or_id(mapped_to_output); if (output) { wlr_cursor_map_input_to_output(seat->cursor->cursor, |