shell: Use weston_compositor_sleep() instead of setting DPMS state

This should have been changed when the weston_compositor_sleep() entry
point was added.
shell: Go straight to sleep if the sceensaver isn't configured

If the screensaver path is not set, nothing would set the compositor
state to sleeping. In that case, outpus DPMS state was never set to
off.
tests: Use&Fix parallel tests

Also fix automake 1.13 support

Signed-off-by: Quentin Glidic <sardemff7+git@sardemff7.net>
Makefile.am: SUBDIRS is automagic

DIST_SUBDIRS should be used for corner cases only, not for conditional
SUBDIRS:

  If `SUBDIRS' is defined conditionally using Automake conditionals,
  Automake will define `DIST_SUBDIRS' automatically from the possible
  values of `SUBDIRS' in all conditions.

Signed-off-by: Quentin Glidic <sardemff7+git@sardemff7.net>
Makefile.am: Distribute weston.ini sample

https://bugs.freedesktop.org/show_bug.cgi?id=61388
compositor-drm: Use __func__ instead of hardcoded string
compositor-drm: Fix a crash with a fullscreen surface with driver mode

If there was a fullscreen surface using driver mode when a vt switch is
triggered, but something caused it to be gone when switching back (such
as the client being killed), a call to drm_output_switch_mode() is made
to restore the old mode, and that sets the output's current drm_fb to
NULL, so that the new mode is set drm_output_repaint(). This led to a
crash in vt_func(), because it tried to access output->current for
restoring the old mode.

Fix this by not setting the mode if there's no current fb. Instead,
schedule a repaint so that the mode is set in drm_output_repaint().

https://bugs.freedesktop.org/show_bug.cgi?id=60675
update .gitignores for src/ and man/

Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
evdev: Wait for SYN event before sending events over to the client

The issue was that touch::down event from the compositor to client apps
would send the previous motion events coordinates and this obviously made
the client do the wrong thing. This happened because we were not waiting
for a SYN event to come from evdev before sending down, motion or up events.

https://bugs.freedesktop.org/show_bug.cgi?id=51909
compositor: call configure on surfaces with a null buffer too

This way the shell can know when a surface has been unmapped by
checking the value returned by weston_surface_is_mapped(surface).
The configure handlers have now width and height parameters, so
they do not need anymore to check manually the buffer size.
If a surface's buffer is NULL the width and height passed to the
configure are both 0.
Configure is now only called after an attach. The variable
weston_surface.pending.newly_attached is set to 1 on attach, and
after the configure call is reset to 0.
compositor: Make sure surface->transform.matrix,inverse are always valid

First step towards getting rid of the transform.enabled optimization.
configure.ac: Use automake color-tests
compositor: Make sure surface->transform.inverse is a complete matrix

We never init this, so we need to copy over the position matrix and then
overwrite the translation entries to make sure we have a valid matrix.

Thanks to Pekka for spotting this (twice).
compositor: Split pointer motion code into its own function
compositor: Change notify_motion to take relative motion events
tests: attach the surface's buffer when moving it

move_client() needs to attach the buffer, even if it was attached already,
because since 184df50 configure() will be called only on newly attached
surfaces, but the one that sets the test surface position is the configure
function.
compositor-drm: Determine opaqueness of a surface correctly

We subtract the screen space opaque region from the transformed surface
region.  That's going to fail for when we're scaling up a surface, since
the surface bounding box for the scaled up surface is going to be bigger
than the opaque region.  Instead, subtract the surface-space opaque region
from a 0,0 - width,height region and see if that's empty.
compositor: Fold weston_buffer_post_release into weston_buffer_reference

Nothing else calls weston_buffer_post_release and the ref-counting and
sending the release event is essentially what weston_buffer_reference is
all about.
compositor: Only send release event in response to wl_surface.attach

The current semantics would implicitly attach the most recently attached
buffer at commit time and send a release event when the buffer enventually
was released.  The implicit attach is a little too subtle though and this
patch changes the semantics to always only send release events in response
to an attach event.  As a consequence, once a compositor releases a buffer,
it no longer has a reference to it and wl_surfcea.damage is undefined.
Thus, the client side visible change is that damage request must always
be preceeded by a wl_surface.attach request, to ensure there's a valid buffer,
even if that means attaching the same buffer again.
src/Makefile.am: Fix git-version.h for out of tree builds

Use --git-dir instead of --work-tree, see
http://marc.info/?l=git&m=120390208721287&w=2

Signed-off-by: Andre Heider <a.heider@gmail.com>