On Wed, 23 Mar 2016 23:50:13 +0100
jeka <fried...@gmail.com> wrote:

> Hi,
> 
> this is indeed a change in behavior, there is a case in ivi-controller 
> where the ivi surface has not width and height it is the time between 
> the ivi surface is created but the corresponding wayland surface did not 
> received any buffer so far. Of cause wayland surface might also get 
> buffer attached with size zero but this case is not properly handled 
> currently.
> 
> I would like to skip this patch for the time being

Hi,

very well, I can easily rewrite this to not change the existing
behavior.

I just wonder, how do you get a configure call from Weston core with
zero size then? Do you have applications that do the first commit
without attaching a wl_buffer? Is there a need for them to do that?

If an application actually has a need to commit before attaching a
wl_buffer, I would presume that is because it would signal the
controller to send some feedback that is needed to allocate and draw
the buffer, e.g. the initial size via ivi_surface.configure event. In
that case, it would be necessary to forward configure calls also with
zero size rather than ignore them. But, I also don't see any mention of
such in the ivi-application.xml protocol spec.

Might be a good idea to do something like that anyway for the initial
size, perhaps? That is, *if* it is desireable to require the client to
commit after the ivi_application.surface_create request. It might not.


Thanks,
pq

> On 22.03.2016 15:48, Pekka Paalanen wrote:
> > From: Pekka Paalanen <pekka.paala...@collabora.co.uk>
> >
> > When surface size changes to zero, do not ignore it, but forward that
> > change to the controller. A controller should do what's proper for a
> > surface that just lost its content.
> >
> > Signed-off-by: Pekka Paalanen <pekka.paala...@collabora.co.uk>
> > ---
> >   ivi-shell/hmi-controller.c | 2 ++
> >   ivi-shell/ivi-shell.c      | 3 ---
> >   2 files changed, 2 insertions(+), 3 deletions(-)
> >
> > diff --git a/ivi-shell/hmi-controller.c b/ivi-shell/hmi-controller.c
> > index e9c9ab0..7c96439 100644
> > --- a/ivi-shell/hmi-controller.c
> > +++ b/ivi-shell/hmi-controller.c
> > @@ -660,6 +660,8 @@ set_notification_configure_surface(struct 
> > ivi_layout_surface *ivisurf,
> >      */
> >     surface = ivi_layout_interface->surface_get_weston_surface(ivisurf);
> >     if (surface) {
> > +           /* XXX: needs to handle zero size by unmapping the surface */
> > +
> >             ivi_layout_interface->surface_set_source_rectangle(
> >                     ivisurf, 0, 0, surface->width,
> >                     surface->height);
> > diff --git a/ivi-shell/ivi-shell.c b/ivi-shell/ivi-shell.c
> > index c502c74..fe86c27 100644
> > --- a/ivi-shell/ivi-shell.c
> > +++ b/ivi-shell/ivi-shell.c
> > @@ -118,9 +118,6 @@ ivi_shell_surface_configure(struct weston_surface 
> > *surface,
> >     if (!ivisurf)
> >             return;
> >
> > -   if (surface->width == 0 || surface->height == 0)
> > -           return;
> > -
> >     if (ivisurf->width != surface->width ||
> >         ivisurf->height != surface->height) {
> >             ivisurf->width  = surface->width;
> >  
> _______________________________________________
> wayland-devel mailing list
> wayland-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/wayland-devel

Attachment: pgpR_2QJSxFdG.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