Commit graph

27378 commits

Author SHA1 Message Date
Fushan Wen
ed16a957d3
xwayland/selection_source: reduce atomic refcount inc/decrement 2024-09-09 22:36:42 +08:00
Fushan Wen
e5c22cefba
utils/xcbutils: reduce atomic refcount inc/decrement 2024-09-09 21:42:40 +08:00
Fushan Wen
5cfe84b23b
xwayland/selection: reduce string allocations 2024-09-09 21:40:43 +08:00
Nate Graham
e851b18d16 kcms/tabbox: improve GHNS button name to match everything else
Now it matches the name shown in the GHNS dialog better.
2024-09-09 11:18:17 +02:00
l10n daemon script
a0265007b4 GIT_SILENT Sync po/docbooks with svn 2024-09-09 01:31:42 +00:00
l10n daemon script
ecebbc9094 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2024-09-09 01:21:21 +00:00
Alexander Lohnau
cea9f55999 Add 'return 0' at end of main functions in compilation checks 2024-09-08 22:27:41 +02:00
Alexander Lohnau
f9b11c14ad Check proper ranges support on CMake time
Clang < 16 causes issues with that
Compile errors further down the stack are /super/ annoying to
understand. Because we make heavy used of it here, adding compat logic
as in
https://invent.kde.org/plasma/plasma-workspace/-/merge_requests/4688 is
overkill.
2024-09-08 16:48:58 +02:00
Joshua Goins
9f6c969aba Don't process pad button events from a device that has been removed
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
2024-09-08 07:39:28 +00:00
l10n daemon script
087b2c290f GIT_SILENT Sync po/docbooks with svn 2024-09-08 01:31:15 +00:00
l10n daemon script
884d8ee6eb SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2024-09-08 01:21:48 +00:00
Vlad Zahorodnii
21691fe570 scene: Fix animated software cursor not updating
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
2024-09-07 08:11:25 +00:00
l10n daemon script
8b95810e17 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2024-09-07 01:22:15 +00:00
Nate Graham
4f03404fb3 kcms/tabbox: use better name for these in GHNS dialog
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
2024-09-06 14:00:31 +00:00
Xaver Hugl
0670631a12 backends/drm: when presentation with tearing+vrr fails, retry first with vrr only
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.
2024-09-06 12:10:15 +00:00
Kai Uwe Broulik
91eb1972c1 plugins/colorblindnesscorrection: Fix typo in shader path
It's colorblind*n*ess. The shader files got fixed in 3b918b44
but not the code loading them.
2024-09-06 11:09:03 +02:00
Méven Car
b751af02ea backends/drm: Ensure current mode is always in the output mode list 2024-09-06 09:23:37 +02:00
l10n daemon script
0e09cb09f8 GIT_SILENT Sync po/docbooks with svn 2024-09-06 01:41:03 +00:00
l10n daemon script
9ddf594b86 GIT_SILENT Sync po/docbooks with svn 2024-09-05 01:28:46 +00:00
l10n daemon script
1dcea477b0 GIT_SILENT Sync po/docbooks with svn 2024-09-04 01:28:39 +00:00
Xaver Hugl
24ab95bdd7 workspace: don't rearrange immediately when a window with struts gets removed
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
2024-09-03 13:29:31 +00:00
Vlad Zahorodnii
8443da3083 scene: Fix attempting to scanout empty surfaces
X11 windows might be mapped but temporarily have missing wl_surface or
the wl_surface can be temporarily unmapped.

CCBUG: 491964
2024-09-03 12:44:25 +00:00
Xaver Hugl
5b2304c709 wayland/color management: fix waylandToKwinIntent
We support relative colorimetric with bpc now, so it needs to also be mapped in the function
2024-09-03 11:42:23 +00:00
Akseli Lahtinen
d66925251a
input.cpp: refactor enable and disable touchpads
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.
2024-09-03 11:53:50 +03:00
l10n daemon script
a01b71f922 GIT_SILENT Sync po/docbooks with svn 2024-09-03 01:29:32 +00:00
l10n daemon script
9911231b99 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2024-09-03 01:20:36 +00:00
Akseli Lahtinen
e910dcb9ed input.cpp: initialize m_touchpadsEnabled in addInputDevice
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
2024-09-02 14:23:59 +00:00
l10n daemon script
d67ebc950c GIT_SILENT Sync po/docbooks with svn 2024-09-02 01:29:30 +00:00
Nate Graham
1d42d64f87 plugins: hide tileseditor and windowview effects from KCM
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.
2024-09-01 22:10:42 +00:00
l10n daemon script
42af2966d7 GIT_SILENT Sync po/docbooks with svn 2024-09-01 01:29:32 +00:00
l10n daemon script
89f7d41a29 GIT_SILENT Sync po/docbooks with svn 2024-08-31 01:30:12 +00:00
l10n daemon script
1951307087 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2024-08-31 01:21:21 +00:00
Xaver Hugl
eae1f51304 core/colorpipeline: refactor tone mapping to be about dimming instead of addnig headroom
No functional change, just so that the logic is a bit easier to follow
2024-08-30 22:28:13 +02:00
Xaver Hugl
587afb3076 core/colorpipeline: only reduce the reference luminance enough to get 50% headroom
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.
2024-08-30 22:06:55 +02:00
Vlad Zahorodnii
b708a93c1e scene: Add an assert to debug crash in BlurEffect::prePaintWindow()
This checks whether a WindowItem is destroyed in the middle of a painting
cycle.

