Commit Graph

9304 Commits

Author SHA1 Message Date
Leandro Ribeiro 39de0bd988 color-lcms: unref stock sRGB cprof instead of directly destroying it
Directly destroying the cprof is not ideal, because it may hide issues
that we have in the code. If we are destroying a cprof with ref_count
bigger than 1, there's something wrong that we need to fix.

Instead, assert that the stock sRGB cprof has ref_count == 1 when we are
destroying the color manager. And use unref() instead of destroy().

Signed-off-by: Leandro Ribeiro <leandro.ribeiro@collabora.com>
2023-10-30 11:47:35 +00:00
Marius Vlad d18fd64a15 libweston: Ignore subsurface offsets
Ignore any client-supplied offset to subsurface commits to keep the same
consistency we find on other compositor.

Fix: #829
Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
2023-10-26 14:46:10 +00:00
Derek Foreman e193a178e8 xwm: Fix accidental resizing of windows
If an X window has not been resized yet, and the user clicks (not drags)
on a part of the window frame that can be used to resize, the window
will resize to 512, 512.

This is likely because of the changes in ba82af938 and 2acd2c748
that change resize behaviour but missed updating saved size when the
client's initial configure occurs.

Signed-off-by: Derek Foreman <derek.foreman@collabora.com>
2023-10-25 07:36:17 +00:00
Marius Vlad 8d85c43355 backend-x11: Move back-end removal to the destroy function
Otherwise we end up with an invalid backend on the shutdown path of the
compositor. This mimics what the wayland back-end does.

Fixes 14c52a942b, 'backend-x11: enable multi-backend support'.

Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
2023-10-23 20:10:19 +03:00
Marius Vlad 5d7412c1bd build: bump to version 12.0.91 for the alpha release
Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
2023-10-16 19:55:38 +03:00
Tomohito Esaki 608e1ee86d ivi-shell-user-interface: change timing to create the launcher surface
Since hmi-controller adds surfaces to layers when creating ivi surfaces,
the launcher will appear on startup. As before, the launcher surface is
created before the background surface so that the background will appear
on startup.

Signed-off-by: Tomohito Esaki <etom@igel.co.jp>
2023-10-16 16:24:19 +00:00
Tomohito Esaki 7dbb166de6 hmi-controller: activate and deactivate sruface
Activate when a surface is created and change focus when an active
surface is removed. The Surface is added to layers when it is created,
because it must be added to a layer to be active.

Signed-off-by: Tomohito Esaki <etom@igel.co.jp>
2023-10-16 16:24:19 +00:00
Tomohito Esaki 0e082315d7 ivi-shell: activate desktop surface
The keyboard focus is active, but the desktop surface itself is not
displayed as active. Therefore, the surface should also be displayed as
active, as in kiosk-shell.

Signed-off-by: Tomohito Esaki <etom@igel.co.jp>
2023-10-16 16:24:19 +00:00
Tomohito Esaki ec3e2d2d36 ivi-shell: Properly handle seat hotplugging
Add to handle seet hotplugging so that seats are properly picked up by
ivi-shell when they are dynamically created.

Signed-off-by: Tomohito Esaki <etom@igel.co.jp>
2023-10-16 16:24:19 +00:00
Derek Foreman e3a509236b headless: Enable use as a secondary backend
Conditionally create the renderer like other secondary backends.

Now that we have multi-backend support and overlapping outputs, an
interesting use case for the headless backend exists.

We can have a high performance steady state on the drm backend with
all content on scan-out planes, bypassing the renderer. Taking a
screenshot of this would ideally use readback, but some hardware is
incapable of readback, or only capable at certain resolutions.

By using the headless backend as a secondary backend, and creating a
headless output that overlaps the drm outputs, we can take the
screenshot on the headless backend without disrupting the plane
layout on the drm backend.

For this to be efficient, other changes need to be made, but this is
a step in that direction.

Signed-off-by: Derek Foreman <derek.foreman@collabora.com>
2023-10-16 12:13:21 +00:00
Derek Foreman e622be7423 input: avoid crash by using surface directly
A constraint always has a surface, but may not have a view - use the
surface pointer directly without trying to get it through the view.

