From 19cab5509227b0aa0e2fbbc992a650b356b42c51 Mon Sep 17 00:00:00 2001 From: Jens Peters Date: Fri, 19 Jan 2024 10:10:02 +0100 Subject: [PATCH] seat: get output name from touch config for current device The output name attached to the touch device has still priority. --- src/seat.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/seat.c b/src/seat.c index b0cb3855..c0385108 100644 --- a/src/seat.c +++ b/src/seat.c @@ -273,7 +273,15 @@ static void map_touch_to_output(struct seat *seat, struct wlr_input_device *dev) { struct wlr_touch *touch = wlr_touch_from_input_device(dev); - char *output_name = touch->output_name ? touch->output_name : NULL; + + char *touch_config_output_name = NULL; + struct touch_config_entry *config_entry = + touch_find_config_for_device(touch->base.name); + if (config_entry) { + touch_config_output_name = config_entry->output_name; + } + + char *output_name = touch->output_name ? touch->output_name : touch_config_output_name; wlr_log(WLR_INFO, "map touch to output %s\n", output_name); map_input_to_output(seat, dev, output_name); }