[PATCH weston 3/4] ivi-shell: don't expilicitly assign outputs to views

Pekka Paalanen ppaalanen at gmail.com
Wed Feb 7 13:22:34 UTC 2018


On Wed, 7 Feb 2018 11:54:16 +0000
"Ucan, Emre (ADITG/ESB)" <eucan at de.adit-jv.com> wrote:

> Hi,
> 
> > -----Original Message-----
> > From: Pekka Paalanen [mailto:ppaalanen at gmail.com]
> > Sent: Mittwoch, 7. Februar 2018 11:22
> > To: Ucan, Emre (ADITG/ESB)
> > Cc: wayland-devel at lists.freedesktop.org
> > Subject: Re: [PATCH weston 3/4] ivi-shell: don't expilicitly assign outputs to
> > views
> > 
> > On Fri, 26 Jan 2018 15:04:58 +0100
> > Emre Ucan <eucan at de.adit-jv.com> wrote:
> >   
> > > it is assigned in weston_view_assign_outputs
> > >
> > > Signed-off-by: Emre Ucan <eucan at de.adit-jv.com>
> > > ---
> > >  ivi-shell/ivi-layout.c | 4 ----
> > >  1 file changed, 4 deletions(-)
> > >
> > > diff --git a/ivi-shell/ivi-layout.c b/ivi-shell/ivi-layout.c
> > > index 3c52ce1..4799c25 100644
> > > --- a/ivi-shell/ivi-layout.c
> > > +++ b/ivi-shell/ivi-layout.c
> > > @@ -821,10 +821,6 @@ commit_screen_list(struct ivi_layout *layout)
> > >
> > >  				weston_layer_entry_insert(&layout-
> > >layout_layer.view_list,
> > >  							  &ivi_view->view-
> > >layer_link);
> > > -
> > > -				ivi_view->view->output = iviscrn->output;  
> > 
> > Hi,
> > 
> > I understand the removal of this.
> >   
> > > -				ivi_view->ivisurf->surface->is_mapped =  
> > true;  
> > > -				ivi_view->view->is_mapped = true;  
> > 
> > However, I would think these are still necessary. Why are they not
> > necessary here?
> > 
> > I do not see any other place that would set is_mapped=true for the view
> > and the surface.  
> 
> Yes, you are right. They are necessary. It is weird for me that we
> have to set surface and view mappedness in shell plugin. A surface is
> mapped if it has a mapped view. A view is mapped if it is in the view
> list of the compositor. Shell plugin should not take care of this.

I suppose surface being mapped when it has a mapped view would mostly
work, except I'm unsure of the sub-surface implementation, which
dynamically creates and destroys views as necessary, and it is done
lazily only during repaints. The surface is_mapped is essentially
client-visible state, a surface must not become mapped or unmapped
without client action IIRC.

View being mapped when it is in the view list is not that simple
either. The main flat view list is not the authoritative view list, it
is derived state that is updated lazily. Views are primarily on
weston_layers, and weston_layers are in compositor's list. Layers can
be removed and added to the compositor list to hide/show groups of
surfaces (say, virtual desktops, perhaps). This again must not affect
the surface is_mapped. View is_mapped is purely compositor internal
state.

It is a mess, but I don't have good ideas to make it simpler.

> Anyway, I will send a new modified patch. Is it ok for you that I
> send an update only for this patch ?

Yes, please.


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/20180207/32332efe/attachment.sig>


More information about the wayland-devel mailing list