On Fri, 2 Feb 2018 14:31:59 -0600
Derek Foreman <der...@osg.samsung.com> wrote:

> On 2017-12-14 05:40 AM, Pekka Paalanen wrote:
> > From: Pekka Paalanen <pekka.paala...@collabora.co.uk>
> > 
> > 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.  
> 
> Thanks for explaining this here, as I would've been wondering why 
> otherwise - perhaps a brief comment in the code?

Sure.

> > 
> > Signed-off-by: Pekka Paalanen <pekka.paala...@collabora.co.uk>
> > ---
> >   libweston/compositor.c | 79 
> > +++++++++++++++++++++++++++++++++++++++++++++++++-
> >   libweston/compositor.h |  8 +++++
> >   2 files changed, 86 insertions(+), 1 deletion(-)

> > @@ -4457,6 +4492,30 @@ weston_compositor_add_head(struct weston_compositor 
> > *compositor,
> >   
> >     wl_list_insert(compositor->head_list.prev, &head->compositor_link);
> >     head->compositor = compositor;
> > +   weston_compositor_schedule_heads_changed(compositor);
> > +}
> > +
> > +/** Set the function to be called when heads change
> > + *
> > + * \param compositor The compositor.
> > + * \param cb The function to call, or NULL for none.
> > + *
> > + * Setting the function overrides any previous setting.
> > + *
> > + * The callback function will be called after heads are added or their
> > + * connection status has changed. Several changes may be accumulated into a
> > + * single call. The user is expected to iterate over the existing heads and
> > + * checking their status to find out what changed.  
> 
> check their statuses
> 
> Reviewed-by: Derek Foreman <der...@osg.samsung.com>
> as is patch 12

Yup.


Thanks,
pq

Attachment: pgppq0fg24rHO.pgp
Description: OpenPGP digital signature

_______________________________________________
wayland-devel mailing list
wayland-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/wayland-devel

Reply via email to