Commit graph

24635 commits

Author SHA1 Message Date
Alexander Lohnau
3ff7a527e3 kcms: Port to org.kde.config QML module from KConfig
The implementation in KDeclarative will be removed
2023-04-21 16:30:30 +02:00
Vlad Zahorodnii
ee31581006 autotests: Remove WAYLAND_ONLY tests
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.
2023-04-21 14:25:23 +03:00
Vlad Zahorodnii
67b898b803 Move DmaBufAttributes struct to GraphicsBuffer header
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.
2023-04-21 06:38:58 +00:00
l10n daemon script
22b10c4055 GIT_SILENT Sync po/docbooks with svn 2023-04-21 02:37:10 +00:00
l10n daemon script
6f16d9b273 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"
2023-04-21 02:32:52 +00:00
l10n daemon script
60b3f492d9 GIT_SILENT Sync po/docbooks with svn 2023-04-20 02:47:31 +00:00
Xaver Hugl
9915cfc6df wayland: send modifiers to clients under the mouse 2023-04-19 14:19:52 +02:00
Xaver Hugl
ca9eb3d87d wayland/autotests/client: don't assume pointer enter and leave only increment serial by one 2023-04-19 14:19:30 +02:00
Vlad Zahorodnii
232bcc5d82 wayland: Drop support for linux dmabuf buffer flags
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.
2023-04-19 12:29:33 +03:00
Vlad Zahorodnii
99af2aa726 core: Move DmaBufAttributes getter to GraphicsBuffer
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.
2023-04-19 07:29:38 +00:00
Vlad Zahorodnii
27b27696e8 {effects,scripts,plugins}: Use kwin translation domain
It makes it easier to handle translations when the plugins are stored in
the same directory.
2023-04-19 07:10:14 +00:00
Vlad Zahorodnii
64dca07d48 Remove Messages.sh in libkwineffects
It's unused.
2023-04-19 07:10:14 +00:00
Vlad Zahorodnii
e82e9b9f30 Move genericscriptedconfig to kcms directory
The kcms tree suits genericscriptedconfig better as the scripting
directory primarily contains the scripting api.
2023-04-19 07:10:14 +00:00
l10n daemon script
da13fe9c08 GIT_SILENT Sync po/docbooks with svn 2023-04-19 02:42:34 +00:00
Vlad Zahorodnii
07f6713a18 scene: Add pixel grid snapping debug pass
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.
2023-04-18 08:16:11 +00:00
Hongfei Shang
6f5aa9e4f3 x11: only managed window need readTransient
X11Window::readTransient should not call setTransient for override-redirect windows.

Signed-off-by: Hongfei Shang <shanghongfei@kylinos.cn>
2023-04-18 06:43:26 +00:00
l10n daemon script
cfe656e506 GIT_SILENT Sync po/docbooks with svn 2023-04-18 02:34:50 +00:00
Bharadwaj Raju
8e7aab901b Don't create Plasma activation feedback if StartupNotify is false
Prevents a spinning circle in the task manager for such tasks.

