configure.ac: Indicate headless compositor presence in config.h

Signed-off-by: Bryce Harrington <bryce@osg.samsung.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
compositor-headless: allow rendering with pixman

Allow the headless backend to render into an off screen buffer with pixman.

Signed-off-by: Bryce Harrington <bryce@osg.samsung.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
compositor-headless: add support for transforms set on command line

We now allow --transform with the headless compositor, however it still
doesn't parse anything out of weston.ini

Signed-off-by: Bryce Harrington <bryce@osg.samsung.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
compositor: Document options for headless compositor

Signed-off-by: Bryce Harrington <bryce@osg.samsung.com>

[Pekka: s/Wayland surface/memory surface/, and say default renderer.]
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
tests: Allow tests to use customized command line parameters

Tests will now return the extra command line parameters they need
when run with --params

Signed-off-by: Bryce Harrington <bryce@osg.samsung.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
input: don't run the key bindings on focus in

When getting the focus we get the list of pressed keys, but we are
not supposed to run the key binding on them.

Reviewed-by: Daniel Stone <daniel@fooishbar.org>
desktop-shell: don't crash input-panel if no kbd focus

If a keyboard exists but it has no current focus, yet something asks the
input-panel to come up, we would crash here. Check that there is a focus
before attempting to use it.

Maybe there should not even exist a case where input-panel tries to come
up without a keyboard focus, but I am not sure there is no race where it
could happen.

In any case, this fix was brought up by the ivi-shell work, where I
suppose you can somehow hit it.

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Cc: Tanibata, Nobuhiko <ntanibata@jp.adit-jv.com>
compositor: Drop legacy backends in favor of libinput

Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
configure: remove input backend result

Don't print a line with empty value.

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
simple-shm: explain two initial roundtrips

Explain carefully why we need two roundtrips, not just one, not just
dispatch and roundtrip, but two roundtrips after creating the
wl_registry object.

v2: Explain what initial events are, and that this is a general
technique.

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Reviewed-by: Marek Chalupa <mchqwerty@gmail.com>
input: Use slightly less obscure logic in evdev_notify_keyboard_focus()

While the test is actually correct (for non-negative numbers), it's not
at all clear and seems to be an accidental order of operations mistake.

Also, add an assert() to make sure this number is never negative.

Closes bug 86346 - https://bugs.freedesktop.org/show_bug.cgi?id=86346

Signed-off-by: Derek Foreman <derekf@osg.samsung.com>
Reviewed-by: Marek Chalupa <mchqwerty@gmail.com>
dnd: Fix some mouse cursor issues

When ending a drag in the window the cursor will be wrong until the mouse
is moved again.  This is because the item being dragged isn't added
until after the enter event.

Also, when picking up an item while moving the mouse the cursor can switch
back to a non-drag cursor before the drag begins.  This is because of a
slight delay between button click and drag start.

Finally picking up or dropping an item under a second pointer could cause
that pointer to have the wrong cursor.

Closes one of the issues in bug 56298
https://bugs.freedesktop.org/show_bug.cgi?id=56298

Signed-off-by: Derek Foreman <derekf@osg.samsung.com>
Tested-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
tests: Include "config.h" as first header

Signed-off-by: Bryce Harrington <bryce@osg.samsung.com>
tests: Cleanup superfluous headers

Mostly remove headers that aren't actually needed for anything.
Add stdint.h to permit dropping xf86drm.h, which is otherwise unneeded.

Signed-off-by: Bryce Harrington <bryce@osg.samsung.com>
Acked-by: Marek Chalupa <mchqwerty@gmail.com>
Tested-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
tests: Move ARRAY_LENGTH to a shared header for reuse

Signed-off-by: Bryce Harrington <bryce@osg.samsung.com>
Reviewed-by: Marek Chalupa <mchqwerty@gmail.com>
tests: Use one shared xzalloc implementation

Since this is an inlined function, move it to a common header file.

Signed-off-by: Bryce Harrington <bryce@osg.samsung.com>
Reviewed-by: Marek Chalupa <mchqwerty@gmail.com>
clients: Use xmalloc in a few more places

Just changes some places where a malloc failure is unhandled
to our xmalloc function that exit()s a little more gracefully.

Signed-off-by: Derek Foreman <derekf@osg.samsung.com>
Reviewed-by: Bryce Harrington <b.harrington@samsung.com>
tests: simplify move_client and make it more generic

Move client right in the move_client funciton. This allows the surface
use its own configure function, so from now the client can be any
weston surface (xdg, wl_shell, ..)

Signed-off-by: Marek Chalupa <mchqwerty@gmail.com>
tests: link tests against libtoytoolkit

We want to use toytoolkit in tests. This patch also
removes collisions of symbols defined in libtoytoolkit
with symbols defined in tests (i. e. shm_listener)

Signed-off-by: Marek Chalupa <mchqwerty@gmail.com>
tests: add toytoolkit into struct client

Allow store information about toytoolkit widget in client.
Now we'll be able to get client behave as a toytoolkit client.

Signed-off-by: Marek Chalupa <mchqwerty@gmail.com>