Commit graph

27338 commits

Author SHA1 Message Date
Vlad Zahorodnii
98953b0218 opengl: Make GL_EXT_unpack_subimage mandatory
It's widely supported, and other wayland compositors already require it,
so the chances of breaking things should be minimal, although some embedded
GPUs might be affected, in which case kwin will fallback to software
rendering. With the unpack being always available, we can simplify and
also fix bugs in texture uploading.
2024-08-16 15:35:42 +00:00
Xaver Hugl
7ab825cba1 backends/drm: test direct scanout with the same code as presentation
This means that we prefer direct scanout over a specific presentation mode (tearing),
which usually just means we first engage direct scanout and program the relevant
properties, and then switch to tearing afterwards.
It also removes a hack for direct scanout with legacy, and is one step less for
implementing overlay plane support.
2024-08-16 14:26:58 +02:00
David Redondo
df184ebd11 fakeinput: Remove static touches list
We track now touches per device
2024-08-16 08:48:49 +00:00
David Redondo
436211ad45 fakeinput: Keep track of pressed buttons, keys and touches
To prevent having them eternally pressed when the device is
destroyed.
2024-08-16 08:48:49 +00:00
l10n daemon script
82a49d8abc GIT_SILENT Sync po/docbooks with svn 2024-08-16 01:30:23 +00:00
l10n daemon script
ff56041de4 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-16 01:21:04 +00:00
Xaver Hugl
3aba2cf3da wayland/frog_colormanagement: improve mastering luminance handling
Before we only used max_cll and max_fall, but with some videos they are not provided
and only mastering display luminances are set
2024-08-16 02:36:05 +02:00
Xaver Hugl
f9b88ee2f3 wayland_server: expose xx color management support by default
I'm confident in the implementation and (significant) upstream changes before the protocol
is released as wp-colormanagement-v1 are unlikely, so I think allowing apps to make use of
it in practice is okay at this point.

Once the upstream protocol is released, we'll still drop the xx variant though and apps will
have to use the wp protocol in order to make use of color management features.
2024-08-15 14:47:21 +00:00
David Redondo
9e2326d3ac Generate wayland code with PRIVATE_CODE 2024-08-15 14:16:11 +00:00
Xaver Hugl
fe5db7f97d backends/drm: disable degamma_lut and ctm on NVidia
The NVidia driver maps them to hardware planes, which means they do not
apply to the cursor because the cursor plane doesn't have these color
operations.

BUG: 491634
2024-08-15 15:26:41 +02:00
Xaver Hugl
74c90b727f wayland/xx colormanagement: send max_fall and max_cll 2024-08-15 10:38:02 +00:00
Xaver Hugl
ecd3c673e9 wayland/xx colormanagement: send target primaries 2024-08-15 10:38:02 +00:00
Xaver Hugl
9ed492a17f wayland/xx colormanagement: send named primaries when possible 2024-08-15 10:38:02 +00:00
Vlad Zahorodnii
f3086be998 Simplify Window::updateLayer()
The stack layer of a transient doesn't depend on its transient parent.

