From: Pekka Paalanen <pekka.paala...@collabora.co.uk>
this might be slightly premature, but I wanted to extract before-hand as
many patches from the clone mode series as I could because it will be a
very long series anyway. These patches prepare the desktop-shell to cope
with shared-CRTC clone mode.
Patches 1 and 2 improve weston-desktop-shell client's resilience towards
uncommon conditions: badly configured surface size and missing
Patches 3 and 4 improve the desktop-shell plugin's resilience against a
helper client that attempts to set multiple backgrounds or panels for
the same output.
All the above patches could be seen as just proofing those components
against corner cases or bugs.
Patch 5 is specific to clone mode.
The theory of clone mode operation is as follows:
The compositor has one weston_output which is exposed as multiple
wl_output objects, one for each cloned monitor. Weston-desktop-shell
client naturally attempts to set up backgrounds and panels for all
wl_outputs it finds. Since the wl_outputs all refer to the same
weston_output, the desktop-shell plugin will be facing multiple attempts
to set a background or panel for the same weston_output. The plugin will
accept the first attempt as usual, but respond all later attempts with a
configure event suggesting the size 0x0. This is the hint for
weston-desktop-shell that the background or panel is not actually
needed. Patch 5 is there to handle a corner case with hot-unplug of a
While all this works as is, it does raise an interesting question: how
would we handle clone mode with separate weston_outputs? How to handle
weston_outputs that just happen to show the same area of the desktop?
What if weston_outputs show partially overlapping areas of the desktop?
I suppose in such case we'd have to forget about trying the background
and panel to a specific wl_output or weston_output, and start laying
them out in the global compositor space. Luckily, libweston does not
support overlapping weston_outputs at the moment, so the question is not
These patches can also be found in a branch:
Pekka Paalanen (5):
clients/desktop-shell: avoid invalid sized background
clients/desktop-shell: avoid invalid sized panel
desktop-shell: handle redundant backgrounds
desktop-shell: handle redundant panels
clients/desktop-shell: preserve background/panel in clone mode
clients/desktop-shell.c | 101 ++++++++++++++++++++++++++++++++++++++++++++----
desktop-shell/shell.c | 48 ++++++++++++++++-------
2 files changed, 127 insertions(+), 22 deletions(-)
wayland-devel mailing list