[PATCH][weston] ivi-shell: initialize all fields in create_layout_transition

Bryce Harrington bryce at osg.samsung.com
Thu Sep 24 13:54:41 PDT 2015


On Wed, Sep 23, 2015 at 11:05:31PM +0200, John-John Tedro wrote:
> On Tue, Sep 22, 2015 at 06:18:44PM -0700, Bryce Harrington wrote:
> > ivi_layout_transition_fade_layer() checks for null before making the
> > call, but this also needs done in create_visibility_transition(),
> > ivi_layout_transition_move_resize_view(), and
> > ivi_layout_transition_move_layer().  Or alternatively,
> > layout_transition_register() could check its input for null and return
> > false.  Either way, all callers of layout_transition_register() should
> > also be checking its return value and doing whatever should be done in
> > response.
> > 
> > Anyone want to send in some follow up's here?
> 
> I'm currently investigating.
> 
> I see two easy solutions, so please advice since I'm unfamiliar with
> the requirements on IVI-based solutions.
> 
> 1) Bail, easy and safe, but might not be desirable.
> 
> 2) Immediately transition into the desired state on errors.
>    Slightly harder, but doable.
> 
> Examples for 2):
> ivi_layout_transition_move_layer would update the size and position of
> the target surface.
> ivi_layout_transition_visibility_on/off would immediately set the
> surface to the requested visibility.
> 
> What do you think?

I'll defer to the IVI guys, but to help keep things moving why not try
the easy way first.  Nearly always in error handling, simple and safe is
the best course of action...

Bryce
 
> -- 
> John-John Tedro

> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1
> 
> iF4EAREIAAYFAlYDFBsACgkQ5by1jT7KQLnf/gD/b6Cf9WpKOAiRRYiXThCplQdP
> 072dZXQy1SQ0fZpQUrsA/jG+zZJWbVqFN9L8543DCjQ29U624vqg0nsEkXIOxsF8
> =ccdZ
> -----END PGP SIGNATURE-----



More information about the wayland-devel mailing list