Fixes #823

Signed-off-by: Derek Foreman <derek.foreman@collabora.com>
2023-10-13 07:46:44 -05:00
Marius Vlad 73138a1943 compositor/main: put remoting/pipewire outputs to the right
Similar to what we have to all other backends/outputs, do the same
for the remoting/pipewire plug-ins and align them to the right.

This way we can move the plug-ins loading after
weston_compositor_flush_heads_changed(), much closer to the other module
loading which seems a more suitable place.

Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
2023-10-12 15:27:30 +03:00
Marius Vlad df493400c1 compositor/main: Re-work plug-in loading to avoid an invalid color manager
Rather than loading the plug-ins when loading the DRM backend, do that
after *all* the other backends have been loaded, and after we made sure
we have at least a no-op color manager.

As the plug-ins enable the outputs on their own this has the side-effect
of enabling the output without having any color manager set-up at that
time.  Moving the plug-in loading a bit later ensures that we have one
set-up (a no-op one).

Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
2023-10-12 15:27:06 +03:00
Marius Vlad 4d633dd0b2 neatvnc.wrap: Update to neatvnc 0.7.0
Further follow-up from 8895b15f3d 'ci, backend-vnc: update to Neat
VNC 0.7.0', to allow building with the subproject wrap as well.

Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
2023-10-10 10:33:51 +00:00
Derek Foreman e49294b901 libweston: fix output clamp helper
Any coordinate that didn't change during clamping was left uninitialized,
resulting in failures later.

Signed-off-by: Derek Foreman <derek.foreman@collabora.com>
2023-10-09 08:19:44 +00:00
Derek Foreman 209b7eb56a backend-drm: Fix visibility calculation
Between assign_planes() and pnode_update_late(), the pnode's plane may
not yet be up to date. This leads to the visible region being incorrectly
calculated for paint nodes beneath a paint node that changes planes. Their
visible regions will still contain a cut out for the node that no longer
occludes them.

However, we place damage on nodes beneath a node that changes planes in
order to redraw the region beneath a node that moves from the primary to
non-primary plane.

The gl-renderer clips to a paint node's visible region when rendering it,
so this accidental cut-out masks away all the damage and leaves us with
a mess.

Fix this by using the correct plane in the visibility calculation.

Fixes #821

Signed-off-by: Derek Foreman <derek.foreman@collabora.com>
2023-10-06 12:39:57 -05:00
Derek Foreman 176a413ef0 libweston: Prefer primary backend when assigning outputs to views
If coverage and power status are the same, we should prefer a primary
backend over a secondary one.

Fixes #818

Signed-off-by: Derek Foreman <derek.foreman@collabora.com>
2023-10-06 11:50:50 +00:00
Derek Foreman 305e954f76 libweston: Reconsider view primary output on output power change
When an output power state changes, it may become or no longer be the
best primary output for a view.

Fixes #819

Signed-off-by: Derek Foreman <derek.foreman@collabora.com>
2023-10-06 11:50:50 +00:00
Derek Foreman d3fa809c55 libweston: Consider output power state when selecting primary
If our primary output is turned off, we won't get frame events, so let's
try really hard to prioritize a turned on output with coverage.

Signed-off-by: Derek Foreman <derek.foreman@collabora.com>
2023-10-06 11:50:50 +00:00
Philipp Zabel 46d3487abf man: Document VNC output section
Document the VNC [output] section in the weston-vnc manpage.

Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
2023-10-05 11:43:21 +02:00
Philipp Zabel d1df848d94 compositor, backend-vnc: Allow to disable output resizing
In some use cases the VNC client should not be allowed to resize the VNC
output. Add a boolean option "resizeable" in the VNC [output] section to
control this.

Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
2023-10-05 11:43:12 +02:00
Philipp Zabel 690beab475 backend-vnc: Implement output resizing
Let VNC clients resize the VNC output.