It is not clear why this code exists, it dates back to a commit 20 years
ago, which is massive and difficult to analyze. But, with that being said,
Window::belongsToLayer() doesn't place transients in parent's stack
layer, stack constraints are used instead.
2024-08-15 09:29:24 +00:00
l10n daemon script
af8f3e4126 GIT_SILENT Sync po/docbooks with svn 2024-08-15 01:33:59 +00:00
Xaver Hugl
e3953e7602 core/colorpipeline: allow rounding away more floating point errors
Black point compensation introduced a tiny bit increased error in the floating point
calculations, but the errors are still way too small to actually matter.
To avoid those unnecessary calculations causing performance issues and more rounding
errors, this commit changes the allowed error to 10^-5.
2024-08-15 01:23:00 +00:00
Xaver Hugl
aa93f6ac55 autotests/colorspaces: add some test cases for black point compensation 2024-08-15 01:23:00 +00:00
Xaver Hugl
45c09de02b backends/drm: make minBrightness in the color description more accurate in SDR
There's no way to go below the min. luminance of the transfer function
2024-08-15 01:23:00 +00:00
Xaver Hugl
0fdc3b2633 core/iccprofile: read and use the black point for black point compensation 2024-08-15 01:23:00 +00:00
Xaver Hugl
6f79597f13 core/colorspace: match default luminances with the Wayland protocol
It wasn't feasible to do it before, because it made SDR black far too bright, but
with black point compensation the result looks as users expect it
2024-08-15 01:23:00 +00:00
Xaver Hugl
0d0135e237 core/colorspace: implement black point compensation 2024-08-15 01:23:00 +00:00
Xaver Hugl
cd371d8618 opengl/glshader: set all color management uniforms, even if some calls fail
A driver might optimize out a uniform, in which case setting it will fail. That does not however mean
that the rest can be ignored too or that the shader won't work because of that
2024-08-15 01:23:00 +00:00
Xaver Hugl
7bdab9c4d2 core/colorpipeline: fix matrix multiplication order when optimizing matrix operations
The other matrix needs to be applied first, so it must be on the right side in
the matrix multiplication
2024-08-15 01:23:00 +00:00
l10n daemon script
388082cb3d 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-15 01:22:15 +00:00
Xaver Hugl
ad27858df3 platformsupport/scene/opengl: do test imports for external_only formats properly
The scene renderer doesn't use external_only formats as a single EGLImage, but only does
YUV conversion for some specific formats, so the test import should match that.
2024-08-15 01:09:36 +02:00
Xaver Hugl
61ef8c0087 opengl/egldisplay: add the invalid modifier to the correct list
Adding the invalid modifier to nonExternalOnlyModifiers even for formats that otherwise only
have external_only modifiers means that KWin will advertise support for this modifier to clients,
but using the format without external_only samplers fails.
2024-08-15 01:06:15 +02:00
Vlad Zahorodnii
2cc3f9cdee Avoid issuing many glTexSubImage2D() calls when uploading shm contents
Applications that use QtWidgets can have a lot of rectangles in the
damage region. For example, when you navigate between directories in
Dolphin, each individual file or folder item will be added to the
damage region rather than the container view where they are.

On the other hand, issuing multiple glTexSubImage2D() function calls
is not great because it means stalling the cpu until the texture upload
completes.

This change attempts to improve that by simplifying the input damage.
If the input damage isn't complex, use it as is; otherwise use its
bounding rect.

The gains are not impressive. On my machine, I see fewer 5ms texture
upload time spikes when navigating in Dolphin, now I can observe 4ms
spikes instead. Still, I believe the change is reasonable enough.
2024-08-14 13:18:33 +00:00
Xaver Hugl
6b3f211ef7 wayland: remove workaround for xdg-dialog base name with wayland-protocols <= 1.35
We require 1.36 now, so the workaround is no longer necessary
2024-08-14 14:50:14 +02:00
Xaver Hugl
4759ec6089 wayland: implement the alpha-modifier protocol
The alpha modifier protocol allows clients to set a multiplier for the opacity
of a surface, which allows them to offload some operations to KWin, which
in turn may offload them to KMS in the future
2024-08-14 14:26:33 +02:00
Xaver Hugl
370c9c8953 window: make setQuickTileMode more sane
...by removing the keyboard flag, moving keyboard shortcut handling into a separate
method and making the position to tile the window at explicit

This also means KWin doesn't do as many intermediary changes to window geometry on output
hotplugs, which may work around some clients not always reacting to no-op changes.

