diff options
author | Ander Conselvan de Oliveira <ander.conselvan.de.oliveira@intel.com> | 2014-04-24 15:11:17 +0300 |
---|---|---|
committer | Kristian Høgsberg <krh@bitplanet.net> | 2014-04-25 15:04:04 -0700 |
commit | a7caef964bb8a67a555af8dbe2d8a7e4b2797454 (patch) | |
tree | d5ffcb1c47cd47d6edc53666eaba809eadc9b620 /src/libinput-device.c | |
parent | ae826cead7caa46e03984955d38631ad0ea0c8fd (diff) | |
download | weston-a7caef964bb8a67a555af8dbe2d8a7e4b2797454.tar.gz |
input: Fix errors due to initializing input before creating outputs
Make sure that we don't map a device to an invalid output pointer and
intead remap devices when an output is created.
v2: fix the error with libinput too.
Diffstat (limited to 'src/libinput-device.c')
-rw-r--r-- | src/libinput-device.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libinput-device.c b/src/libinput-device.c index 753583a0..4605a769 100644 --- a/src/libinput-device.c +++ b/src/libinput-device.c @@ -264,7 +264,7 @@ notify_output_destroy(struct wl_listener *listener, void *data) struct weston_compositor *c = device->seat->compositor; struct weston_output *output; - if (!device->output_name) { + 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); |