Commit Graph

25 Commits

Author SHA1 Message Date
Lukasz Czechowski 58a0abcb58 vnc: Allow to disable Transport Layer Security
Some VNC clients, i.e. noVNC, do not support TLS encryption.
Add new argument "--disable-transport-layer-security" to
explicitly disable activation of TLS.
This will allow to extend VNC clients compatibility.

Signed-off-by: Lukasz Czechowski <lukasz.czechowski@thaumatec.com>
2024-08-14 07:48:09 +00:00
Marius Vlad 75280d2e40 frontend: Disable client resize for RDP remote outputs
Similar to the VNC backend do the same for the RDP backed, as this would
allow to get a matching output, in dimensions, to the one we are
mirroring.

This also re-works a bit the no-clients-resize to be more inline with
VNC one.

Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
2024-08-12 15:50:13 +00:00
Marius Vlad f43342cf78 frontend: Disable client resize for VNC remote outputs
As we're mirroring other outputs we shouldn't allow clients to resize
the output.

Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
2024-08-12 15:50:13 +00:00
Marius Vlad 197c5e0084 frontend: Add support for tracking parent/mirror changes
If the DRM native output is changed propagate the changes
to the mirror as well.

Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
2024-08-12 15:50:13 +00:00
Marius Vlad bd39f7edc1 frontend: Teach remote backends to use the scale from config
PipeWire/RDP/VNC were using by default scale 1, so allow
configuration using the ini config file.

Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
2024-08-12 15:50:13 +00:00
Marius Vlad d553333da8 frontend: Share a native output using 'mirror-of' keyword
This would allow to screen-share a particular output like the
following:

[output]
name=vnc
same-as=DP-5

[output]
name=rdp-0
same-as=DP-4

[output]
name=pipewire
same-as=eDP-1

Both 'vnc', 'pipewire' 'rdp-0' remote outputs would then be a
screen-share 'DP-5', respectively, 'e-DP1', or the 'DP-4' DRM output.

Currently, this is intended only for VNC, RDP and PipeWire remote outputs.

This patch exports weston_output_set_position(), and uses that for
overlapping a remote output with a native DRM one, rather than using
weston_output_move() as that has a side-effect when reflowing outputs
from shells.

Further more creating this remote output is driven entirely by compositor
signal events such that enabling an DRM native output would enable the
remote output, while disabling the native would have the same outcome
for the remote one.

Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
2024-08-12 15:50:13 +00:00
Marius Vlad 3842c1c737 frontend: Expand simple head function
In order to allow passing additional pre/post callbacks. This allows
further re-use of the simple_head_enable() function instead of
creating a similar dedicated function. We can then re-use the same
function for enabling remote outputs.

Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
2024-08-12 15:50:13 +00:00
Marius Vlad d88782bf41 frontend/man: Use 'clone-of' instead of 'same-as'
Rather than using the same key entry for the DRM backend to cloned
outputs, rename to 'clone-of'. This means that ini configuration files
will break after this change, but this should be documented with the
next Weston release.

Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
2024-08-12 15:50:13 +00:00
Leandro Ribeiro f271dd34b6 compositor: delete cms-static and cms-colord plugins
Plugins cms-static and cms-colord were deprecated with "compositor:
deprecate cms-static and cms-colord plugins", and the promise was that
we'd delete them if no one complained.

They were deprecated 2 years ago, and no one bothered. So it's about
time to delete them.

See https://gitlab.freedesktop.org/wayland/weston/-/issues/634.

Signed-off-by: Leandro Ribeiro <leandro.ribeiro@collabora.com>
2024-08-05 11:47:30 +03:00
Pekka Paalanen a16598b038 backend-drm: make libdisplay-info mandatory
Making libdisplay-info a mandatory dependency allows us to drop this old
code.

Future new features will require libdisplay-info to work, and would not
get fallback code anyway.

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
2024-07-15 14:29:02 +00:00
Marius Vlad e70d9d47fc frontend: Use simple_heads_changes for head enablement
Similarly to all the other back-ends do the same for the RDP one.

With this change the remote output will be placed, similar to the
VNC/PipeWire on the right side from the native one, when both backends
are loaded.

But ultimately this patch is about having all backends share the same
code path.

Fixes: #820
Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
2024-06-21 12:43:55 +00:00
Pekka Paalanen 3908e3e345 frontend: remove useless if (section)
If section is NULL, weston_config_section_get_*() will assign the given
default value and return -1 with ENOENT. Hence, checking for NULL
section is unnecessary.

This cleans up only the simple cases.

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
2024-06-19 17:57:38 +00:00
Pekka Paalanen b0d5b066c5 tests: add EOTF and colorimetry mode parsing
Essentially ensures that wet_output_set_eotf_mode() and
wet_output_set_colorimetry_mode() work as intended.

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
2024-05-06 10:39:42 +00:00
Pekka Paalanen a7a47503f1 frontend: add colorimetry-mode to weston.ini
This output section key is used to program the KMS connector property
"Colorspace" when used with the DRM-backend.

