libweston: add heads_changed hook
Add a hook for compositors to get a callback when heads are added or their connection status changes, to which compositors likely want to react to by enabling or disabling outputs (API for that to be added later). As many head changes as possible should be coalesced into a single heads_changed call. Therefore the callback is made from an idle task. This anticipates a future atomic output configuration API, where the global output configuration is tested and set atomically instead of one by one. weston_pending_output_coldplug() needs to manually execute the heads_changed call so that initial outputs are created before any plugins get their start-up idle tasks ran. This is especially important for ivi-shell which does not support output hotplug, and for tests to guarantee the expected outputs. v6: - fix a typo - add comment in weston_pending_output_coldplug() Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk> Reviewed-by: Derek Foreman <derekf@osg.samsung.com> Reviewed-by: Ian Ray <ian.ray@ge.com>
Loading
Please register or sign in to comment