Commit graph

23787 commits

Author SHA1 Message Date
Vlad Zahorodnii
977016b743 scene: Change clear color in ItemRendererQPainter
It makes the behavior of the ItemRendererQPainter compatible with the
behavior of the ItemRendererOpenGL. It is needed to ensure that the
cursor layer is properly cleared too.
2022-12-19 17:02:20 +02:00
Vlad Zahorodnii
09e0fa5eb8 backends/wayland: Request wl_shm_buffers with RGB32 format 2022-12-19 16:40:39 +02:00
Vlad Zahorodnii
fc36affdee backends/wayland: Specify correct format for remapped primary layer buffers
We don't need the alpha channel and WaylandQPainterBufferSlot specifies
RGB32 format in its constructor.
2022-12-19 14:50:40 +02:00
Vlad Zahorodnii
30d856b9cb scene: Pass Scene to Item constructor
This is needed to establish explicit connection between an item and the
scene it belongs to. For now, the scene must be known at the item
construction time. Perhaps it can be improved in the future by items
inheriting their scene from the parent item, but the scene would need to
be refactored more so there's a root item or something like that.
2022-12-19 11:35:26 +00:00
l10n daemon script
38e0464e1f GIT_SILENT Sync po/docbooks with svn 2022-12-19 02:14:28 +00:00
l10n daemon script
0509dec92f 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"
2022-12-19 01:54:39 +00:00
Vlad Zahorodnii
2819a3cb4f scene: Decouple Item from Workspace and Output
Currently, Item schedules repaints taking output geometry into account,
but that's going to work poorly for cases other than workspace scene.

Moving from Output to SceneDelegate also allows us to unify some X11 and
Wayland specific code paths in Item.

Furthermore, it ensures that effects->paintScreen() won't remove pending
repaints for the output.
2022-12-18 20:25:40 +00:00
Xaver Hugl
b95c93517b backends/drm: fix VRR detection
The pending value always retains the value initially read and is not updated
when the driver changes the property value.

BUG: 463172
FIXED-IN: 5.26.5
2022-12-18 18:29:32 +01:00
l10n daemon script
2668904ae1 GIT_SILENT Sync po/docbooks with svn 2022-12-18 02:44:02 +00:00
l10n daemon script
3af5bec4ba 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"
2022-12-18 02:12:19 +00:00
Vlad Zahorodnii
8071ade9a8 scene: Make ItemRenderer responsible for pushing fbo
It makes more sense for an output layer to return the render target fbo.
The user of the render target will then take appropriate steps to bind
the fbo. It reduces the amount of boilerplate code in output layers too.
2022-12-18 00:44:51 +00:00
Nicolas Fella
a0e3a6e54b Port away from deprecated KService::property overload 2022-12-18 01:19:07 +01:00
Vlad Zahorodnii
3068f8bee5 ci: Sort dependencies in alphabetical order 2022-12-17 22:29:22 +00:00
Vlad Zahorodnii
c7518db4e3 ci: Update .kde-ci.yml
kcompletion and ktextwidgets are unused. plasma-wayland-protocols is not
marked explicitly.
2022-12-17 22:29:22 +00:00
Vlad Zahorodnii
f2857d556f scene: Drop SceneOpenGL::openGLPlatformInterfaceExtensions()
It doesn't belong in the Scene, whose sole responsibility is to draw
windows.
2022-12-18 00:05:48 +02:00
Vlad Zahorodnii
23bef7601e core: Move surface texture factory functions to RenderBackend
The goal is to create surface items for things that are not in the
workspace scene. RenderBackend perhaps is not a great place for these
factory functions. On the other hand, this change merely rewires code
from Scene to RenderBackend. I think that in distant future we could
make surface items pick surface texture type on their own, for what it's
worth that's what we would do in QtQuick.
2022-12-17 21:35:40 +00:00
Vlad Zahorodnii
f94b8bfa86 kcms: Simplify directory naming
Remove "kwin", it's repetitive and doesn't add new information. In
addition to that, prefixing commits that change kcms will become more
straightforward. There's more than one scheme people use, some include
"kwin", some don't.
2022-12-17 20:02:16 +00:00
Alexander Lohnau
7a83e4542c kcmkwin/kwineffects: Adjust "Name" in knsrc file
In the QML code we set the text of the KNS button to `i18n("Get New Desktop Effects...")`.
Consequently we should use the same terminology in the knsrc file.

