Taking the address of a reference that's a dereference of a newly created
object is the most possibly confusing way to initialize a std::unique_ptr.
Instead, just pass a std::unique_ptr around to take ownership of
Currently, there exists the separation between the buffers provided by
the clients and the buffers created by the compositor.
In hindsight, this separation is not great because it leads to
specialized code paths in the output backend. For example, we have a
separate code path for direct scanout and presenting composited frame.
But you could view the latter case as "direct scanout of a compositor
buffer".
The main idea behind the buffer type is to provide a base buffer type
for client buffers and composited frame buffers (not drm fbs) that we
could pass around, import as textures, etc.
Some users prefer this over the existing options. It e.g. allows to open
a bunch of links and only then switch to the browser on a different desktop
BUG: 464283
Currently, on X11, when activating a window that is not on the current desktop we allow this
only if focus stealing protection is set to none.
If any focus stealing protection is set then activation is denied. That behavior is
unintiutive to the user. When I e.g. click on a notification from a chat app I expect
something to happen, regardless of focus stealing protection.
Remove the special handling of windows on different desktops and only apply the usual
focus stealing prevention checks (based on timestamps etc). This also matches the behavior
on Wayland.
As of nowadays, most clients have switched to the linux-dmabuf protocol,
except Xwayland, which still needs the wl-drm protocol.
On the other hand, we would like to unify some buffer handling code.
There are a few options:
- drop the support for wl-drm protocol. Not doable, because Xwayland
still needs it, even though it uses the linux dmabuf feedback protocol
too
- re-implement the wl-drm protocol
- re-implement the minimal part of the wl-drm protocol needed by
Xwayland
This change goes after the third option. Only the node name and the
capabilities will be sent. The buffer factory requests are not
implemented, but they can be if we discover that some clients need them.
Discards frames sent under the timeframe that was negotiated with the
client. This allows clients to just request the frames that they should
be able to compute.
In particular, explain what all of the the focus stealing prevention
and protection settings do.
My understanding of the different modes comes from reading the code
and code comments in activation.cpp.
CCBUG: 458976
With the dmabuf multi-gpu path, a buffer is imported to the secondary GPU
and presented directly, but importing a buffer that's usable for scanout
is not possible that way on most hardware. To prevent CPU copy from being
needed in those cases, this commit introduces a fallback where the buffer
is imported for rendering only, and then copied to a local buffer that's
presented on the screen.
CCBUG: 452219
CCBUG: 465809
This property is not used on Wayland because windows are
already not allowed to set their own geometry, so let's
hide it from the UI.
Also update the tooltip to explicitly state which properties
the `Ignore Geometry` property does affect on X11
BUG: 431265
FIXED-IN: 6.0
Tooltips don't work when using the system with touch, and these here are
also a bit annoying with a pointing device since they appear instantly on
hover and take up a lot of space, so they unexpectedly pop up and cover
UI elements a lot.
To improve this, use a KCM.ContextualHelpButton inline in the list items
to show the explanation when clicked or hovered, just like we do in most
other places in other KCMs.
To make this work, the internal line breaks in the explanatory text had
to be removed to make the text flow properly with an arbitrarily-sized
tooltip.
EGL_WL_bind_wayland_display definitions are needed only in one cpp file,
so move them there instead.
We need to duplicate EGL_WL_bind_wayland_display definitions because
libepoxy doesn't define them for us.
At the moment, the render backend provides its specific implementation
of LinuxDmaBufV1ClientBuffer. This has some of its limitations. For
example, due to the strong coupling, compositing restarts must be
handled carefully. It's hard to have a generic code path to import
dmabufs, which would be nice to have in order to unify graphics buffer
allocation across various backends; currently, it's all scattered.
To make the code simpler, this change drops the commented out YUV import
code path for now. Given that Mesa implicitly handles it, the need for
it is no longer so urgent.