Signed-off-by: Philipp Zabel <philipp.zabel@gmail.com>
2023-10-05 11:00:21 +02:00
Philipp Zabel 8895b15f3d ci, backend-vnc: update to Neat VNC 0.7.0
Neat VNC 0.7.0 supports desktop resizing.

Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
2023-10-05 11:00:12 +02:00
Daniel Stone bdf2019ec9 desktop-shell: Map input panel surfaces before views
Separate the concept of a surface being mapped (where it has current
content) from views being mapped (visible on a layer).

Signed-off-by: Daniel Stone <daniels@collabora.com>
2023-10-04 11:44:10 +03:00
Daniel Stone ecc0d40314 desktop-shell: Use weston_view_move_to_layer() for input panels
Use our helper instead of open-coding view manipulation.

Signed-off-by: Daniel Stone <daniels@collabora.com>
2023-10-04 11:44:10 +03:00
Daniel Stone 40fdffdced desktop-shell: Create lock surface view when mapped
Wait until the lock surface is mapped until we create the view.

Signed-off-by: Daniel Stone <daniels@collabora.com>
2023-10-04 11:44:10 +03:00
Daniel Stone 7205e88e60 desktop-shell: Use consistent surface-has-content check for lock
Rather than checking if the surface has width 0, use our helper to see
if the surface has an attached buffer.

Signed-off-by: Daniel Stone <daniels@collabora.com>
2023-10-04 11:44:10 +03:00
Daniel Stone 3e156720a9 desktop-shell: Inline configure_static_view for panels
This is pretty trivial, so why not.

Signed-off-by: Daniel Stone <daniels@collabora.com>
2023-10-04 11:44:10 +03:00
Daniel Stone de243918e3 desktop-shell: Inline configure_static_view for background
This is a pretty trivial case which just sets up one static view.

Signed-off-by: Daniel Stone <daniels@collabora.com>
2023-10-04 11:44:10 +03:00
Daniel Stone 82d25f3ce7 desktop-shell: Use saved panel position
Don't look it up from the view every time, but instead just work
completely from global co-ordinates.

Signed-off-by: Daniel Stone <daniels@collabora.com>
2023-10-04 11:44:10 +03:00
Daniel Stone aae1abb8df desktop-shell: Regularise panel position
Calculate everything in global co-ordinates and make it more consistent.

Signed-off-by: Daniel Stone <daniels@collabora.com>
2023-10-04 11:44:10 +03:00
Daniel Stone a80a008479 desktop-shell: Directly look up output panel view
We don't need to traverse the layer-view list to find our view for an
output's panel.

Signed-off-by: Daniel Stone <daniels@collabora.com>
2023-10-04 11:44:10 +03:00
Daniel Stone e165f15219 desktop-shell: Pass shell_output as special-surface private
We need to know which output we're on, and the surface type plus output
uniquely identifies us, so just pass that in.

Signed-off-by: Daniel Stone <daniels@collabora.com>
2023-10-04 11:44:10 +03:00
Daniel Stone 36d04b0347 desktop-shell: Store pointers to special-surface views
We only have one of those per output, and we need to dig them out later,
so just store a direct pointer to them.

Signed-off-by: Daniel Stone <daniels@collabora.com>
2023-10-04 11:44:10 +03:00
Daniel Stone 7f54341377 desktop-shell: Clean up surface/view mapping for special surfaces
Make background and panel surfaces do the right thing: map the surface
when it first gets content applied to it, and only move the view around
when required.

Signed-off-by: Daniel Stone <daniels@collabora.com>
2023-10-04 11:44:10 +03:00
Daniel Stone 2cb4feb6c2 desktop-shell: Remove useless surface-gone messages
We expect this to happen at shutdown, so don't act surprised when it
does.

Signed-off-by: Daniel Stone <daniels@collabora.com>
2023-10-04 11:44:10 +03:00
Daniel Stone a54bc37c6c desktop-shell: Don't allow multiple special surfaces
We only want one background and/or panel per output. If another one
comes up, tell the client it's done something very bad, rather than
trying to gently negotiate our way out of the situation.

