Commit
17bccaed intended to make the events coming from a touchscreen
paired with an unplugged output to be discarded, while an unpaired one
would just choose a different output. However, the logic was inverted
causing the opposite to happen.
Later in commit
161c6c56, the default behavior was changed to map an
output to a default output if the one specified via udev is not
present. This change is reverted by this patch.
v2: undo the change from commit
161c6c56.
v3: deal with libinput too.
struct weston_compositor *c = device->seat->compositor;
struct weston_output *output;
- if (device->output_name) {
+ if (!device->output_name) {
output = container_of(c->output_list.next,
struct weston_output, link);
evdev_device_set_output(device, output);
struct weston_compositor *c = device->seat->compositor;
struct weston_output *output;
- if (device->output_name) {
+ if (!device->output_name) {
output = container_of(c->output_list.next,
struct weston_output, link);
evdev_device_set_output(device, output);
wl_list_for_each(output, &c->output_list, link)
if (strcmp(output->name, device->output_name) == 0)
evdev_device_set_output(device, output);
- }
-
- if (device->output == NULL) {
+ } else if (device->output == NULL) {
output = container_of(c->output_list.next,
struct weston_output, link);
evdev_device_set_output(device, output);
wl_list_for_each(output, &c->output_list, link)
if (strcmp(output->name, device->output_name) == 0)
evdev_device_set_output(device, output);
- }
-
- if (device->output == NULL) {
+ } else if (device->output == NULL) {
output = container_of(c->output_list.next,
struct weston_output, link);
evdev_device_set_output(device, output);