There is no need to manually schedule a repaint anymore, it will be
triggered by changes to opacity or transform.
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Use the weston_view_move_to_layer() helper instead of calling
weston_layer_entry_insert() / weston_view_unmap() directly.
This requires us to stop just clearing out the layer view list and then
adding visible surfaces' views to it. Instead, we have to explicitly
move all views onto or off of the layers.
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Stop manipulating the view->geometry.transformation_list directly and
replace weston_view_geometry_dirty() and weston_view_update_transform()
calls with weston_view_add/remove_transform().
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
We don't need to manually schedule a repaint after we've updated our
views - which happens as a side effect of destroying the transform/etc
within the animation.
Signed-off-by: Daniel Stone <daniels@collabora.com>
Whenever a view is moved, we should schedule a repaint for the outputs
the view is on. This avoids users having to do it by hand every time
they change something. There is no change in determinism of behaviour
(e.g. 'I can reconfigure views as often as I like and it won't take
effect until I schedule a repaint' isn't true, because output repaints
might happen for reasons outside your control).
Signed-off-by: Daniel Stone <daniels@collabora.com>
This list walk is broken, the intent was to walk the tail of the list
starting from the currently held node - but that is not what happens.
Instead, walk the list backwards and stop a the held node.
Also, paint_node_damage_below() is used when moving paint nodes between
planes, and in these cases we definitely don't want to limit damage to
the current plane.
Signed-off-by: Derek Foreman <derek.foreman@collabora.com>
Currently this isn't calculated properly, and results in clipping away
important damage when a client moves from a non-primary plane to the
primary plane.
Instead of trying to fix it, let's just throw it away.
Signed-off-by: Derek Foreman <derek.foreman@collabora.com>
In other parts of the code, use_geometry implies a parent is present. So
let's clear it when we clear relative placement.
Signed-off-by: Derek Foreman <derek.foreman@collabora.com>
Having use_geometry set is not the only time we have a parent window,
apparently.
Clicking on the 'Line diff' drop down in gitk would cause an assert()
because of this.
Fixes#769
Signed-off-by: Derek Foreman <derek.foreman@collabora.com>
This seems to break interactive resize, giving invalid/0/negative values
to pending allocations.
This reverts commit 9555118095.
Fixes: #780
Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
Until kernel mainline does merge the aysnc page flip ioctl, make the
whole bit look like it's unsupported. We can further switch it back when
it lands into the kernel.
Fixes: 9203d98f
Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
Reported-by: Simon Ser <contact@emersion.fr>
Add another wrapper so we can build with -Dxwayland=false.
Signed-off-by: Daniel Stone <daniels@collabora.com>
Fixes: 388702c181 ("frontend: Explicitly destroy Xwayland from frontend code")
Closes: wayland/weston#779
Add a workaround to fix rendering the dot files with doxygen 1.9.6
and cairo 1.17.8 on Fedora 38.
This is fixed upstream in doxygen 1.9.7, for details see:
https://github.com/doxygen/doxygen/issues/9319
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Stop flushing surfaces that are put on an overlay plane on the output to
be repainted next, but that have to be painted into another output's
primary_plane.
Now that each output has its own primary_plane, and flush_damage() knows
the output that is going to be repainted, texture_used can be limited to
surfaces that will actually be used by the renderer during the following
repaint_output().
Always upload when called from gl_renderer_surface_copy_content() or
gl_renderer_create_surface() with the output parameter set to NULL.
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
When flush_damage() is called, the output to be repainted next is
already known. Pass it along into the renderer, which can make use
of this information:
The GL renderer can get a better idea which SHM surface textures
actually have to be updated, in case a surface can be put on a plane
on one output, but not another.
A future Vulkan renderer could record texture uploads into an output
specific command buffer.
Signed-off-by: Philipp Zabel <philipp.zabel@gmail.com>
Move the destroy listener registration to the top, to avoid having
to call hmi_controller_destroy() for cleanup when it fails.
This would segfault trying to remove the destroy listener from a list
when its link was never initialized or inserted into any list.
The failure case can be hit by setting both modules=hmi-controller.so in
weston.ini and --modules=hmi-controller.so on the command line.
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Currently dbus support is built when launcher-logind option
is set; let's split that such that dbus is its own option
and launcher-logind depends on dbus.
Signed-off-by: Christopher Obbard <chris.obbard@collabora.com>
Currently the dbus helper stuff is internal only in libweston,
let's move it to being public so that custom shells may use
the helper code.
Signed-off-by: Christopher Obbard <chris.obbard@collabora.com>
glFinish() blocks until all commands have finished. This is
unnecessary: we can use glFlush() and rely on implicit sync
instead.
Signed-off-by: Simon Ser <contact@emersion.fr>
glFinish() blocks until all commands have finished. This is
unnecessary: we can use glFlush() and rely on implicit sync
instead.
Signed-off-by: Simon Ser <contact@emersion.fr>
Add tls-cert and tls-key config options in the [rdp] and [vnc] sections
in weston.ini. This allows to statically configure the TLS key and
certificate files instead of requiring them to be supplied via command
line arguments.
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Use the shared helper extracted from the RDP backend to avoid leaking
modes into the output mode list on every resize.
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
The ensure_single_mode() helper replaces an output's single mode.
Extract it into libweston so it can be reused by the VNC backend,
and rename it to weston_output_set_single_mode().
At the same time, set the the previously missing
WL_OUTPUT_MODE_CURRENT flag on the new mode.
Fixes#758
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
On attaching a NULL wl_buffer, weston_surface_attach() will unmap the
surface. Don't immediately remap it within committed() if we don't have
a buffer.
Signed-off-by: Daniel Stone <daniels@collabora.com>
Use the helper, don't mark stuff as mapped ourselves. Set the position
before the view, so when it's marked as mapped, it's already in
position.
Signed-off-by: Daniel Stone <daniels@collabora.com>
We can now have overlapping outputs, so we can remove the checks that
protected us against this previously.
We may want to consider adding checks for discontinuities in the future
though, so leave a brief comment where the checks used to be.
Signed-off-by: Derek Foreman <derek.foreman@collabora.com>
Now that planes are attached to paint nodes, we no have no reason to
prevent placing a view on a plane when it's on multiple monitors.
Signed-off-by: Derek Foreman <derek.foreman@collabora.com>
The primary_plane is currently shared amongst all outputs, and is the last
barrier to having overlapping outputs.
Split it up and make it per output instead.
Signed-off-by: Derek Foreman <derek.foreman@collabora.com>
The color-metadata-errors test inits outputs with a NULL compositor, and
makes a compositor that's entirely 0s except for the bits it's interested
in.
This makes a mess in a future where the primary_plane is split up per
output, as initializing the primary plane tries to add it to the
compositor's plane_list.
Signed-off-by: Derek Foreman <derek.foreman@collabora.com>
We don't need to do this, we can just leave them in the plane list until
they're used.
Also, doing so helps for when we want to move the primary_plane from
the compositor to the outputs in the future.
Signed-off-by: Derek Foreman <derek.foreman@collabora.com>
We're going to move primary planes from compositor to output, so we need
struct weston_plane to precede struct weston_output.
Signed-off-by: Derek Foreman <derek.foreman@collabora.com>
Remove plane->damage and instead accumulate damage on paint
nodes.
This is a step towards allowing multiple overlapping outputs.
Signed-off-by: Derek Foreman <derek.foreman@collabora.com>
Tracking the view's plane in the paint node in this way is a step towards
inflicting plane damage from paint node update during the output repaint,
instead of manually doing weston_view_damage_below().
We remove view->plane entirely and do all access through pnodes.
Signed-off-by: Derek Foreman <derek.foreman@collabora.com>
We used to do this through a byzantine path involving the view's plane
transitioning from NULL to primary - but that doesn't work very well
when we want to track the plane in the paint node, because the paint
node will never have a NULL plane state.
This can be removed later when we track damage on paint nodes.
Signed-off-by: Derek Foreman <derek.foreman@collabora.com>
Now that we have visibility for views, we can clip that to an output
and store it in paint nodes.
This requires us to split the paint_node_update() function into two,
one for things that need to be done before assign_planes() and
one for after.
This will eventually be useful for tracking damage with paint nodes,
as we'll need to damage a paint node's entire visible area for
some operations.
Signed-off-by: Derek Foreman <derek.foreman@collabora.com>