This fixes a rare crash where we may dereference a null
TabletV2Interface in findAndAdoptPad. This can happen because the
underlying device disappears, and we call
libinput_device_group_set_user_data (what tabletPadId.data points to)
to reset the user data to null.
Similar to what we do to tablet tool events (see tabletToolEvent), we
should check if this is null before continuing.
Fixes KWIN-3R6
The Item schedules repaints per scene delegate. Currently, there are no
any attached scene delegates when using software cursor, which results in
it freezing as soon as it stops moving.
The issue is addressed by using SceneDelegate instead of RenderLayerDelegate.
The proposed code is not great, but on the other hand, the plan is to
embed the software cursor in the workspace scene if needed.
BUG: 490440
Currently the GHNS dialog calls these "Window Manager Switching
Layouts", which doesn't match the name of the KCM and can apparently
be rather challenging to translate.
"Task Switcher Styles" should be clearer and more consistent.
BUG: 492666
FIXED-IN: 6.2.0
Tearing may not always work, and currently is guaranteed to not work when we try to enable VRR at the
same time. VRR without tearing may still work though, so this commit makes KWin fall back to VRR-only
presentation before giving up and using the basic vsync presentation mode instead.
Otherwise, rearrange can happen on intermediate output configurations, as layer shell
windows can get closed in response to outputs being disabled.
That rearrange on intermediate output configurations can confuse the placement tracker
logic, which may then move windows to weird locations or even offscreen
CCBUG: 479694
Add method enableOrDisableTouchpads which sets touchpads to
given state and also sends OSD message, so there's no
duplicate OSD messages or otherwise repeated code.
m_touchpadsEnabled gets initialized to true in input.h,
and the actual status of the device is not evaluated until
the toggleTouchpads setting is pressed.
This fixes the issue by removing m_touchpadsEnabled and refactoring the toggling
method. OSD is handled by their respective enable/disable Touchpads methods.
BUG:486763
Part of https://invent.kde.org/plasma/systemsettings/-/issues/39
These don't make much sense to disable as they're completely benign when
not in use. Their config windows only contain shortcuts which are already
in the Shortcuts KCM, so they're harmless to hide from the Desktop
Effects KCM.
If the output side / display can already show at least 50% headroom, dimming the image to get
more space for the highlights doesn't improve the highlights a lot, definitely not enough to
justify making the rest of the image worse for it.
The updateContrastRegion() creates an ItemEffect() object to block direct
scanout. However, it doesn't take into account that the surface item
can be null when a window is added. It can happen with Xwayland
windows.
The contrast effect creates an ItemEffect object for the SurfaceItem,
which is reasonable. But on the other hand, the contrast effect still
operates per window. So this change simply makes the contrast effect
register an ItemEffect with the WindowItem. When proper per item effects
are supported, this can be changed (the contrast effect would need to
monitor the wl_surface getting added and removed).
The updateBlurRegion() creates ItemEffect() objects to block direct
scanout. However, it doesn't take into account that the surface item
can be null when a window is added. It can happen with Xwayland
windows.
The blur effect creates ItemEffect objects for the SurfaceItem and the
DecorationItem, which is reasonable. But on the other hand, the blur
effect still operates per window. So this change simply makes the blur
effect register an ItemEffect with the WindowItem. When proper per
item effects are supported, this can be changed (the blur effect would
need to monitor the wl_surface getting added and removed).
An input panel in Overlay mode controls it's own size.
If there's space we want to fit it centre aligned within the available
space, but if it doesn't fit (i.e having a left panel and a full width
keyboard) then centre aligning within the available space doesn't make
sense. We would half overlap the panel and half go offscreen. This patch
adjusts us to centre align to the output in that condition.
BUG: 440571
Some clients (for example Chromium and LibreOffice) display a certain
behavior in that they will set the clipboard twice in short succession
deleting the data source in between and using the same serial twice.
This allows setting the clipboard with the same serial as
the current clipboard which only the current owner (or previous
owner when the source was deleted) should know.
The current implementation for DMA-Buf sharing on kwin is slightly broken.
When a client connects to the kwin screencast's stream, it supplies a `SPA_PARAM_EnumFormat` list, containing entries for every supported format, and the drm modifier list for that format (for dmabuf sharing).
Usually, the `SPA_FORMAT_VIDEO_modifier` property from the consumer has the `SPA_POD_PROP_FLAG_DONT_FIXATE` flag set. Kwin then receives the full choice list, and gets to pick a relevant modifier.
In situations where the DONT_FIXATE flag is missing, pipewire chooses an arbitrary match between the consumer and kwin. In that case, kwin currently assumes DRM_FORMAT_MOD_INVALID is to be used no matter what, which goes against the comment right above it within the screencaststream.cpp file. Even worse, if DRM_FORMAT_MOD_INVALID is not supported by the consumer, this also causes the param_changed callback to freak out, as one of the conditions to update the stream params is `!receivedModifiers.contains(m_dmabufParams->modifier`. Since m_dmabufParams->modifier contains DRM_FORMAT_MOD_INVALID, which is not among the modifiers kwin receives, the params are changed continuously and no buffer sharing can happen.
--
I'd be happy to supply code to reproduce what I attempted to describe above if needed. I'm not aware of any program currently affected, but I found this out when messing around myself.
Relevant docs are here :
<https://docs.pipewire.org/page_dma_buf.html>
> If the SPA_PARAM_Format contains a modifier key, without the flag SPA_POD_PROP_FLAG_DONT_FIXATE, it should only contain one value in the SPA_CHOICE_Enum. In this case announce the SPA_PARAM_Buffers accordingly to the selected format and modifier.
The combobox for window type matching in the rules kcm currently uses
list-remove (represented by a minus sign) as its icon; while
semantically ill-fitting, it was visually a good match and breeze-icon-
theme does not have a dedicated panel icon. Recently however, the icon
was changed and now depicts a red X. This makes it a bad fit all-around
for its use in this kcm.
This change replaces it with another visually good fit that doesn't
match semantically, namely spinbox-decrease (also a minus sign), as a
temporary measure until a proper panel icon is ready (tracked in BUG
492341).