Anvil's output map has a wrapper type `Output`, that largely stores
information of the wayland `Output` type, that is just not accessible.
Lets change that and make it possible to associate userdata with the
output to remove the need to use another wrapper type.
Older dri3 versions (< 1.2) do only support dmabufs with one plane.
Lets limit the modifiers early, if we detect that, so we do not end
up allocating buffers the interface does not accept.
Some events (especially from xinput) cannot be cleanly mapped to a window.
Instead of requiring every event to come with a `Window` reference, move
the window into those events, that have one.
The current code always acquires the buffer it just submitted,
which results in always rendering to a buffer with age "1", although
its contents are older, because the currently held buffer is already
submitted, just not to the swapchain. When it finally is submitted
its age is again set to 1, the other gets its correct age (but too late)
and the circle is repeated again. So lets fix that.
Slots with an age of 0 were never rendered to. This means
we should not increase their age, when others are submitted
or the renderer might wrongfully assume usuable contents are
available in the buffer.
Refactors the `X11Surface` to use the `Swapchain` internally,
which gives us a buffer age implemenation, which we can then use
to change the `Present` struct of the X11 backend to provide age
values to the user.
This change also merged the `Present` struct into the surface
because submits should now happen explicitly via a new `submit`-call
instead of being submitted implicitly on drop.
This allows the buffer to be discarded if rendering fails.
More specifically, this introduces a way to query the available EGL devices on a system, `EGLDevices::enumerate`.
Also this introduces a way to get the `EGLDevice` used by an `EGLDisplay`, `EGLDevice::device_for_display`
Co-authored-by: Drakulix <github@drakulix.de>
`DrmNode` was made to manage open drm nodes (including render nodes)
without having to create a `DrmDevice`. Even if opening render nodes
*should* work in general on most systems, the user should be in charge
of opening device, because they *may* want to use a `Session` or
something else. Therefor remove all `open` calls from drm/node.
The X11-backend, which tries to optain a render node, now opens the
render node itself, if getting a path proves to be successful.
Currently the `shell_surface` is not accessible to the outside, meaning
there is no way to query for the XDG shell protocol version supported by
the client.
Adding a `version` method fixes that problem, which allows compositors
to act differently based on the supported protocol version. As an
example this allows setting the state to `State::Maximized` if the
tiling states are not available.
The subsurface logic holds a self-reference to the WlSurface to
track stacking orders of the children relative to the parent. This
self-reference needs be dropped during cleanup to avoid reference
cycles.
This was not the case, and caused every surface user data to be
leaked as it kept a reference to itself (and all of its children).
Currently keycodes are always converted using xkbcommons
`State::key_get_one_sym` function. This may be not what the compositor
wants, e.g. if it represents keybindings with explicit modifiers.
Applying Shift in this case changes the sym, making it necessary for
the compositor to *undo* this transformation, which is hard or even
impossible and very unnecessary, when we have all the necessary
information in smithay.
Therefor this commit replaces the `Keysym` argument of the filter
closure with a `KeysymHandle`, which allows for different variants of
keysyms to be received. Modified (as previously), unmodified or even
as a raw keycode.
This is very much incomplete, but it implements the import and export of surfaces. However functions related to setting and imported surface the parent of another surface is not done.
importer destructor destroys all imports made from the same client
Implement SetParentOf, no undoing yet
Add inner import type
Destroy child surface relationships when importing
A note
move init function upwards
use 0.29.0 crate
Move role string constants into the public
Use toplevel_like for surface checks in foreign
add methods to get the parent surface
Make sure ZXDG roles are public api
Consistent ordering of parameters on xdg_foreign impl methods
Let's update the changelog
Document how to use xdg_foreign
wl_shell_surface is likely invalid, so it cannot be imported or exported
Changelog suggestions
remove redundant inner ref cell
Remove all uses of the refcell like behavior
Allow compositor to export surfaces on server
Appease new clippy lints
then
Use string references and iterate in reverse to simplify removals
heed request for order