[PATCH weston v5 11/36] libweston: add weston_head::connected

Pekka Paalanen ppaalanen at gmail.com
Mon Feb 5 10:43:04 UTC 2018


On Fri, 2 Feb 2018 13:52:37 -0600
Derek Foreman <derekf at osg.samsung.com> wrote:

> On 2017-12-14 05:40 AM, Pekka Paalanen wrote:
> > From: Pekka Paalanen <pekka.paalanen at collabora.co.uk>
> > 
> > Heads may be disconnected or connected and the compositor needs to be
> > able to know the state to know which heads to take into use.
> > 
> > Currently a single head is automatically created with an output, and
> > outputs are only ever created as connected and destroyed on
> > disconnection, so it suffices to set connected to true. In the future,
> > backends are expected to create heads for both connected and
> > disconnected connectors, so that a connector can be forced on without it
> > being actually connected.
> > 
> > Signed-off-by: Pekka Paalanen <pekka.paalanen at collabora.co.uk>
> > ---
> >   libweston/compositor.c | 64 ++++++++++++++++++++++++++++++++++++++++++++++++++
> >   libweston/compositor.h | 10 ++++++++
> >   2 files changed, 74 insertions(+)
> > 
> > diff --git a/libweston/compositor.c b/libweston/compositor.c
> > index b0d1629e..349803e8 100644
> > --- a/libweston/compositor.c
> > +++ b/libweston/compositor.c

> > +/** Is the head currently enabled?
> > + *
> > + * \param head The head to query.
> > + * \return Video status.
> > + *
> > + * Returns true if the head is currently transmitting a video stream.
> > + *
> > + * This is independent of the head being connected.
> > + *
> > + * \sa weston_head_is_connected
> > + * \memberof weston_head
> > + */
> > +WL_EXPORT bool
> > +weston_head_is_enabled(struct weston_head *head)
> > +{
> > +	if (!head->output)
> > +		return false;
> > +
> > +	return head->output->enabled;
> > +}  
> 
> I suppose if I'm trying to be as pedantic possible, I wasn't expecting 
> to see this function added from the content of the commit log.
> 
> Reviewed-by: Derek Foreman <derekf at osg.samsung.com>
> 
> And if you decide to split weston_head_is_enabled() into its own patch, 
> that's RB me too.  As is the previous "add name to weston_head" patch.

Very true.


Thanks,
pq
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 833 bytes
Desc: OpenPGP digital signature
URL: <https://lists.freedesktop.org/archives/wayland-devel/attachments/20180205/bb06b6ef/attachment-0001.sig>


More information about the wayland-devel mailing list