Skip to content
Snippets Groups Projects
Commit 37e6c9e5 authored by Pekka Paalanen's avatar Pekka Paalanen
Browse files

libweston: add heads_changed_signal


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.

v8:
- Change the callback function pointer into a wl_signal. The API is
  changed and renamed.

v6:
- fix a typo
- add comment in weston_pending_output_coldplug()

Signed-off-by: Pekka Paalanen's avatarPekka Paalanen <pekka.paalanen@collabora.co.uk>
v6 Reviewed-by: default avatarDerek Foreman <derekf@osg.samsung.com>
v6 Reviewed-by: default avatarIan Ray <ian.ray@ge.com>
Reviewed-by: Daniel Stone's avatarDaniel Stone <daniels@collabora.com>
Acked-by: default avatarDerek Foreman <derekf@osg.samsung.com>
parent 1adcbacd
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment