input: Send leave and enter pair when the surface moves under the cursor

The client needs to know that the pointer is at a different position in
its surface.  We can't send motion as that corresponds to the pointer
actually moving.  Leaving the surface and entering at the new position
is a better semantic match and doesn't correspond to pointer motion
or user input.

https://bugs.freedesktop.org/show_bug.cgi?id=71927
compositor-headless: create input devices

Fixes a segfault when using compositor-headless for the test suite
as many tests assume there are input devices and try to use them
through the wl_test interface.

Signed-off-by: Emilio Pozuelo Monfort <emilio.pozuelo@collabora.co.uk>
noop-renderer: Set the buffer size on attach requests

This lets the compositor know the size of the surface as calculated
in weston_surface_set_size_from_buffer(), and fixes a couple of
tests when using the headless backend.

Signed-off-by: Emilio Pozuelo Monfort <emilio.pozuelo@collabora.co.uk>
noop-renderer: Read the shm buffer contents on attach

The noop-renderer doesn't read buffer contents, which means bad
buffers go undetected. Thus, read the buffer contents just for
the purpose of triggering SIGBUS (and having the client killed).

Fixes the bad-buffer test when run against the headless backend.

Signed-off-by: Emilio Pozuelo Monfort <emilio.pozuelo@collabora.co.uk>
tests: Skip buffer-count if EGL initialization fails

That is the case when using the headless backend. In the future
we may be able to use the mesa null egl platform but for now let's
just skip it.

Signed-off-by: Emilio Pozuelo Monfort <emilio.pozuelo@collabora.co.uk>
tests: use the headless backend to run the test suite

Other backends can be used by passing BACKEND=some-backend.so, e.g.

    $ make check BACKEND=x11-backend.so

Signed-off-by: Emilio Pozuelo Monfort <emilio.pozuelo@collabora.co.uk>
tests: Properly report skipped tests

We were calling exit(0) when tests were skipped, which counted
them as passed instead of skipped. Fix this by properly exiting
with 77 (which is what automake expects for skipped tests) from
the tests themselves, then returning 77 again from weston-test-runner
if all the tests were skipped. Finally the weston-test.so module
catches weston-test-runner's exit code and uses it as an exit code,
which is what automake will see and use.

Signed-off-by: Emilio Pozuelo Monfort <emilio.pozuelo@collabora.co.uk>
Improvement of weston.ini.man. Add key:shell and remove tablet-shell

Add description of key:shell to CORE SECTION and move a example of desktop-shell from key:modules to key:shell.
Add cms-colord.so to key:modules of CORE SECTION.

Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
exposay: arrange views per-output

https://bugs.freedesktop.org/show_bug.cgi?id=73173
exposay: don't crash if a view goes away

When a view was destroyed while we were on exposay, we didn't
remove it from the list of views, and so when leaving exposay
we were trying to animate (and sometimes activate) a
non-existent view, causing a crash.

Signed-off-by: Emilio Pozuelo Monfort <emilio.pozuelo@collabora.co.uk>
toytoolkit: avoid unnecessary redraws when focus changes

Clients that need to be redrawn when the focus changes do that by
listening to focus_changed and scheduling a redraw.

This was causing unnecessary redraws in the clients, as could be
easily seen by changing focus on weston-flower.

Signed-off-by: Emilio Pozuelo Monfort <emilio.pozuelo@collabora.co.uk>
exposay: avoid needlessly activating the active view

Signed-off-by: Emilio Pozuelo Monfort <emilio.pozuelo@collabora.co.uk>
xdg-shell: Remove "edges" from description

The parameter was dropped...
window: Remove window_location enum

It's unused except for one easily-replaceable place.
Reorder the xdg_shell implementations to fit the spec'd order
clients: Add support for the minimize button
clients: Add delete handler for simple-shm / simple-egl

It seems this was forgotten in the port. Just add two empty
handlers for now...
xdg-shell: Rename focused_set / focused_unset to activated / deactivated

To try and make the distinction between this event and keyboard focus.
xdg-shell: Replace the set_* atrocity with a new approach

Rather than require that the client implement two methods for every state,
simply have one global request, change_state, and one global event,
request_change_state.