Before Deleted merge, it used to be equivalent to waiting until the
window is closed.
This fixes tests waiting until the window closing animation completes
and the Window object is destroyed.
testPointerInput requires OpenGL compositing because it wants to test
cursor push back in the window view effect and the window view effect is
available only if OpenGL is supported.
On the other hand, ScreenEdgesTest::testPushBack() already tests similar
scenario, so let's drop relevant test in testPointerInput to allow
running it when using software rendering.
The virtual backend uses the surfaceless platform. On the other hand, we
move in a direction where the graphics buffer type is explicit, which
creates issues for the virtual backend.
This change ports the virtual backend to gbm so we could manually
allocate dmabuf buffers in order to unify buffer handling in kwin.
Its main drawback is that you won't be able to use the virtual backend
on setups without render nodes. On the other hand, given that the
compositor is meaningless without clients being able to share buffers
with it, it's reasonable to require some way to create and export prime
buffers.
Currently the test spends a lot of time idling. This change speeds up
the test by removing QTest::qWait() calls.
The sync() helper was introduced to sync both client and server sides.
It lets us simplify some code and get rid of QTest::qWait()s.
With this change, the execution time will drop from 20s to about 300ms.
Pipewire's buffer meta structure apparently wants the presentation timestamp
to be absolute (where absolute means number of nanoseconds since computer was started).
So subtracting the timestamp of the buffer breaks the timestamps later on in the pipeline.
This feature is no longer needed, as the scene can efficiently do its own
transformations now. Support for using hardware rotation to make direct scanout
work specifically can be added again later
Without hardware rotation, the buffer transform with always be "normal",
so all "normal" client buffers would be accepted for direct scanout, which
is not correct.
CCBUG: 467138
WAYLAND_ONLY will create two tests: one with Xwayland, the other without
Xwayland. This is somewhat wasteful and it results in higher CI times.
On the other hand, Xwayland is started on demand. If a test doesn't need
Xwayland, it won't start.
So let's remove WAYLAND_ONLY in order to lighten kwin on CI resources.
If wayland only tests are needed, we can consider passing the operation
mode to the WAYLANDTEST_MAIN helper, but there aren't such tests afaik.
The main motivation is to avoid scattering graphics buffer things around
kwin.
DmaBufParams struct has been moved to the OutputBackend, but with the
introduction of buffer allocators, we need to port screencasting code to
the new abstractions some time in the future.
A client can specify the following flags when creating a linux dmabuf
client buffer:
- y_invert
- interlaced
- bottom_first
Only the y_invert flag is supported by kwin. The interlaced and the
bottom_first flags are ignored. On the other hand, most clients don't
specify the dmabuf flags. For example, neither EGL nor Vulkan WSIs
use the y_invert flag.
The y_invert flag is undesired because it also blocks optimizations such
as direct scanout because DRM assumes that the origin is in the top left
corner.
Therefore, this change drops the support for linux dmabuf flags. From
the protocol perspective, this is fine. It can be viewed as buffer
import failing with the specified flags.
LinuxDmaBufV1ClientBuffer contains properties (formats, and flags) that
are not available in the base GraphicsBuffer type and there's no reason
to move it there.
In order to get rid of those properties (and eventually hide the
LinuxDmaBufV1ClientBuffer type from the public api), this change adds a
DmaBufAttributes getter in the GraphicsBuffer.
The debug shader is targeted to help with debugging blurriness when
using fractional scaling.
The shader works as follows:
- if the vertex coordinate has fractional part, the item will be
highlighted with blue color
- if the texture coordinate (in device pixels) has fractional part,
the item will be highlighted with red color
The shader can be toggled by setting the KWIN_SCENE_VISUALIZE=fractional
environment variable.
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.