discardPixmap() increases the reference counter, but there's no matching
place where the ref count is decreased, which results in the previous
pixmap not being released even if it's not needed anymore.
Instead of setting pipelines one by one, use DrmGpu::updateOutputs to
set all the outputs on a GPU with a single atomic commit. This makes
the switch both faster, more reliable and in case the other drm master
changes the output configuration, prevents blanking.
eglCreateWindowSurface() wants a Window (unsigned long), but with
EGL_NO_PLATFORM_SPECIFIC_TYPES, EGLNativeWindowType is defined as an
opaque pointer, i.e. void*.
BUG: 440372
If a property blob got created by another drm master we can't rely on
re-using it, so create a new blob of our own with the data copied over
when the kernel destroys it.
Also free property blob objects when we don't need them anymore.
BUG: 440294
At the moment we were checking for size difference between the buffers
which works for rotation but not for flipped or up-side down screens.
This changes how we check it by comparing the effective transform vs the
supported one in drm to see if they differ.
Fixes https://invent.kde.org/plasma/plasma-phone-components/-/issues/112
Do not discard a shortcut immediately when it is already registered
in KGlobalAccel, because there could be possible dangling shortcuts
if they weren't properly cleaned-up (ex. after a crash).
Instead we delay the check for conflicts with other client shortcuts
to the second loop, which we know is up to date.
BUG: 442215
FIXED-IN: 5.22.80
QSGImageNode ignores QSGTexture's filter, one has to specify it using
QSGImageNode::setFiltering().
In hindsight, we need to figure out how to integrate the lanczos filter
with window thumbnails and use it instead.
BUG: 441709
If the buffer size changes after creating or destroying the decoration,
the surface item will discard the pixmap.
If the buffer size remains the same, we can continue using old pixmap.
The current implementation sometimes will leave the screens unusable,
therefore KWIN_DRM_SW_ROTATIONS_ONLY=1 is default.
Use KWIN_DRM_SW_ROTATIONS_ONLY=0 to test hardware DRM operations.
xcb_send_event always copies 32 bytes, so we have to pad all xcb_*_event_t
to 32 bytes to avoid leaking uninitialized stack memory. I found this
problem while running kwin_x11 on a CHERI-RISC-V system (which has bounded
pointers). The xcb_send_event() implementation has a memcpy() that was
copying 32 bytes but the event passed was a bounded to 28 bytes, so this
resulted in a run-time exception in X11Client::sendClientMessage().
The same problem exists in Selection::sendSelectionNotify(), but this time
we could end up copying up to 8 bytes since xcb_selection_notify_event_t
is only 24 bytes.
This disclosure of uninitialized data could in theory have a security
impact if it leaks a pointer value (e.g. a return address) as part of an
exploit chain that needs to bypass ASLR. However, the selection notify
events go directly to the XServer and you most likely already have a
serious problem if an attacker has full control over the XServer. It is
possible that the configure notify events go directly to an untrusted
client, but even if they do this leak is not directly exploitable.
See also https://gitlab.freedesktop.org/xorg/lib/libxcb/-/issues/18
The current code set m_pasteProcess to null, before running the cleanup
function which tells the process to quit.
Which is why it always hung the CI. This patch addresses it in a way
that cleans up helpers even if we abort the test early.
An AbstractDragTarget is introduced. This contains either the DataDevice we are
dragging to or an Xwl bridge.
We set this on Seat along with the active surface.
In future this also allows getting rid of the move filter.
If a virtual desktop has empty name, kwin is going to end up in an
infinite cycle where VirtualDesktopManager::save() updates the
_NET_DESKTOP_NAMES property and then in the next event loop cycle,
RootInfoFilter::filter() is going to call VirtualDesktopManager::save()
because the _NET_DESKTOP_NAMES property has been changed.
This regression has showed up just now because some parts of kwin used
to increase virtual desktop count to create new desktops. Recently, that
code was ported to VirtualDesktopManager::createVirtualDesktop().
The main difference between createVirtualDesktop() and setCount() is
that the latter will set the desktop name to "Desktop N", the former
will use user-specified name.
If the user-specified name is empty, the createVirtualDesktop() method
should assign "Desktop N" name to the virtual desktop according to the
docs. However, it's not the case and this change addresses that.
Not all combinations of connectors, crtcs and planes will work
on all hardware, so we need to test the pipelines before using
them.
BUG: 433107
CCBUG: 435265
In order to accomodate crtc or primary plane changes on outputs we
need to dynamically recreate rendering resources with EglStreams as
the stream is tied to the crtc or plane currently in use.
Instead of using setTransformInternal directly, have DrmOutput
set it in updateTransform, like with the other setters. Also use
updateTransform instead of setTransformInternal in DrmBackend, so
that hardware rotation can be used where possible.
This decouples the management of Shadow from the scene window and allows
multiple items share the same Shadow.
Currently, kwin has a single scene graph, but it makes sense to create a
scene graph per output as they could have different layers, etc. This
would also allow QtQuick share more textures with kwin, which is worth
doing for optimization purposes in the future.