Grabbing requires a single chain of grabbing popups, but it doesn't require
grabbing to start with a toplevel, it could just as well start with a
non-grabbing popup.
Avoid seding an error when a client attempts to do this.
Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
If the output is destroyed between setting the panel and committing the
panel, or between setting the background and committing the background,
we have a use after free crash.
Handle this by clearing the surface private pointers on output destroy
so we can skip the useless commits.
Signed-off-by: Derek Foreman <derek.foreman@collabora.com>
And add ifndef guards for cases were do have support for it.
While at it I need to change how we build it due to:
'meson.build:21:0: ERROR: Value "false" (of type "string") for combo
option "Enable support for vc4's KMS API." is not one of the choices.
Possible choices are (as string): "enabled", "disabled", "auto".'
Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
From "color: update color-management protocol to xx-v4" onwards, we
should accept ICC profiles of device class ColorSpace, as the CM&HDR
protocol says. So do that.
Signed-off-by: Leandro Ribeiro <leandro.ribeiro@collabora.com>
NV15/20/30 are a family of 10bpc YUV formats which have 4
horizontally-adjacent samples packed into a 40-bit cluster. The
difference between 15/20/30 is in the subsampling.
No fallbacks are provided, as there is no format pairing which would
allow us to sensibly unpack the clusters.
Signed-off-by: Daniel Stone <daniels@collabora.com>
This checks for a valid resource when getting a xdg_popup. Similar to
the check in get_toplevel.
Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
Upon xdg_toplevel::destroy we seem to be calling xdg_surface::destroy
destroy handler. Protocol states that we should umap the surface with
client having the posibility to getting another toplevel role for the
same xdg_surface and re-map the window.
This also adds a guard for an unlikely invalid resource.
Fixes: #774
Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
Fixes the following C++ narrow conversion:
/include/libweston-14/libweston/matrix.h: In function ‘weston_coord
weston_coord_truncate(weston_coord)’:
/include/libweston-14/libweston/matrix.h:212:39: error: narrowing
conversion of ‘(int)in.weston_coord::x’ from ‘int’ to ‘double’
[-Werror=narrowing] 212 | return (struct weston_coord){
(int)in.x, (int)in.y };
| ^~~~~~~~~
/home/mvlad/install-new/include/libweston-14/libweston/matrix.h:212:50:
error: narrowing conversion of ‘(int)in.weston_coord::y’ from ‘int’ to
‘double’ [-Werror=narrowing] 212 | return (struct weston_coord){
(int)in.x, (int)in.y };
Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
Signed-off-by: Derek Foreman <derek.foreman@collabora.com>
This change fixes a side-effect of weston_view_move_to_layer helper
which would basically unmap the view because the layer entry list is no
longer visible. Only add the view to panel layer the first time.
Fixes: #956
Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
checks the resource and sends a protocol error if the client tries to
send a request to an inert object then returns out of the request
handler
Signed-off-by: Jeri Li <jeri.li@mediatek.com>
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>