compositor-wayland: migrate to head-based output API
authorPekka Paalanen <pekka.paalanen@collabora.co.uk>
Wed, 25 Oct 2017 12:51:37 +0000 (15:51 +0300)
committerPekka Paalanen <pekka.paalanen@collabora.co.uk>
Tue, 17 Apr 2018 12:19:57 +0000 (15:19 +0300)
commitc80e954123dc824cbdf679328200a5440d78f1e6
tree511adfe6463db33a904c9cbed7e3825126b0e0b5
parent39069fa27c1a925fa36a63cd4fcc58e22baad8e9
compositor-wayland: migrate to head-based output API

Follow the standard pattern used in the headless and x11 backend
migration, but also cater for the two other backend modes: --sprawl or
fullscreen-shell, and --fullscreen.

Stops relying on the implicit weston_output::head.

Unlike other backends, this uses the attach_head hook to do the
required head setup that is not possible to do without an output, but
must be done before weston_output_enable(). This also requires the
detach_head hook for the one case where the user attaches a --fullscreen
head and then detaches it without enabling the output.

It is a little awkward to fully initialize heads as late as attach, but
aside from the --sprawl/fullscreen-shell case, there is not really a way
to know the head properties without creating the parent wl_surface and
configuring it.

Heads/outputs created for parent outputs now have distinct names instead
of all being called "wlparent".

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Reviewed-by: Ian Ray <ian.ray@ge.com>
Acked-by: Derek Foreman <derekf@osg.samsung.com>
libweston/compositor-wayland.c