[PATCH weston 5/6] compositor: forbid sub-surface nesting loops

2013-05-17 Thread ppaalanen
From: Pekka Paalanen pekka.paala...@collabora.co.uk The only way to create a sub-surface loop by recursive nesting is to make the main surface (which does not have a role) a sub-surface of any of its sub-surfaces. All other cases should already be cought. This change checks for that exact case,

Re: [PATCH weston 5/6] compositor: forbid sub-surface nesting loops

2013-05-17 Thread Bill Spitzak
Is it impossible to change the parent of an existing subsurface? If it is possible then ABC and attempting to change B's parent to C will produce a loop and not get detected by this test since get_main_surface(C) is A which is not equal to B. If this is not possible it seems pretty limiting

Re: [PATCH weston 5/6] compositor: forbid sub-surface nesting loops

2013-05-17 Thread Daniel Stone
On 17 May 2013 21:09, Bill Spitzak spit...@gmail.com wrote: Is it impossible to change the parent of an existing subsurface? Yes. If this is not possible it seems pretty limiting as clients have to destroy and recreate surfaces to make some rearrangements. No, they only have to destroy and