Clients need to know the seat name at the time they create mouse and
keyboard objects. This brings Weston in line with other compositors.
The documentation upstream currently is not super clear. It states name
is explicitly sent on bind, capabilities don't mention being sent on
bind in any way.
Signed-off-by: David Edmundson <davidedmundson@kde.org>
These should be repositioned relative to their parents, attempting to
move them independently not only doesn't make sense, but violates
weston_coord sanity checks.
Signed-off-by: Derek Foreman <derek.foreman@collabora.com>
We need libdisplay-info 0.2.0 for some features, but our wrapper
currently builds 0.1.1, leading to some surprising errors when
trying to use those features.
Bump the wrap version so if we're pulling this in from a wrap
we get the latest features.
We leave the hard dependency alone for now, as it's still not
widely deployed.
Signed-off-by: Derek Foreman <derek.foreman@collabora.com>
Add a client that creates a surface with one color using single pixel buffer.
Set to that surface an image_description created with the parametric creator of
the color management protocol.
This client can get as params:
1. Width and height
2. Color channels R, G, B, A
3. The name of primaries
4. The name of a transfer function
5. The min, max, ref luminance levels
Signed-off-by: Joan Torres <joan.torres@suse.com>
Rendering the shadow currently renders some dark color near the border inside
the inner content.
Altough the content is on top of it, if the content has some transparency,
that dark color appears and this might be unwanted.
Add an option to not render the shadow to avoid that problem.
Signed-off-by: Joan Torres <joan.torres@suse.com>
Since c4eb15d453 we keep a copy of
native mode parameters, however we forgot to initialize the
native mode parameters in some situations, which breaks the
output mirroring code when it sees uninitialized data.
Fixes c4eb15d453Fixes#949
Signed-off-by: Derek Foreman <derek.foreman@collabora.com>
Attempt to fix the following with clang-18:
../weston-9999/libweston/color-management.c:890:2: error: call to
undeclared function 'static_assert'; ISO C99 and later do not support
implicit function declarations [-Wimplicit-function-declaration] 890 |
static_assert(UINT32_MAX <= SIZE_MAX, | ^
Fixes: #948
Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
This would allow output_repaint_timer_handler() to find a backend
as well for the DRM virtual outputs created by DRM virtual API and
with it to trigger a repaint for the outputs created by
plug-ins (remoting and pipewre).
Fixes 1f8c49d5bdd20, 'compositor: repaint backends separately'
Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
Suggested-by: Michael Olbrich <m.olbrich@pengutronix.de>
With commit a1f8c49d5b, 'compositor: repaint backends
separately' a prepare repaint was introduced. Use it for DRM virtual API
to allow repainting the remoting/pipewire output.
Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
If VNC is enabled without specifying server certificate and key,
TLS won't be activated. Use regular passsword authentication
instead.
Signed-off-by: Lukasz Czechowski <lukasz.czechowski@thaumatec.com>
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>
With this, Weston can build against either FreeRDP 3.x or 2.x depending
on what has been detected by meson (3.x takes priority).
The main source of changes is the settings are now opaque and require the
use of accessors. That was pretty mechanical and seems to work on 2.x as
well.
There are a few changes around constants getting a WINPR_ prefix, the UTF
conversion functions we used are obsolete, so use the proper "new" ones,
and other fairly minor things.
The key & cert management changed rather completely, libfreerdp won't load
files for us, we have to use the helpers to do so, and I *think* the RDP RSA
key and SSL key use the same setting location. Seems to work with SSL at
least.
There was also a minor glitch with keyboard input, KBD_FLAGS_DOWN is basically
never set. It appears to be an upstream FreeRDP change in 3.x, it was being
set incorrectly (always on any key down) while it should only be set on
repeats. However the fastpath input code has no way to set it from what I
can tell, so it's just loss. We instead ignore it.
Note that the screen size is odd (and different between freerdp client and
remmina), it also won't adjust dynamically when the window is resized. I
don't think this relates to my port though, I observe the same behaviour
with the packaged FreeRDP 2 based Weston, but I can try to look into it
later
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
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>
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>
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>
This avoids dereferencing a possible stale pointer, and allows
retrieving the modeline/refresh later on when one needs to retrieve
those values. This is a temporary band-aid.
Signed-off-by: Derek Foreman <derek.foreman@collabora.com>
Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
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>
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>
The debug clear region must be generated out of the current render
buffer's damage region, not out of the current damage region, unless
shadow 16F is enabled.
Signed-off-by: Loïc Molinari <loic.molinari@collabora.com>
eglSetDamageRegion() requires a postable surface and shouldn't be
called with EGL_NO_SURFACE.
Signed-off-by: Loïc Molinari <loic.molinari@collabora.com>
commit 5fe02dc68e partially resolved the issue in #937 by bringing back
the old band-aid solution for layer moves. However, since the events of
commit bf228370ff and following commits we have a problem with
subsurfaces leaving garbage behind when minimized - see #366 which was
probably fixed for a while then became broken again.
When we minimize a view that has subsurfaces, by moving it to a layer
outside of the scene graph, we need to be sure to handle the subsurface
views - which follow their parent's layer instead of having
weston_view_move_to_layer() explicitly called.
Do this by assuming layers with an empty link are not part of the scene
graph and unmapping views when they're moved to these layers. This will
recursively unmap the subsurface views.
We can now remove the band-aid paint node destroy, as the unmap process
will destroy paint nodes as appropriate.
Fixes 5fe02dc68eFixes#937Fixes#366
Signed-off-by: Derek Foreman <derek.foreman@collabora.com>
A "mapped" surface need not have a primary output assigned, or
be in a state such that it needs a fade out animation. The view
being mapped is what we should be testing here.
Signed-off-by: Derek Foreman <derek.foreman@collabora.com>
For the following sequence, weston will not trigger a repaint:
1. create the main surface
2. create another surface and attach it as a sub-surface to the main surface
3. set the sub-surface to desync
4. attach a buffer to the main surface and commit it
5. attach a buffer to the sub-surface and commit it
Step 5 should cause the sub-surface to become mapped. However, Weston fails to
schedule a repaint in that case, so the sub-surface will not appear until
something else causes a repaint on that output, e.g. the main window.
And sub-surfaces are special when it comes to mapping because
weston_surface_is_mapped() will not return true until the parent surface is
mapped as well. So right now, weston_surface_map() may be called multiple times
and it will send the map_signal each time.
So to fix all this and make it clearer:
1. define a separate weston_surface_start_mapping() function to make it clearer
that the (sub-)surface may not be fully mapped at the end
2. check surface->is_mapped explicitly to ensure that the sub-surface is only
mapped once.
3. call weston_view_update_transform() for all views of the sub-surface when the
parent surface is already mapped to ensure that a repaint for all relevant
outputs is triggered.
The new test checks this by waiting for a frame event for the first subsurface
commit. Without these changes, the test will block until it is killed by the
timeout.
Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
The main differences is the split of cm_surface functionality with
cm_surface and cm_feedback_surface.
There can only be one cm_surface to set, unset image descriptions. When
cm_surface is destroyed, the image description is automatically unset.
There can be multiple feedback_surfaces for one surface though.
Now the "preferred_changed" signal can be an initial event.
Creator params now have a new request: set_luminances.
Signed-off-by: Joan Torres <joan.torres@suse.com>
Commit f2486c8b96 removed some helper functions for layer changes, but
the loop to delete stale paint nodes was elided.
We need to delete paint nodes on a layer change to ensure damage is tracked
properly.
Fixes f2486c8b96Fixes#937
Signed-off-by: Derek Foreman <derek.foreman@collabora.com>
If the PipeWire-backend renders to a DmaBuf, try to use a fence to synchronize
the submit of the next PipeWire buffer to the completion of the current render
process.
This ensures that the GPU rendering is finished before the buffer is passed to
PipeWire.
If fences are not available, the buffer is submitted without explicit
synchronization as before.
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Michael Tretter <m.tretter@pengutronix.de>
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>
virtme-ng is the an update version of virtme, and this patch uses
that instead of the one we had partially modified.
Besides that this partially reverts ad039cdfd2, 'backend-drm: Enable
atomic async flip support' and makes our CI happier. Specifically
ad039cdfd2 updated our kernel version from 6.3 to 6.9 but did not do
a FDO bum,p and with that, no container images were rebuilt. Effectively
we were still using 6.3.
Now, with the FDO bump, in this patch, we noticed that the drm-writeback
test is failing with linux kernel version 6.9.
So far, only 6.3 and 6.4 kernel versions seems to be working, that is,
without that drm writeback test timing out. The safest bet for the
time being, would be to keep our CI just use 6.3 kernel, until we
have proper version to update to.
Signed-off-by: Daniel Stone <daniel.stone@collabora.com>
Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
Revert active unit to default value right after use so that other
functions can assume the default state. A best practices section is
added to the internal header for reference.
Signed-off-by: Loïc Molinari <loic.molinari@collabora.com>
The wireframe unit can only be used by the wireframe texture so
there's no need to bind it anymore before use.
Signed-off-by: Loïc Molinari <loic.molinari@collabora.com>
Provide a fixed allocation to each texture unit in order to prevent
conflicts. This fixes a conflict between colour transforms and the
wireframe debug mode.
Signed-off-by: Loïc Molinari <loic.molinari@collabora.com>