Hook up axis events.
Modify bindings for axis event detection.
Switch zoom binding to <Super>+Scroll.
Add surface opacity controls.
shell: fix matrix invertible bug in rotation handler

While activating and deactivating rotation mechanism without moving
the pointer, rotation matrix from rotate_grab object is not being
initialised and damage shell surface rotation matrix in
rotate_grab_button handler, making it invertible.

This patch initialise rotate matrix in rotate_binding
and moves surface position check to rotate_grab_motion handler.
Secure screenshooter protocol.
window.c; Only redraw once per frame

Based on a patch from Martin Minarik <minarik11@student.fiit.stuba.sk> who
tracked down the excessive redraw problem.
config-parser: consolidate shell files into weston.ini only

The shell choice happens in the configuration file now.

Signed-off-by: Tiago Vignatti <tiago.vignatti@intel.com>
compositor-drm: Check es->image, not es->buffer when looking for overlays

es->buffer can be NULL if the client destroyed the buffer, but es->image
will be non-NULL if and only if we have a buffer we might use with KMS.
window.c: Do resize work from the repaint idle callback

This way we always make sure we handle any resizing before we start drawing.
Simplify shm buffer handling

There was a lot of code here to do a lot of work we didn't need to do.
If we damage a surface with a shm buffer attached, all we need to do
is to re-upload the damaged region to the texture.  As for drm buffers,
we don't assume anything changes on attach and only update the
regions the client tells us to update in the damage request.
compositor: Use GL_BGRA_EXT for glReadPixels in screenshooter

This needs GL_EXT_read_format_bgra.
compositor: add a weston_surface_is_mapped() helper
compositor: add weston_surface_to_global_float helper
compositor: make es->pitch consistent between shm and drm surfaces

For shm buffers, es->pitch is set using the stride of the buffer. If
the shell happened to set the surface width to something different than
the buffer width, the contents of the surface would be cropped on the
width during redraw. However, for non-shm surfaces, es->pitch was set to
the surface width. That caused the contents of the buffer to be scaled
on the width when the buffer was wider than the surface.

This makes the behavior on both cases the same: crop on the width and
scale on the height. (which is weird but consistent)
compositor: use new drag icon listener for setting up drag surfaces

That way we can get rid of the call to
weston_compositor_update_drag_surfaces() on shell->map().
compositor: refactor surface_attach()

surface_attach() does two things: sets up a new buffer as the contents
of the given surface and then calls into shell so it can setup the
position of the surface and map it if necessary. However we do not want
the shell to meddle with some internal surfaces such as drag surfaces.

The intention of this refactoring is to make room for making the part
that calls into shell a virtual function that the compositor can
override for these internal surfaces.

This changes weston_buffer_attach() so it handle all the logic of tying
a buffer to a surface, including unmapping it when the buffer is NULL.
The shell map() vs. configure() logic is then split into a another
function: surface_configure(). In a later commit, this function will be
turned into a function pointer in struct weston_surface.
compositor: make surface_configure() a vfunc

This allows us to move the logic that calls shell->map() or
shell->configure() into shell while allowing it to be overriden for
surfaces that should not be handle by the shell, such as drag icons.

This patch adds a pointer function called configure to weston_surface,
moves the currsent surface_configure() code into shell and implements
a separate configure() for drag surfaces.
compositor: move force_configure field to shell_surface
evdev: reuse code for device removal

Just like device_added, now the routines to close the compositor and vt switch
leave are using the same code to remove a device.

This patch also closes properly a mtdev device, bug spotted by Christopher
Michael.

Signed-off-by: Tiago Vignatti <tiago.vignatti@intel.com>