BUG: 463021
2022-12-17 19:46:24 +01:00
Vlad Zahorodnii
1ca263d588 scene: Move OffscreenQuickView painting to EffectsHandlerImpl
There's no any way to integrate OffscreenQuickView into the scene graph.
So make the EffectsHandlerImpl responsible for drawing quick views until
the corresponding item is introduced (requires a lot and a lot of
refactoring in effects) or the design of kwin changes so much that we
don't need this special code path.
2022-12-17 17:14:43 +00:00
Vlad Zahorodnii
4ded856fbf scene: Introduce ItemRenderer
ItemRenderer class provides Item rendering facilities. The main
motivation behind this change is to extract code that can be used to
render both normal windows as well as the cursor.
2022-12-17 17:14:43 +00:00
Xaver Hugl
9078d916c2 backends/drm: fix error in finding the best plane 2022-12-17 15:40:43 +01:00
l10n daemon script
e708f8a166 GIT_SILENT Sync po/docbooks with svn 2022-12-17 12:35:21 +00:00
l10n daemon script
3ea6ed0b60 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"
2022-12-17 12:16:25 +00:00
l10n daemon script
71ebe1dac4 GIT_SILENT Sync po/docbooks with svn 2022-12-17 02:20:01 +00:00
l10n daemon script
59383ef665 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"
2022-12-17 01:58:50 +00:00
Xaver Hugl
3204d6ac3c port all headers to pragma once 2022-12-16 20:58:17 +00:00
Xaver Hugl
4a09f97679 openglbackend: reduce timeout for handling graphics resets
With current and broken behavior in Mesa, the timeout will always be
reached. GPU resets don't take anywhere near even a second, making
the user wait for 10s has no use.
2022-12-16 20:04:37 +00:00
Xaver Hugl
3335716d7b backends/drm: reset cursor texture on compositing reset
When a GPU reset happens, the old texture and vbo become invalid
2022-12-16 20:04:37 +00:00
Xaver Hugl
6211654e11 openglbackend: increase severity of GPU reset messages 2022-12-16 20:04:37 +00:00
Xaver Hugl
01bf4f12d3 kwinglutils: don't crash on gpu resets 2022-12-16 20:04:37 +00:00
Vlad Zahorodnii
f7a8635b10 Move scene related bits into src/scene/ directory
We've got quite a few scene related files, move them in a directory to
group related code together.
2022-12-16 19:15:35 +00:00
Vlad Zahorodnii
44439baad2 scene: Move some opengl initialization to Compositor
This kind of code doesn't belong in the SceneOpenGL. Moving it to the
Compositor class allows us to make the Scene class less central and
permit running with more than one scene, e.g. one for the workspace and
the other one for the cursor, etc.
2022-12-16 18:25:15 +00:00
Xaver Hugl
efbc86ef6d wayland/drmlease: invalidate lease requests with invalid connectors 2022-12-16 13:47:48 +00:00
Xaver Hugl
c2150988f2 wayland/drmlease: don't connect with nullptr parameter 2022-12-16 13:47:48 +00:00
Xaver Hugl
2c0091aacf wayland/drmlease: don't leak lease connectors 2022-12-16 13:47:48 +00:00
Vlad Zahorodnii
eec07c477d wayland: Require to reboot computer after changing primary selection option
Not all clients handle well withdrawing the primary selection global at
runtime, so apply the new primary selection option only after a reboot.
2022-12-16 12:47:11 +00:00
Vlad Zahorodnii
da229ebe85 Revert "Disable PrimarySelection in seat setPrimarySelection"
This reverts commit e60f26e0ab.