Signed-off-by: Daniel Stone <daniels@collabora.com>
2023-10-04 11:44:10 +03:00
Daniel Stone 22175a6a59 desktop-shell: Don't lose track of background/panel views
If our background and/or panel surface already has a view, something
extraordinarily weird has gone on. Don't try to deal with it.

Signed-off-by: Daniel Stone <daniels@collabora.com>
2023-10-04 11:44:10 +03:00
Daniel Stone 6b1a4e6562 kiosk-shell: Delete nonsensical is_mapped check
A view is mapped if it's on a layer, so if we find it in a layer then we
don't need to worry about whether or not it's mapped.

Signed-off-by: Daniel Stone <daniels@collabora.com>
2023-10-04 11:44:10 +03:00
Daniel Stone cae789774a surface: Check parents in weston_surface_is_mapped()
A subsurface is not considered to be fully 'mapped' unless its ancestors
are also mapped.

Signed-off-by: Daniel Stone <daniels@collabora.com>
2023-10-04 11:44:10 +03:00
Daniel Stone 2faf491f61 surface: Add weston_surface_is_mapping()
The counterpart to weston_surface_is_unmapping(). This is valid for the
duration of processing the surface commit.

Signed-off-by: Daniel Stone <daniels@collabora.com>
2023-10-04 11:44:10 +03:00
Daniel Stone 5c75ecccfe surface: Don't re-map already-mapped surfaces
If a surface has already been mapped, just return early out of
weston_surface_map(), rather than firing the map signal and rebuilding
the view list.

Signed-off-by: Daniel Stone <daniels@collabora.com>
2023-10-04 11:44:10 +03:00
Derek Foreman 720421c193 libweston: Add and use weston_coord_surface_add/sub helpers
We already have these for global coordinates, now we have them for
surface coordinates too. In addition to removing some unsightly
unadorned coordinate usage, this also adds appropriate coordinate space
id checks at runtime.

Signed-off-by: Derek Foreman <derek.foreman@collabora.com>
2023-10-03 18:19:17 +00:00
Derek Foreman cec0ab7d23 libweston: Make better use of global coord helpers
Use wesotn_coord_sub/add() in many more places.

Signed-off-by: Derek Foreman <derek.foreman@collabora.com>
2023-10-03 18:19:17 +00:00
Derek Foreman 18cce195d3 libweston: Make a common helper for clamping a coord to an output
This is a tricky bit of code and we use it in two places. Let's make a
single implementation.

Signed-off-by: Derek Foreman <derek.foreman@collabora.com>
2023-10-03 18:19:17 +00:00
Derek Foreman 71e38cf2ef libweston: Use weston_coord_surface in weston_surface_state
Use this for the buffer attachment offset coordinates.

Signed-off-by: Derek Foreman <derek.foreman@collabora.com>
2023-10-03 18:19:17 +00:00
Marek Vasut bd3de08b13 backend-drm: document additional-devices parameter
Document the --additional-devices parameter to Weston to add secondary
DRM devices that will only be used as outputs, but not for rendering.

Fixes: 3c6cfe6bf4 ("backend-drm: add additional-devices to support multi GPU")
Signed-off-by: Marek Vasut <marex@denx.de>
2023-10-03 12:29:21 +00:00
Derek Foreman 4f17af4691 libweston: Remove dbus helpers
Now that launcher-logind is gone, we don't use any of this anymore.

Signed-off-by: Derek Foreman <derek.foreman@collabora.com>
2023-09-29 09:58:01 -05:00
Derek Foreman e3b6ed50f1 launcher: Remove launcher-logind
Second try at removing direct logind support. This time more careful
with the documentation, as libseat can still use logind even if we don't
directly use it.

Signed-off-by: Derek Foreman <derek.foreman@collabora.com>
2023-09-29 09:55:32 -05:00
Derek Foreman 3959c90c7c launcher: Drop drm dependency
This was probably only for launcher-direct, and hasn't been required for
a while.

Signed-off-by: Derek Foreman <derek.foreman@collabora.com>
2023-09-29 09:47:43 -05:00