wayland: Report error when trying to stack subsurface incorrectly

Don't allow a client to stack a subsurface next to a subsurface with
another parent, or to a non-parent non-subsurface surface.

Signed-off-by: Jonas Ådahl <jadahl@gmail.com>

https://bugzilla.gnome.org/show_bug.cgi?id=705502
wayland: Make wl_subsurface.set_position properly synchronized

The position set by wl_subsurface.set_position should be applied when
the parent surface invokes wl_surface.commit.

Signed-off-by: Jonas Ådahl <jadahl@gmail.com>

https://bugzilla.gnome.org/show_bug.cgi?id=705502
wayland: Make wl_subsurface.place_(above|below) properly synchronized

The placement set by either wl_subsurface.place_above or
wl_subsurface.place_below should be applied when the parent surface
invokes wl_surface.commit.

Signed-off-by: Jonas Ådahl <jadahl@gmail.com>

https://bugzilla.gnome.org/show_bug.cgi?id=705502
wayland: Support wl_subsurface.set_sync/set_desync

Implement support for synchronous subsurfaces commits. This means that
the client can, by calling wl_subsurface.set_sync, cause its surface
state to be commited not until its parent commits.

This will mean there will be will potentially be one more surface state
(regions, buffer) at the same time: the active surface state, the mutable
pending surface state, and the immutable surface state that was pending
on last surface commit.

Signed-off-by: Jonas Ådahl <jadahl@gmail.com>

https://bugzilla.gnome.org/show_bug.cgi?id=705502
window: Add "skip-taskbar" property

We currently only have a method to query the skip-taskbar hint.
Add a corresponding property to allow listening for change
notifications.

https://bugzilla.gnome.org/show_bug.cgi?id=723307
window-actor: Fix unobscured_region handling when computing  paint volume

We currently ignore the unobscured region when we have mapped clones in
meta_window_actor_process_damage and meta_window_actor_damage_all but
use it unconditionally when computing the paint volume.

This is wrong. We should ignore it there as well or we will end up with
empty clones if the cloned window is completly obscured
(like the tray icons in gnome-shell).

https://bugzilla.gnome.org/show_bug.cgi?id=721596
xwayland: Shuffle some code around
wayland: Remove superfluous "wayland_" from arguments
screen: Make the guard window an InputOnly window

Using a full InputOutput window causes us to make a full Wayland surface
for it, and go through the X server. As the goal of the guard window is
a window for us to stack minimized windows under so we can prevent them
from getting input, it makes sense to use an InputOnly window here.
wayland: Use wl_callback_send_done

For no specific reason...
wayland: Clean up the parallels between creating callbacks and surface extensions
window-actor: Simplify the unredirected check in cull_out

https://bugzilla.gnome.org/show_bug.cgi?id=720631
compositor: Simplify the unredirected window management code

https://bugzilla.gnome.org/show_bug.cgi?id=720631
window-actor: Flip set_redirected around

I know it's confusing with the triple negative, but unredirected is how
we track it elsewhere: we have an 'unredirected' flag, and 'should_unredirect'.

https://bugzilla.gnome.org/show_bug.cgi?id=720631
window-actor: Remove old unused APIs

https://bugzilla.gnome.org/show_bug.cgi?id=720631
compositor: Remove pending_input_region

Ever since the change to create the output window synchronously at startup,
there hasn't been any time where somebody could set a stage region the
output window was ready, so this was effectively dead code.

https://bugzilla.gnome.org/show_bug.cgi?id=720631
wayland-pointer: Fix infinite loop when leaving focus from a destroyed surface

To prevent corruption, our focus listener needs to be removed even when
the surface is destroyed. So, bailing out when pointer->focus->resource
is NULL just isn't good enough.
wayland: Reindent
wayland: Check for launcher before freeing it

This prevents a segfault on shutdown.
display: Revise Wayland event handling

X11 window frames use special UI grab ops, like META_GRAB_OP_CLICKING_MAXIMIZE,
in order to work properly. As the frames in this case are X11 clients, we need
to pass through X events in this case. So, similar to how handle_xevent works,
use two variables, bypass_clutter, and bypass_wayland, and set them when we
handle specific events.