From 1bbf58ff5858bbb571c5e7d872efdc5b408a722f Mon Sep 17 00:00:00 2001 From: Pekka Paalanen Date: Tue, 20 Mar 2018 14:45:36 +0200 Subject: [PATCH] libinput: do not switch output associations on disable If an input device is associated to an output that then gets disabled, there is no case where associating to a different output would be correct. The output association is used for absolute positioned input devices, and an input device like a touchscreen cannot ever be automatically valid for more than one possible output - the touchscreen display device. Therefore do not automatically reassing implicitly associated input devices to another output. This removes some log spam on shutdown. In fact, if there can be more than one output at any time, absolute input devices must be explicitly configured to associate with the correct output, or the results are essentially undefined in any case. Signed-off-by: Pekka Paalanen Reviewed-by: Peter Hutterer --- libweston/libinput-device.c | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/libweston/libinput-device.c b/libweston/libinput-device.c index dbbaae3..e173861 100644 --- a/libweston/libinput-device.c +++ b/libweston/libinput-device.c @@ -434,16 +434,8 @@ notify_output_destroy(struct wl_listener *listener, void *data) struct evdev_device *device = container_of(listener, struct evdev_device, output_destroy_listener); - struct weston_compositor *c = device->seat->compositor; - struct weston_output *output; - - if (!device->output_name && !wl_list_empty(&c->output_list)) { - output = container_of(c->output_list.next, - struct weston_output, link); - evdev_device_set_output(device, output); - } else { - evdev_device_set_output(device, NULL); - } + + evdev_device_set_output(device, NULL); } /** -- 2.7.4