Cancelling the primary selection breaks text selection in applications
such as gedit. In those apps, you can't select text neither with your
mouse nor keyboard.

BUG: 461498
2022-12-16 12:47:11 +00:00
Yuri Chornoivan
c709511c81 Fix minor typo 2022-12-16 09:02:10 +02:00
l10n daemon script
b2536f853f GIT_SILENT Sync po/docbooks with svn 2022-12-16 02:26:41 +00:00
Nate Graham
0f693fe087 kcmkwin/xwayland: add an explanation on top
These settings are highly technical, and users are likely to feel
completely lost or intimidated when they see them if they're just
browsing around. Let's add some text to explain what the heck this is
for.
2022-12-15 15:09:34 -07:00
Nate Graham
7a4c2a5caa kcmkwin/xwayland: put radio buttons in a FormLayout
This is the typical way we do this. The result looks the same in a
width-constrained window, but uses the more common FormLayout
appearance for big windows.
2022-12-15 15:07:04 -07:00
Vlad Zahorodnii
07a022de5b Use glGetTexImage() in GLTexture::toImage()
glGetTextureImage() requires OpenGL 4.5+. glGetTexImage() is available
since OpenGL 2.0.
2022-12-15 21:03:18 +00:00
Harald Sitter
8f36c0f66f buttonrebinds: some stylistic polish
- obey rule of 5
- always initialize variables at declaration
- don't be needlessly explicit about things
- prefer std::array over c arrays
- don't else if after return
2022-12-15 20:06:20 +00:00
Vlad Zahorodnii
bf48c3b80d scene: Remove dnd icon hack
Currently, kwin blits the dnd icon onto the cursor image. This doesn't
work on mobile because the cursor is usually hidden there.

As a short term solution, put the dnd icon in the Scene. In the future,
it needs to be put in its own render layer.
2022-12-15 19:19:37 +00:00
Vlad Zahorodnii
2d71eb720b backends/wayland: Allocate buffers with GBM_USE_SCANOUT too
It most likely doesn't matter in real life as many compositors don't use
direct scanout for windowed surfaces, but it won't hurt.
2022-12-15 17:53:07 +00:00
Vlad Zahorodnii
a14998b790 backends/wayland: Port away from gbm_bo_create_with_modifiers2()
gbm_bo_create_with_modifiers2() is quite new and there are still distros
that ship 21.2 and older.
2022-12-15 17:53:07 +00:00
Aleix Pol
fc2447071e Xwayland: Allow users to optionally let Xwayland eavesdrop on certain modes
It's somewhat popular for voice communication applications to support
Push-to-Talk. This means that the process itself expects to get all of
the system input. This behaviour albeit sound does not work on Wayland
systems.

This commit adds an option to let legacy X11 applications that assume
they will be getting all information to do so until these apps are
properly ported to the XDP GlobalShortcuts.
2022-12-15 16:35:37 +00:00
Aleix Pol
245859637f kwaylandserver: avoid creating unnecessary containers just to iterate 2022-12-15 16:35:37 +00:00
Xaver Hugl
096351cff7 wayland/outputmanagement: ignore non-desktop outputs
Otherwise, applying all output configurations fails when you have a VR
headset connected
2022-12-15 13:58:58 +00:00
Arjen Hiemstra
63ba8e0eaf scenes/opengl: Use hardware clipping for clearing the background
Right now, when `paintBackground()` is called to clear the background,
we use custom geometry and render that when the damage region isn't
infinite. Rather than using geometry, we can instead use `glScissor()`
to set the area that needs to be cleared and then use `glClear()` to
clear it.

In addition, if we have only one rect in the damage region and that rect
matches the render target rect, we can completely skip all that setup
and use `glClear()` directly.
2022-12-15 12:12:32 +00:00