desktop-shell: handle redundant backgrounds
authorPekka Paalanen <pekka.paalanen@collabora.co.uk>
Thu, 7 Dec 2017 09:44:18 +0000 (11:44 +0200)
committerPekka Paalanen <pekka.paalanen@collabora.co.uk>
Mon, 12 Feb 2018 11:14:39 +0000 (13:14 +0200)
commitff5e88d2765a1888f1f06a5198e5204a379ce5e3
treefb015245e990b18a740f275c938ab57bddaaa22f
parent1cbfcf49a76ae1f2b67c0f8fb906923fb40a1b22
desktop-shell: handle redundant backgrounds

If for some reason the helper client weston-desktop-shell would create
more than one background surface for the same weston_output, this code
would corrupt the surface destroy listener list by adding a link already
in one list into another list.

Instead, do not store the new, redundant background surface and do not
subscribe to its destruction. Also, tell the helper that the surface is
redundant by configuring it with a 0x0 size, so that we don't waste
memory on a background that is never used.

(Clone mode is a valid reason why weston-desktop-shell could do that.)

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Reviewed-by: Daniel Stone <daniels@collabora.com>
desktop-shell/shell.c