text: Don't crash if a seat has no keyboard

A keyboard might not be present in a seat, so check that before
dereferencing keyboard related pointers.

Also, use the keyboard pointer we set to shorten the code a little bit.

Signed-off-by: Derek Foreman <derekf@osg.samsung.com>
Reviewed-by: Jan Arne Petersen <janarne@gmail.com>
ivi-shell: Fix wrong condition to check return value of controller_module_init

Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
configure: bump libwayland requirements

wl_surface role error codes were added during the 1.6.90 development to
libwayland.

Reported-by: Sjoerd Simons <sjoerd.simons@collabora.co.uk>
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
compositor-x11: Fix some shutdown crashes

The assertion in x11_compositor_find_output() can trigger during normal
shutdown, for example, when moving the mouse while hitting a hotkey to
close the weston window.

Instead we can remove the assert(), return NULL, and discard events
we can't find a destination output for.

v2 Signed-off-by: Derek Foreman <derekf@osg.samsung.com>
v1 Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
compositor: introduce struct weston_backend

This is a preliminary change for libweston, with no functional modifications.
Separate the backends and the core weston_compositor struct, by creating
the weston_compositor in the main(), and having the various backends extend
the weston_backend struct, an instance of which is returned by the backend
entry point.
don't use weston_config in the backends code

This is to make them usable by future libweston users, since they will
not use weston_config.
weston_config is still used in the backends entry points, which will
later on live in their own files.
compositor: remove the weston_config field from weston_compositor

Instead of the central weston_config pointer we now store it in some
module-specific pointers. This way we can remove them one by one.
compositor: add API to manage compositor instances
compositor: move the main() to a new weston.c file
build a libweston.so used by the weston binary
libweston: allow compositors to define the logging behavior
libweston: move the child process launching and monitoring to weston

libweston still internally uses those functions, so it is not linkable
yet by other compositors.
libweston: handle the screenshoot and record bindings in weston.c

Move the code launching the screenshooter client and implementing
the screenshot protocol out of libweston, and make screenshooter.c
a generic way to hook screenshoot protocols into weston.
text: build the text-backend in weston

It uses the weston_client_launch API, which is not available in
libweston.
libweston: expose the X11 backend's API
libweston: expose the drm backend's API
libweston: make a shared library for compositor launchers
libweston: expose the wayland backend API
libweston: libweston-ify xwayland

This creates a new library, libweston-xwayland.so with the entry point
to easily spawn a xwayland server. The xwayland module now links to that
library.
libweston: version the libweston .so's and the weston include and lib paths

To be able to install many libweston versions at the same time add a '-1'
to the .so's name, such as libweston-1.so. Additionally, add it also to the
weston sdk include directory and the lib/weston directory.