Age | Commit message (Collapse) | Author |
|
|
|
|
|
Leave it up to the compositor to enable new outputs (just like the
DRM backend does).
|
|
We have nothing to do when a headless output is enabled/disabled.
|
|
A no-op commit should not schedule a new frame. This aligns the
headless backend with the rest of the backends.
This will be important to handle the enabled → disabled transition.
|
|
|
|
|
|
Removes duplication across all the backends to finally apply the mode
to the output.
|
|
|
|
|
|
Nobody remembers why this is done and it isn't that great if people
use a lot of custom modes.
|
|
wlr_output_update_needs_frame() is called unconditionally at the
end of the function already.
|
|
This changes the semantics of wlr_output_state. Instead of having
fields with uninitialized memory when missing from the committed
bitflag, all fields are always initialized (and maybe NULL/empty),
just like we do in wlr_surface_state. This reduces the chances of
footguns when reading a field, and removes the need to check for
the committed bitfield everywhere.
A new wlr_output_state_init() function takes care of initializing
the Pixman region.
|
|
Destroying the liftoff_device invalidates all of the liftoff_planes.
Destroy the liftoff_planes before the liftoff_device to fix this.
|
|
|
|
|
|
This is more readable and consistent with the rest of wlroots.
|
|
If the same button is pressed on two devices on the same seat,
ignore the second event.
This is also what Mutter does.
Closes: https://gitlab.freedesktop.org/wlroots/wlroots/-/issues/3665
|
|
The kernel complains when the damage exceeds the FB bounds:
[73850.448326] i915 0000:00:02.0: [drm:drm_atomic_check_only] [PLANE:31:plane 1A] invalid damage clip 0 0 2147483647 2147483647
Make the DRM backend behave like the Wayland one and allow compositors
to damage (0, 0, INT32_MAX, INT32_MAX) to repaint everything without
needing to know the exact buffer size.
Closes: https://github.com/swaywm/sway/issues/7632
|
|
Based on five calls:
wlr_render_timer_create - creates a timer which can be reused across
frames on the same renderer
wlr_renderer_begin_buffer_pass - now takes a timer so that backends can
record when the rendering starts and finishes
wlr_render_timer_get_time - should be called as late as possible so that
queries can make their way back from the GPU
wlr_render_timer_destroy - self-explanatory
The timer is exposed as an opaque `struct wlr_render_timer` so that
backends can store whatever they want in there.
|
|
|
|
Use the viewporter protocol to scale output layers.
|
|
This allows compositors to get back the raw drmModeModeInfo and
look at DRM-specific fields and flags.
|
|
|
|
Commit 90d08f8f1c40e2a302d62052435ff2abdb08a854 changed the way
wlr_drm_format_intersect worked, including passing in a destination
format list. This breaks scenarios where the intersection doesn't
find any matching formats, since we still have a valid destination
format set. This changes it to only return true if more than one
matching format is present in the intersection list.
|
|
In the logic of the DRM backend in backend_destroy, wlr_backend_finish
is called first, then the outputs are destroyed and then the
display->destroy.link is removed from the list.
This commit applies the same order to the headless backend.
|
|
|
|
Now it takes a reference to a destination format
|
|
|
|
|
|
|
|
Add a src_box state field. Use the SRC_* KMS props in the DRM
backend, reject the layers in the Wayland backend (for now, we can
support it later via viewporter).
|
|
This allows callers to set a destination size different from the
buffer size to scale them.
The DRM backend supports this. The Wayland backend doesn't yet
(we'd need to wire up viewporter).
|
|
|
|
|
|
|
|
since wayland doesn't provide a touch id in cancel events, track what
points are active so we can cancel all of them
timestamp is also not provided - use 0 because no one's paying attention
to that anyway
Closes #3000
|
|
Helps figuring out why e.g. get_primary_formats fails.
|
|
- Simplifies the backends
- Avoids having two ways to do the same thing: previously one could
disable a layer by either omitting it from wlr_output_state.layers,
or by passing a NULL buffer
- We can change our mind in the future: we can allow users to omit
some layers and define a meaning without breaking the API.
References: https://gitlab.freedesktop.org/wlroots/wlroots/-/merge_requests/4017#note_1783997
|
|
Fix a few globals which weren't properly cleaned up. Discovered
in [1].
[1]: https://gitlab.freedesktop.org/wlroots/wlroots/-/issues/3604
|
|
Don't leak these.
|
|
|
|
|
|
Instead of littering #ifdefs everywhere, move them to the dedicated
attempt_XXX_backend() functions. This makes the logic in
wlr_backend_autocreate() more readable, and provides better error
messages when the X11/Wayland backends are disabled at compile-time,
or when WLR_BACKENDS contains a backend disabled at compile-time.
|
|
When we change the required dependencies for the DRM backend,
Meson might auto-disable the backend for users missing the new
requirements. This results in confused users [1] because they don't
notice the "drm-backend: NO" line burried in the Meson logs, and
then get a black screen when starting the compositor.
Update wlr_backend_autocreate() to refuse to create a backend with
only libinput (without DRM).
Users really wanting to start their compositor with a libinput
backend and without a DRM backend can manually set WLR_BACKENDS.
[1]: https://github.com/swaywm/sway/issues/7457
|
|
We've had this struct for a while. It'd be useful for compositors
if they want to manage the swap chains themselves instead of being
forced to use wlr_output's. Some compositors might also want to use
a swapchain without an output.
|
|
WLR_DRM_DEVICES specifies a static list of DRM devices to open
at startup.
Do not create DRM backends for hotplugged DRM devices when it's
set.
Closes: https://gitlab.freedesktop.org/wlroots/wlroots/-/issues/3595
|
|
|
|
|
|
We don't need to do anything special to handle these.
|