cc @nicolasfella
2023-04-17 14:56:09 +00:00
l10n daemon script
28c2dd9afe GIT_SILENT Sync po/docbooks with svn 2023-04-17 03:48:30 +00:00
Vlad Zahorodnii
ce1e957181 backends/x11: Use EGL_KHR_platform_gbm
We provide own window system integration bits, so use the
EGL_KHR_platform_gbm extension to get the EGLDisplay for the consistency
sake.
2023-04-16 19:55:08 +00:00
Vlad Zahorodnii
285aa072e9 backends/wayland: Use EGL_KHR_platform_gbm
We provide own window system integration bits, so use the
EGL_KHR_platform_gbm extension to get the EGLDisplay for the consistency
sake.
2023-04-16 19:55:08 +00:00
Vlad Zahorodnii
0dea46548b backends/drm: Drop support for EGL_MESA_platform_gbm
Most platforms nowadays should support EGL_KHR_platform_gbm.
2023-04-16 19:55:08 +00:00
Xaver Hugl
56b2d8d8aa platformsupport/scenes/opengl: pass the correct arguments into eglDestroyImageKHR 2023-04-16 21:17:00 +02:00
Xaver Hugl
86635abe2b platformsupport/scenes/opengl: actually use externalOnly array
It was accidentally dropped in a refactor
2023-04-16 20:16:31 +02:00
l10n daemon script
f327f8e514 GIT_SILENT Sync po/docbooks with svn 2023-04-16 02:36:19 +00:00
Vlad Zahorodnii
e9614f030c Move vsync monitor helpers to utils/
There was no utils directory when they had been introduced.
2023-04-15 17:51:28 +00:00
Vlad Zahorodnii
dca1268187 backends/x11: Port to the new gbm buffer allocator 2023-04-15 14:44:02 +00:00
Xaver Hugl
f8bf89e267 wayland/clientbuffer: use std::unique_ptr properly
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
2023-04-15 16:03:04 +02:00
Vlad Zahorodnii
9f7517a55c backends/wayland: Minor code cleanup 2023-04-15 14:00:32 +03:00
Vlad Zahorodnii
103d8d8abe {core,backends/wayland}: Refactor gbm buffer allocator 2023-04-15 10:21:42 +00:00
Vlad Zahorodnii
3ac4f8a7dc core: Introduce base GraphicsBuffer
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.
2023-04-15 10:21:42 +00:00
l10n daemon script
c77b5909de GIT_SILENT Sync po/docbooks with svn 2023-04-15 02:40:15 +00:00
l10n daemon script
c987f5da82 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"
2023-04-15 02:34:38 +00:00
Nicolas Fella
8c9c45b8f1 Add option to do nothing when activating window on another desktop
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
2023-04-14 19:06:21 +00:00
Nicolas Fella
653681ac40 Allow activating windows on other desktops regardless of focus stealing protection
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.
2023-04-14 19:06:21 +00:00
Vlad Zahorodnii
c8c021a780 Remove some unused functions
Format querying logic has been moved to EglDisplay.
2023-04-14 14:28:45 +00:00
Vlad Zahorodnii
b9ba12d02e wayland: Reimplement wl-drm
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.
2023-04-14 14:13:56 +00:00
l10n daemon script
66ca843946 GIT_SILENT Sync po/docbooks with svn 2023-04-14 02:20:48 +00:00
Marco Martin
ef92eedce2 screencast: Base the frame skippin on max_framerate
the fixed framerate apparently needs to br 0/1 and to control
the actual framerate need to set the max one
2023-04-13 16:59:15 +02:00
Aleix Pol
226d8c0a3b screencast: Ensure we respect the negotiated framerate
Discards frames sent under the timeframe that was negotiated with the
client. This allows clients to just request the frames that they should
be able to compute.
2023-04-13 16:59:14 +02:00
Aleix Pol
b9f9617fc7 screencast: Offer the real framerate range we have available
When setting up a stream, make sure we are offering the framerate that
the source has.
2023-04-13 16:58:41 +02:00
l10n daemon script
4049dfa2a5 GIT_SILENT Sync po/docbooks with svn 2023-04-13 02:38:36 +00:00
Andreas Cord-Landwehr
230c5cc4f7 Include missing cmath header 2023-04-12 18:44:00 +02:00
Nate Graham
d25b9ebdb1 kcms/rules: improve text for window rules with descriptions
In particular, explain what all of the the focus stealing prevention
and protection settings do.

My understanding of the different modes comes from reading the code
and code comments in activation.cpp.

CCBUG: 458976
2023-04-12 14:03:52 +00:00
Xaver Hugl
b14f7959eb backends/drm: add another multi gpu fallback
With the dmabuf multi-gpu path, a buffer is imported to the secondary GPU
and presented directly, but importing a buffer that's usable for scanout
is not possible that way on most hardware. To prevent CPU copy from being
needed in those cases, this commit introduces a fallback where the buffer
is imported for rendering only, and then copied to a local buffer that's
presented on the screen.

CCBUG: 452219
CCBUG: 465809
2023-04-12 15:28:35 +02:00
Xaver Hugl
7bb56eb363 platformsupport/scenes/opengl: move egl dmabuf format queries to KWinEglDisplay 2023-04-12 15:25:41 +02:00
Xaver Hugl
94ac8d235b platformsupport: remove initBufferConfigs
Instead, rely on EGL_KHR_no_config_context everywhere except the standalone x11 backend
2023-04-12 15:25:21 +02:00
Xaver Hugl
57c7eccb32 libkwineffects: extract most useful kwinglplatform bits to a separate class 2023-04-12 15:16:33 +02:00
Xaver Hugl
ab7286fad1 platformsupport/scenes: move egl context into a separate class 2023-04-12 15:01:51 +02:00
Xaver Hugl
48fb07b367 platformsupport/scenes: move egldisplay code into a helper class 2023-04-12 14:57:49 +02:00