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.