This is meant as short-term means to debug the issue.
2024-08-30 18:54:11 +00:00
Vlad Zahorodnii
b825d5fdc3 plugins/overview: Linearize desktops in the desktop bar when using non linear desktop layout
Hiding the desktop bar based on the desktop layout produces unexpected
results.

BUG: 482023
2024-08-30 15:26:43 +00:00
Vlad Zahorodnii
51cb1baf1b plugins/backgroundcontrast: Fix a crash
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).
2024-08-30 14:46:42 +00:00
Vlad Zahorodnii
8f40b5b554 plugins/blur: Fix a crash in BlurEffect::updateBlurRegion()
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).
2024-08-30 14:46:42 +00:00
David Edmundson
e4f9df54e6 inputmethod: Only align within availableGeometry if it fits
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
2024-08-30 14:33:12 +00:00
David Redondo
5a3d2593f1 wayland: Allow setting the clipboard with the current serial
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.
2024-08-30 14:50:20 +02:00
l10n daemon script
8141cc1871 GIT_SILENT Sync po/docbooks with svn 2024-08-30 01:38:00 +00:00
Gatien DA ROCHA
e86ae36088 ScreenCast : fix edge-case for format modifier fixation
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.
2024-08-29 20:18:28 +00:00
Christoph Wolk
0eb143c0ef kcms/rules: replace dock/panel icon
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).
2024-08-29 13:52:13 +00:00
Christoph Wolk
e4e5fa3b08 kcms/rules: use sentence case in comboboxes/names
The HIG recommend sentence case for combobox entries. The comboboxes in
the rules kcm currently mostly use title case for their entries. The
property names mostly use sentence case, although there are few
exceptions using title case. The HIG are not explicit here (although
sentence case seems to be in the spirit of the guidance); in any case it
should be consistent.

This change converts the labels and property names to sentence case. It
also includes some minor phrasing touch-ups, in particular regarding on-
screen displays which are now spelled correctly and consistently.
2024-08-29 13:52:13 +00:00
Vlad Zahorodnii
fc1f53895f Add an assert in Window::unref() 2024-08-29 13:24:04 +00:00
Kai Uwe Broulik
54cb3407d3 plugins/outputlocator: Add outline to frame
Ensures a contrast between a window behind it, e.g. the KScreen KCM.
2024-08-29 13:06:45 +00:00
l10n daemon script
d24ec2a335 GIT_SILENT Sync po/docbooks with svn 2024-08-29 01:30:16 +00:00
Thomas Duckworth
3b918b4409 plugins/colorblindnesscorrection: mark as internal and remove configuration UI
Depends on https://invent.kde.org/plasma/plasma-desktop/-/merge_requests/2472
as it's being moved to the Accessibility KCM for greater… accessibility!

CCBUG: 488771
2024-08-28 23:56:23 +00:00
Christoph Wolk
0cb70c8d36 kcms/decoration: use sentence case for combobox
The HIG recommend sentence case for combobox entries. The window border
combobox in the decoration kcm currently uses title case, except for the
option following the theme default, which uses mixed title and sentence
case.

This change converts the labels to sentence case. The "Theme's default"
option is also renamed to "Theme default", as this is a shorter and more
common construction in UI strings.
2024-08-28 21:50:04 +00:00
Vlad Zahorodnii
3ce9b1b872 plugins/qpa: Suppress warnings about raise()/lower() not being implemented
We write window code with an assumption that the compositor will do the
right thing when a window is shown or hidden or activated, so our qpa can
leave stub implementations for raise() and lower() to suppress the
warnings produced by the stack manipulation functions in Qt.
2024-08-28 17:34:21 +03:00