This is an essential part in defining the color encoding used in the
video signal, and may allow wide color gamut even on SDR.

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
2024-05-06 10:39:42 +00:00
Pekka Paalanen 627dcde086 frontend: fix leak in wet_output_set_eotf_mode()
Found when developing tests.

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
2024-05-06 10:39:42 +00:00
Pekka Paalanen f408a245d0 frontend: drop compositor in wet_output_set_eotf_mode()
It would be painful to mock a struct wet_compositor in the tests, so
pass that one boolean as an explicit argument instead.

This makes it easier to extend the testing of the function.

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
2024-05-06 10:39:42 +00:00
Loïc Molinari f4c69abc57 libweston: Let multiple backends register the Windowed Output API
The windowed output API is implemented by the Wayland, the X11 and the
headless backends. It's currently not possible to create a secondary
headless backend when the primary backend is Wayland or X11 because
the windowed output API would be registered twice. This commit
suffixes the windowed output API names with the backend name in order
to avoid clashes: "weston_windowed_output_api_<backend>_v2".

A use case for Wayland or X11 as primary backend and headless as
secondary is for instance to request output captures on the headless
backend to avoid read backs on the primary backend's render buffers.

Signed-off-by: Loïc Molinari <loic.molinari@collabora.com>
2024-03-12 18:35:57 +00:00
Loïc Molinari 5791bdf6ec backend-headless: Improve documentation
Add a section about the headless backend to the main Weston manual
page and describe the current CLI options as well the new
`--refresh-rate` one.

Fix the incorrect list of supported transforms in the CLI usage.

Signed-off-by: Loïc Molinari <loic.molinari@collabora.com>
2024-02-22 14:26:32 +00:00
Loïc Molinari 6caeba699d backend-headless: Add support for custom refresh rates
Custom headless refresh rates can be useful to instrument clients
matching different screen configurations. This commit adds support for
that to the headless backend and exposes it to the frontend with the
"--refresh-rate" CLI option. The default refresh value is still 60 Hz.

Signed-off-by: Loïc Molinari <loic.molinari@collabora.com>
2024-02-22 14:26:32 +00:00
Diego Nieto 1db0da8c8d compositor/main: warn pipewire-output and remote-output
These warn let to recognize what can be the issue whether
pipewire-output or remote-output has been set but its
mode it is not. Without this log, if mode is not set,
the init just exits

Signed-off-by: Diego Nieto <diego.nieto.m@outlook.com>
2024-02-21 09:49:23 +00:00
Leandro Ribeiro a2f99828fe color: always set HAVE_LCMS when LittleCMS dependency is found
Up to now, HAVE_LCMS would be set only when users would build Weston
with the deprecated cms-static enabled. But we'll start using this in
libweston in the next commits, independently of cms-static being enabled
or not. So always set HAVE_LCMS when the LittleCMS dependency is found.

Signed-off-by: Leandro Ribeiro <leandro.ribeiro@collabora.com>
2024-02-13 08:59:57 -03:00
Marius Vlad 18eebe8af3 compositor/main: Warn out if started over tty/pts
A possible solution to warn out users that messages will be dropped
otherwise.

Fixes: #858

Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
2024-02-01 11:09:31 +00:00
Nicholas Niro ab747b7c79 man: Document the new 'command input' feature
Added an entry with examples into the man page and also
into frontend/main.c for the '--help' interface.

Signed-off-by: Nicholas Niro <blowfist@xroutine.net>
2024-01-26 09:32:46 +00:00
Nicholas Niro 288f552275 compositor: Add support for a command input.
This command is being executed in parallel with the westen instance,
just like the autolaunch config.

I recently came across the kiosk-shell and found out I could start a program exclusive
weston instance using it and that opened my eyes to new possibilities.

With the desktop-shell, it is necessary to set up quite a few options like the panel launchers,
the background image/color and a few other things and that indeed make the configuration file mandatory.

With the kiosk-shell all you really care about is the underlying program,
the vast majority of the configuration file options are not relevant for that shell.
That made me wonder how convenient it would be to forego the configuration file
and implement the autolaunch option directly in the weston program. That indeed worked pretty
well and that is why I decided to propose this merge request.

I think this avenue opens up a different set of uses cases for weston where rather than just have one
"big" desktop-shell instance, we could have multiple smaller and potentially specific usage instances.
Yes, it can be done with configuration files currently. But what it boils down to is convenience.
Maybe this convenience will enable other people to start more than just one weston instance
in the future. For instance, to quickly watch an image or opening up a pdf file.

This patch was made in a matter that is meant to be consistent with the intuitive
way other programs accept a command input, like so :

weston <some options> -- some_command option1 ... optionN

Further work would be necessary to remove the requirement for the '--'
option. To do that, we would need to check if the option is a valid command
and not just a mistyped option.

There may be some conflict with the current autolaunch implementation.
I'm not sure if both 'command' and 'autolaunch' could be used at the
same time using this implementation. I think it would be necessary to
have a distinct watch and pid variable in the 'wet' context variable
for the command to support this.

Signed-off-by: Nicholas Niro <blowfist@xroutine.net>
2024-01-26 09:32:46 +00:00
Pekka Paalanen 336f7fabec Rename compositor/ to frontend/
"Frontend" is a much more descriptive name for the code that is in the
directory called "compositor".

Fixes: https://gitlab.freedesktop.org/wayland/weston/-/issues/633

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
2023-12-18 15:34:26 +00:00