CCBUG: 479694
2024-08-14 11:38:07 +00:00
Xaver Hugl
16ff6d777a wayland/xx colormanagement: add all the missing color spaces 2024-08-14 11:07:20 +00:00
Xaver Hugl
f3d4778bc9 wayland/xx colormanagement: remove ext_srgb and rec.709 transfer functions
I'm not sure if we handle them correctly, and there's no test client nor autotest.
They can be added back later when we have that
2024-08-14 11:07:20 +00:00
Xaver Hugl
4fc6a5bd51 wayland/xx colormanagement: don't clamp primaries to 1
The range of values is [0, 10'000], clamping to 1 just makes all primaries 1
2024-08-14 10:52:08 +00:00
Vlad Zahorodnii
94b2c5e50e scene: Fix SurfaceItemWayland::freeze()
When a wl_surface is unmapped, we need to stop updating the buffer
in SurfacePixmapWayland.

However, SurfaceItemWayland::freeze() doesn't unset m_surface, so
the SurfacePixmapWayland keeps updating the buffer even after the
surface is unmapped. This results in some closed windows losing their
contents when playing a window closing animation.
2024-08-14 12:36:06 +03:00
l10n daemon script
883fde4298 GIT_SILENT Sync po/docbooks with svn 2024-08-14 01:30:53 +00:00
l10n daemon script
dd698378ea 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-14 01:21:58 +00:00
Xaver Hugl
d8e1637dcd plugins/invert: adjust to colormanagement.glsl changes
The current version didn't compile, because the nitsToEncoding and encodingToNits expect
different arguments than before
2024-08-13 21:28:38 +00:00
Vlad Zahorodnii
298486d47a wayland: Pass private-code to waylandscanner
The main goal is to avoid leaking our private xyz_interface objects.
2024-08-13 19:59:11 +00:00
Thomas Duckworth
4019989959 kcms: Use flat QGroupBoxes and set documentMode on QTabWidgets
Makes it consistent with other KCMs and and Kirigami KCMs.

**Before:**

![Screenshot_20240809_181201.png](/uploads/ff17bdcbdacda38d4abe752054d7f6d2/Screenshot_20240809_181201.png){width=431 height=399}![Screenshot_20240809_181210.png](/uploads/2e360efae4dd8982ab0a7b7af7ec85b4/Screenshot_20240809_181210.png){width=430 height=398}![Screenshot_20240809_181155.png](/uploads/6f534ffad87350a4d8fd47735f1c8c60/Screenshot_20240809_181155.png){width=431 height=399}

**After:**

![Screenshot_20240809_181243.png](/uploads/94babd127faaa8021054b7c46c806f93/Screenshot_20240809_181243.png){width=433 height=358}![Screenshot_20240809_181251.png](/uploads/25bd2d99ada694173ba875006dbe57bc/Screenshot_20240809_181251.png){width=436 height=361}

![Screenshot_20240809_181236.png](/uploads/03f0fb73e357728ae558649381cecdf7/Screenshot_20240809_181236.png){width=443 height=367}

@teams/vdg
2024-08-13 18:04:14 +00:00
Vlad Zahorodnii
989b9a520d Fix a copy paste typo 2024-08-13 13:53:32 +00:00
Vlad Zahorodnii
55b50a3e2b Handle other data source types in the debug console clipboard tab 2024-08-13 13:53:32 +00:00
Vlad Zahorodnii
95a8163c5b qpa: Implement clipboard
This allows copy pasting text between the overview and regular clients.

QMimeData::data() has a synchronous API. It is a problem for us, the
compositor, because it means we need to block the main thread to read
the mime data. This change adds a one second timeout. If no data arrives
within the next 1 second, the qpa will give up in order to avoid freezing
the screen further. Not sure how this can be handled better without
changing the API of the QMimeData to add async overloads.

BUG: 445751
2024-08-13 13:53:32 +00:00
l10n daemon script
7d4e993155 GIT_SILENT Sync po/docbooks with svn 2024-08-13 01:29:38 +00:00
l10n daemon script
4ee06acf22 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-13 01:21:38 +00:00
Xaver Hugl
96ed79fd62 backends/drm: fix ICC profiles not being applied
The check for a shadow buffer used a variable before it was set to the new value,
and the shaders are broken for some reason, so I reverted them to use the previous
code with only the transfer function parameters added.
2024-08-12 21:07:19 +00:00
Xaver Hugl
992547fd10 wayland/frog colormanagement: don't change the reference luminance for relative transfer function
We only need to override the reference luminance for "absolute" transfer functions, because most
Vulkan apps - games - don't adhere to the standards in this aspect.
For relative transfer functions, the reference luminance should match the maximum luminance of the
transfer function.
2024-08-12 20:05:28 +02:00
Xaver Hugl
cfc0f05c94 placeholderinputeventfilter: don't block media keys
While blindly typing with no outputs connected is unlikely to be intentional,
using the media keys likely is.

BUG: 491531
2024-08-12 13:44:03 +00:00
Nate Graham
85f2e85fe4 plugins/screenedge: Improve user-facing strings
This effect's name and description are a bit ambiguous right now; let's
bulk them up so it's clearer to users what this effect does.
2024-08-12 13:26:26 +00:00
Marco Martin
01d7ddff68 Slight refactor of ExpoLayout
ExpoCell is a QQuickItem which manages the geometry of window
thumbnails, movig a bit of the logic in the c++ part.

The partialActivationFactor property switches between the geometry of the window and the
geometry it will have in the overview grid

Get rid of the complicated, 2-stage state machine that the delegate had
2024-08-12 13:09:41 +00:00
Xaver Hugl
e48b7b77ec effect/animationeffect: use ItemEffect to prevent direct scanout where applicable 2024-08-12 12:13:31 +00:00