clients/desktop-shell: preserve background/panel in clone mode
authorPekka Paalanen <pekka.paalanen@collabora.co.uk>
Thu, 7 Dec 2017 13:30:18 +0000 (15:30 +0200)
committerPekka Paalanen <pekka.paalanen@collabora.co.uk>
Mon, 12 Feb 2018 11:14:39 +0000 (13:14 +0200)
commitc1bcce6a259fa658129e6356098c3985dc50b0a0
tree3ab35d9fa8fb04910c93b924a763875651daf77f
parent1a0239e40ffc945b55a4f3218ae9a41ce0f143e3
clients/desktop-shell: preserve background/panel in clone mode

In shared-CRTC clone mode there are several wl_output globals for one
weston_output. Only one panel and background is needed per
weston_output, so the extra wl_outputs do not get their own panel and
background.

When a head is unplugged, the corresponding wl_output is removed. If
that was the wl_output associated with the background and panel
surfaces, we must transfer the ownership to a remaining wl_output that
was a clone to avoid losing the background and panel completely.

The transfer relies on desktop-shell.so implementation to register
background and panel surfaces with the weston_output, not the
weston_head, so it does not actually matter the wl_output used to bind
the surfaces is going away.

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